BOSS 7.0.8
BESIII Offline Software System
Loading...
Searching...
No Matches
eformat::helper::RunNumber Class Reference

#include <RunNumber.h>

Public Member Functions

 RunNumber (eformat::RunType type, uint32_t n)
 
 RunNumber (uint32_t rn)
 
eformat::RunType type (void) const
 
uint32_t number (void) const
 
uint32_t code (void) const
 

Detailed Description

Defines converters between version numbers and its components

Definition at line 38 of file RunNumber.h.

Constructor & Destructor Documentation

◆ RunNumber() [1/2]

eformat::helper::RunNumber::RunNumber ( eformat::RunType  type,
uint32_t  n 
)
inline

Constructor. Takes the components to form a run number

Parameters
typeThe run type (
See also
types.h)
Parameters
nThe number 24-bits only are valid

Definition at line 47 of file RunNumber.h.

48 : m_type(type), m_n(n) {}
const Int_t n
eformat::RunType type(void) const
Definition: RunNumber.h:62

◆ RunNumber() [2/2]

eformat::helper::RunNumber::RunNumber ( uint32_t  rn)

Constructor. Takes the run number to understand the components from.

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

Definition at line 15 of file RunNumber.cxx.

16 : m_type(static_cast<eformat::RunType>(rn>>24)),
17 m_n(0xffffff&rn)
18{
19}

Member Function Documentation

◆ code()

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

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

Definition at line 21 of file RunNumber.cxx.

22{
23 uint32_t retval = m_type;
24 retval <<= 24;
25 retval |= m_n;
26 return retval;
27}

◆ number()

uint32_t eformat::helper::RunNumber::number ( void  ) const
inline

Extracts the minor version part of this version

Definition at line 67 of file RunNumber.h.

67{ return m_n; }

◆ type()

eformat::RunType eformat::helper::RunNumber::type ( void  ) const
inline

Extracts the major version part of this version

Definition at line 62 of file RunNumber.h.

62{ return m_type; }

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