CGEM BOSS
6.6.5.i
BESIII Offline Software System
Loading...
Searching...
No Matches
RunNumber.h
Go to the documentation of this file.
1
//Dear emacs, this is -*- c++ -*-
2
3
/**
4
* @file eformat/RunNumber.h
5
* @author <a href="mailto:
[email protected]
">Andre DOS ANJOS</a>
6
* $Author: zhangy $
7
* $Revision: 1.1.1.1 $
8
* $Date: 2009/06/19 07:35:41 $
9
*
10
* @brief A helper class to aid in composing valid run numbers
11
*/
12
13
#ifndef EFORMAT_RUNNUMBER_H
14
#define EFORMAT_RUNNUMBER_H
15
16
#include <stdint.h>
17
18
namespace
eformat
{
19
20
/**
21
* Physics Types
22
*/
23
enum
RunType
{
PHYSICS
= 0x00,
24
CALIBRATION
= 0x01,
25
COSMICS
= 0x02,
26
TEST
= 0x0f};
27
28
/**
29
* An alias
30
*/
31
typedef
enum
RunType
RunType
;
32
33
namespace
helper {
34
35
/**
36
* Defines converters between version numbers and its components
37
*/
38
class
RunNumber
{
39
40
public
:
41
/**
42
* Constructor. Takes the components to form a run number
43
*
44
* @param type The run type (@see types.h)
45
* @param n The number 24-bits only are valid
46
*/
47
RunNumber
(
eformat::RunType
type
, uint32_t
n
)
48
: m_type(
type
), m_n(
n
) {}
49
50
/**
51
* Constructor. Takes the run number to understand the components from.
52
*
53
* @param rn The run number, fully built.
54
* @warning This run number <b>has</b> to conform to the current
55
* version of the library or unpredictable results might occur.
56
*/
57
RunNumber
(uint32_t rn);
58
59
/**
60
* Extracts the major version part of this version
61
*/
62
inline
eformat::RunType
type
(
void
)
const
{
return
m_type; }
63
64
/**
65
* Extracts the minor version part of this version
66
*/
67
inline
uint32_t
number
(
void
)
const
{
return
m_n; }
68
69
/**
70
* Gets the full 32-bit number made by assembling the 2 numbers
71
* above.
72
*/
73
uint32_t
code
(
void
)
const
;
74
75
private
:
//representation
76
77
eformat::RunType
m_type;
///< This run type
78
uint32_t m_n;
///< This run number
79
80
};
81
82
}
83
84
}
85
86
#endif
/* EFORMAT_RUNNUMBER_H */
n
const Int_t n
Definition
DataBase/tau_mode.c:65
eformat::helper::RunNumber
Definition
RunNumber.h:38
eformat::helper::RunNumber::code
uint32_t code(void) const
Definition
RunNumber.cxx:21
eformat::helper::RunNumber::type
eformat::RunType type(void) const
Definition
RunNumber.h:62
eformat::helper::RunNumber::number
uint32_t number(void) const
Definition
RunNumber.h:67
eformat::helper::RunNumber::RunNumber
RunNumber(eformat::RunType type, uint32_t n)
Definition
RunNumber.h:47
eformat
Definition
BadVersionIssue.h:20
eformat::RunType
RunType
Definition
RunNumber.h:23
eformat::TEST
@ TEST
Definition
RunNumber.h:26
eformat::PHYSICS
@ PHYSICS
Definition
RunNumber.h:23
eformat::COSMICS
@ COSMICS
Definition
RunNumber.h:25
eformat::CALIBRATION
@ CALIBRATION
Definition
RunNumber.h:24
6.6.5.i
Event
eformat
eformat-00-00-04
eformat
RunNumber.h
Generated by
1.12.0