BOSS 7.0.2
BESIII Offline Software System
Loading...
Searching...
No Matches
eformat::helper::Version Class Reference

#include <Version.h>

Public Member Functions

 Version (uint16_t minor, uint16_t major=MAJOR_DEFAULT_VERSION)
 
 Version (uint32_t v=DEFAULT_VERSION)
 
uint16_t major2 (void) const
 
uint16_t minor2 (void) const
 
uint32_t code (void) const
 
std::string human_major (void) const
 
std::string human_minor (void) const
 
std::string human (void) const
 
 Version (uint16_t minor, uint16_t major=MAJOR_DEFAULT_VERSION)
 
 Version (uint32_t v=DEFAULT_VERSION)
 
uint16_t major2 (void) const
 
uint16_t minor2 (void) const
 
uint32_t code (void) const
 
std::string human_major (void) const
 
std::string human_minor (void) const
 
std::string human (void) const
 

Detailed Description

Defines converters between version numbers and its components

Definition at line 41 of file Event/eformat/eformat-00-00-04/eformat/Version.h.

Constructor & Destructor Documentation

◆ Version() [1/4]

eformat::helper::Version::Version ( uint16_t  minor,
uint16_t  major = MAJOR_DEFAULT_VERSION 
)
inline

Constructor. Takes the components to form a version

Parameters
minorThe minor version
majorThe major version

Definition at line 50 of file Event/eformat/eformat-00-00-04/eformat/Version.h.

51 : m_minor(minor), m_major(major) {}

◆ Version() [2/4]

eformat::helper::Version::Version ( uint32_t  v = DEFAULT_VERSION)

Constructor. Takes the version to understand the components from.

Parameters
vThe version number, fully built.
Warning
This version number has to conform to the current version of the library or unpredictable results might occur.

Definition at line 16 of file Version.cxx.

17 : m_minor(0xffff&v), m_major(v>>16)
18{
19}
**********Class see also m_nmax DOUBLE PRECISION m_amel DOUBLE PRECISION m_x2 DOUBLE PRECISION m_alfinv DOUBLE PRECISION m_Xenph INTEGER m_KeyWtm INTEGER m_idyfs DOUBLE PRECISION m_zini DOUBLE PRECISION m_q2 DOUBLE PRECISION m_Wt_KF DOUBLE PRECISION m_WtCut INTEGER m_KFfin *COMMON c_KarLud $ !Input CMS energy[GeV] $ !CMS energy after beam spread beam strahlung[GeV] $ !Beam energy spread[GeV] $ !z boost due to beam spread $ !electron beam mass *ff pair spectrum $ !minimum v
Definition: KarLud.h:35

◆ Version() [3/4]

eformat::helper::Version::Version ( uint16_t  minor,
uint16_t  major = MAJOR_DEFAULT_VERSION 
)
inline

Constructor. Takes the components to form a version

Parameters
minorThe minor version
majorThe major version

Definition at line 50 of file InstallArea/include/eformat/eformat/Version.h.

51 : m_minor(minor), m_major(major) {}

◆ Version() [4/4]

eformat::helper::Version::Version ( uint32_t  v = DEFAULT_VERSION)

Constructor. Takes the version to understand the components from.

Parameters
vThe version number, fully built.
Warning
This version number has to conform to the current version of the library or unpredictable results might occur.

Member Function Documentation

◆ code() [1/2]

uint32_t eformat::helper::Version::code ( void  ) const

Gets the full 32-bit number made by assembling the 2 numbers above.

Definition at line 21 of file Version.cxx.

22{
23 uint32_t retval = m_major;
24 retval <<= 16;
25 retval |= m_minor;
26 return retval;
27}

◆ code() [2/2]

uint32_t eformat::helper::Version::code ( void  ) const

Gets the full 32-bit number made by assembling the 2 numbers above.

◆ human() [1/2]

std::string eformat::helper::Version::human ( void  ) const

Returns a string representation of the version number

Definition at line 43 of file Version.cxx.

44{
45 std::string retval = human_major();
46 retval += "-";
47 retval += human_minor();
48 return retval;
49}
std::string human_major(void) const
Definition: Version.cxx:29
std::string human_minor(void) const
Definition: Version.cxx:36

◆ human() [2/2]

std::string eformat::helper::Version::human ( void  ) const

Returns a string representation of the version number

◆ human_major() [1/2]

std::string eformat::helper::Version::human_major ( void  ) const

Returns a string representation of the major version number

Definition at line 29 of file Version.cxx.

30{
31 std::ostringstream oss;
32 oss << (major2() >> 8) << "." << (major2() & 0xff);
33 return oss.str();
34}

◆ human_major() [2/2]

std::string eformat::helper::Version::human_major ( void  ) const

Returns a string representation of the major version number

◆ human_minor() [1/2]

std::string eformat::helper::Version::human_minor ( void  ) const

Returns a string representation of the minor version number

Definition at line 36 of file Version.cxx.

37{
38 std::ostringstream oss;
39 oss << (minor2() >> 8) << "." << (minor2() & 0xff);
40 return oss.str();
41}

◆ human_minor() [2/2]

std::string eformat::helper::Version::human_minor ( void  ) const

Returns a string representation of the minor version number

◆ major2() [1/2]

uint16_t eformat::helper::Version::major2 ( void  ) const
inline

Extracts the major version part of this version

Definition at line 65 of file Event/eformat/eformat-00-00-04/eformat/Version.h.

65{ return m_major; }

Referenced by eformat::old::convert(), and convert_ros().

◆ major2() [2/2]

uint16_t eformat::helper::Version::major2 ( void  ) const
inline

Extracts the major version part of this version

Definition at line 65 of file InstallArea/include/eformat/eformat/Version.h.

65{ return m_major; }

◆ minor2() [1/2]

uint16_t eformat::helper::Version::minor2 ( void  ) const
inline

Extracts the minor version part of this version

Definition at line 70 of file Event/eformat/eformat-00-00-04/eformat/Version.h.

70{ return m_minor; }

Referenced by eformat::old::convert(), and convert_ros().

◆ minor2() [2/2]

uint16_t eformat::helper::Version::minor2 ( void  ) const
inline

Extracts the minor version part of this version

Definition at line 70 of file InstallArea/include/eformat/eformat/Version.h.

70{ return m_minor; }

The documentation for this class was generated from the following files: