eformat::helper::RunNumber Class Reference

#include <RunNumber.h>

List of all members.

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

Private Attributes

eformat::RunType m_type
 This run type.
uint32_t m_n
 This run number.


Detailed Description

Defines converters between version numbers and its components

Definition at line 38 of file RunNumber.h.


Constructor & Destructor Documentation

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

Constructor. Takes the components to form a run number

Parameters:
type The run type (
See also:
types.h)
Parameters:
n The number 24-bits only are valid

Definition at line 47 of file RunNumber.h.

00048         : m_type(type), m_n(n) {}

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

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

Parameters:
rn The 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.

00016   : m_type(static_cast<eformat::RunType>(rn>>24)),
00017     m_n(0xffffff&rn)
00018 {
00019 }


Member Function Documentation

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.

References m_n, and m_type.

00022 {
00023   uint32_t retval = m_type;
00024   retval <<= 24;
00025   retval |= m_n;
00026   return retval;
00027 }

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.

References m_n.

00067 { return m_n; }

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.

References m_type.

00062 { return m_type; }


Member Data Documentation

uint32_t eformat::helper::RunNumber::m_n [private]

This run number.

Definition at line 78 of file RunNumber.h.

Referenced by code(), and number().

eformat::RunType eformat::helper::RunNumber::m_type [private]

This run type.

Definition at line 77 of file RunNumber.h.

Referenced by code(), and type().


Generated on Tue Nov 29 23:36:30 2016 for BOSS_7.0.2 by  doxygen 1.4.7