CMS 3D CMS Logo

GlobalEventNumber.h
Go to the documentation of this file.
1 #ifndef EVF_UTILITIES_GLOBALEVENTNUMBER_H
2 #define EVF_UTILITIES_GLOBALEVENTNUMBER_H
3 
4 #include <cstddef>
5 
7 
8 namespace evf {
9  namespace evtn {
10 
11  const unsigned int SLINK_WORD_SIZE = 8;
12  const unsigned int SLINK_HALFWORD_SIZE = 4;
13  const unsigned int FED_HEADER_SIZE = SLINK_WORD_SIZE;
14  const unsigned int FED_TRAILER_SIZE = SLINK_WORD_SIZE;
15 
16  const unsigned int DAQ_TOTTRG_OFFSET = 2; //offset in 32-bit words
17  const unsigned int DAQ_BOARDID_OFFSET = 1;
18  const unsigned int DAQ_BOARDID_MASK = 0xffff0000;
19  const unsigned int DAQ_BOARDID_SHIFT = 24;
20  const unsigned int DAQ_BOARDID_VALUE = 0x11;
21 
27  }; // EvmRecordsize
28 
29  const unsigned int EVM_BOARDID_OFFSET = 1;
30  const unsigned int EVM_BOARDID_MASK = 0xffff0000;
31  const unsigned int EVM_BOARDID_SHIFT = 24;
32  const unsigned int EVM_BOARDID_VALUE = 0x11;
33 
34  const unsigned int EVM_GTFE_BLOCK_V0000 = 6; //size in 64-bit words
35  const unsigned int EVM_GTFE_BLOCK_V0011 = 9; //size in 64-bit words, new format
36  const unsigned int EVM_GTFE_BSTGPS_OFFSET = 4; //offset in 32-bit words
37 
38  const unsigned int EVM_TCS_BOARDID_VALUE = 0xcc07;
39  const unsigned int EVM_TCS_BLOCK = 5; //size in 64-bit words
40  const unsigned int EVM_TCS_TRIGNR_OFFSET = 5; //offset in 32-bit words
41  const unsigned int EVM_TCS_LSBLNR_OFFSET = 0; //offset in 32-bit words
42  const unsigned int EVM_TCS_BOARDID_OFFSET = 1; //offset in 32-bit words
43  const unsigned int EVM_TCS_ORBTNR_OFFSET = 6; //offset in 32-bit words
44  const unsigned int EVM_TCS_LSBLNR_MASK = 0x0000ffff; // 16 LSB
45  const unsigned int EVM_TCS_BOARDID_MASK = 0xffff0000; // 16 MSB
46  const unsigned int EVM_TCS_BOARDID_SHIFT = 16; // 16 MSB
47  const unsigned int EVM_TCS_EVNTYP_MASK = 0x00f00000; // 4 bits
48  const unsigned int EVM_TCS_EVNTYP_SHIFT = 20;
49  const unsigned int EVM_TCS_BCNRIN_MASK = 0x00000fff; // 12 LSB
50 
51  const unsigned int EVM_FDL_BLOCK = 7; //size in 64-bit words
52  const unsigned int EVM_FDL_BCNRIN_OFFSET = 1; //offset in 32-bit words
53  const unsigned int EVM_FDL_TECTRG_OFFSET = 2; //offset in 32-bit words
54  const unsigned int EVM_FDL_ALGOB1_OFFSET = 4; //offset in 32-bit words
55  const unsigned int EVM_FDL_ALGOB2_OFFSET = 6; //offset in 32-bit words
56  const unsigned int EVM_FDL_PSCVSN_OFFSET = 11; //offset in 32-bit words
57 
58  const unsigned int GTPE_BOARDID_OFFSET = 16;
59  const unsigned int GTPE_BOARDID_MASK = 0x000000ff;
60  const unsigned int GTPE_BOARDID_SHIFT = 0;
61  const unsigned int GTPE_BOARDID_VALUE = 0x1;
62  const unsigned int GTPE_TRIGNR_OFFSET = 14; //offset in 32-bit words
63  const unsigned int GTPE_ORBTNR_OFFSET = 18; //offset in 32-bit words
64  const unsigned int GTPE_BCNRIN_OFFSET = 3; //offset in 32-bit words
65  const unsigned int GTPE_BCNRIN_MASK = 0x00000fff; // 12 LSB
66 
67  unsigned int offset(bool);
68  bool daq_board_sense(const unsigned char *p);
69  bool gtpe_board_sense(const unsigned char *p);
70  bool evm_board_sense(const unsigned char *p, size_t size);
71  bool evm_tcs_board_sense(const unsigned char *p);
72  void evm_board_setformat(size_t size);
73 
74  unsigned int get(const unsigned char *, bool);
75  unsigned int gtpe_get(const unsigned char *);
76  unsigned int getlbn(const unsigned char *);
77  unsigned int gtpe_getlbn(const unsigned char *);
78  unsigned int getgpslow(const unsigned char *);
79  unsigned int getgpshigh(const unsigned char *);
80  unsigned int getorbit(const unsigned char *);
81  unsigned int getevtyp(const unsigned char *);
82  unsigned int gtpe_getorbit(const unsigned char *);
83  unsigned int getfdlbx(const unsigned char *);
84  unsigned int gtpe_getbx(const unsigned char *);
85  unsigned int getfdlpsc(const unsigned char *);
86  unsigned long long getfdlttr(const unsigned char *);
87  unsigned long long getfdlta1(const unsigned char *);
88  unsigned long long getfdlta2(const unsigned char *);
89  } // namespace evtn
90 } // namespace evf
91 #endif
evf::evtn::gtpe_getlbn
unsigned int gtpe_getlbn(const unsigned char *)
Definition: GlobalEventNumber.cc:91
evf::evtn::EVM_FDL_ALGOB2_OFFSET
const unsigned int EVM_FDL_ALGOB2_OFFSET
Definition: GlobalEventNumber.h:55
evf::evtn::EVM_BOARDID_OFFSET
const unsigned int EVM_BOARDID_OFFSET
Definition: GlobalEventNumber.h:29
evf::evtn::EVM_TCS_ORBTNR_OFFSET
const unsigned int EVM_TCS_ORBTNR_OFFSET
Definition: GlobalEventNumber.h:43
evf::evtn::daq_board_sense
bool daq_board_sense(const unsigned char *p)
Definition: GlobalEventNumber.cc:6
evf::evtn::DAQ_BOARDID_VALUE
const unsigned int DAQ_BOARDID_VALUE
Definition: GlobalEventNumber.h:20
evf::evtn::getlbn
unsigned int getlbn(const unsigned char *)
Definition: GlobalEventNumber.cc:86
evf::evtn::EVM_TCS_BOARDID_MASK
const unsigned int EVM_TCS_BOARDID_MASK
Definition: GlobalEventNumber.h:45
evf::evtn::getfdlta2
unsigned long long getfdlta2(const unsigned char *)
Definition: GlobalEventNumber.cc:140
evf::evtn::BST32_5BX
Definition: GlobalEventNumber.h:24
evf::evtn::getfdlta1
unsigned long long getfdlta1(const unsigned char *)
Definition: GlobalEventNumber.cc:134
evf::evtn::EVM_TCS_BOARDID_SHIFT
const unsigned int EVM_TCS_BOARDID_SHIFT
Definition: GlobalEventNumber.h:46
evf::evtn::DAQ_BOARDID_OFFSET
const unsigned int DAQ_BOARDID_OFFSET
Definition: GlobalEventNumber.h:17
evf::evtn::EVM_GTFE_BSTGPS_OFFSET
const unsigned int EVM_GTFE_BSTGPS_OFFSET
Definition: GlobalEventNumber.h:36
evf::evtn::gtpe_board_sense
bool gtpe_board_sense(const unsigned char *p)
Definition: GlobalEventNumber.cc:11
evf::evtn::getfdlbx
unsigned int getfdlbx(const unsigned char *)
Definition: GlobalEventNumber.cc:112
evf::evtn::EVM_TCS_EVNTYP_SHIFT
const unsigned int EVM_TCS_EVNTYP_SHIFT
Definition: GlobalEventNumber.h:48
evf::evtn::EVM_TCS_BCNRIN_MASK
const unsigned int EVM_TCS_BCNRIN_MASK
Definition: GlobalEventNumber.h:49
evf::evtn::get
unsigned int get(const unsigned char *, bool)
Definition: GlobalEventNumber.cc:77
evf::evtn::getgpslow
unsigned int getgpslow(const unsigned char *)
Definition: GlobalEventNumber.cc:92
evf::evtn::EVM_FDL_ALGOB1_OFFSET
const unsigned int EVM_FDL_ALGOB1_OFFSET
Definition: GlobalEventNumber.h:54
evf::evtn::EVM_TCS_LSBLNR_MASK
const unsigned int EVM_TCS_LSBLNR_MASK
Definition: GlobalEventNumber.h:44
evf::evtn::BST52_5BX
Definition: GlobalEventNumber.h:26
evf::evtn::EVM_TCS_BOARDID_OFFSET
const unsigned int EVM_TCS_BOARDID_OFFSET
Definition: GlobalEventNumber.h:42
evf::evtn::offset
unsigned int offset(bool)
Definition: GlobalEventNumber.cc:71
evf::evtn::evm_tcs_board_sense
bool evm_tcs_board_sense(const unsigned char *p)
Definition: GlobalEventNumber.cc:41
evf::evtn::DAQ_BOARDID_SHIFT
const unsigned int DAQ_BOARDID_SHIFT
Definition: GlobalEventNumber.h:19
evf::evtn::getevtyp
unsigned int getevtyp(const unsigned char *)
Definition: GlobalEventNumber.cc:103
evf::evtn::GTPE_BOARDID_VALUE
const unsigned int GTPE_BOARDID_VALUE
Definition: GlobalEventNumber.h:61
evf::evtn::GTPE_BCNRIN_OFFSET
const unsigned int GTPE_BCNRIN_OFFSET
Definition: GlobalEventNumber.h:64
evf::evtn::getfdlttr
unsigned long long getfdlttr(const unsigned char *)
Definition: GlobalEventNumber.cc:128
evf::evtn::EVM_TCS_BOARDID_VALUE
const unsigned int EVM_TCS_BOARDID_VALUE
Definition: GlobalEventNumber.h:38
evf::evtn::FED_TRAILER_SIZE
const unsigned int FED_TRAILER_SIZE
Definition: GlobalEventNumber.h:14
evf::evtn::evm_board_setformat
void evm_board_setformat(size_t size)
Definition: GlobalEventNumber.cc:47
evf::evtn::GTPE_ORBTNR_OFFSET
const unsigned int GTPE_ORBTNR_OFFSET
Definition: GlobalEventNumber.h:63
evf::evtn::GTPE_BOARDID_MASK
const unsigned int GTPE_BOARDID_MASK
Definition: GlobalEventNumber.h:59
evf::evtn::gtpe_getorbit
unsigned int gtpe_getorbit(const unsigned char *)
Definition: GlobalEventNumber.cc:109
evf::evtn::EVM_FDL_PSCVSN_OFFSET
const unsigned int EVM_FDL_PSCVSN_OFFSET
Definition: GlobalEventNumber.h:56
evf::evtn::EVM_FDL_BCNRIN_OFFSET
const unsigned int EVM_FDL_BCNRIN_OFFSET
Definition: GlobalEventNumber.h:52
evf::evtn::EVM_TCS_EVNTYP_MASK
const unsigned int EVM_TCS_EVNTYP_MASK
Definition: GlobalEventNumber.h:47
evf::evtn::EVM_BOARDID_VALUE
const unsigned int EVM_BOARDID_VALUE
Definition: GlobalEventNumber.h:32
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
evf::evtn::gtpe_getbx
unsigned int gtpe_getbx(const unsigned char *)
Definition: GlobalEventNumber.cc:119
evf::evtn::getorbit
unsigned int getorbit(const unsigned char *)
Definition: GlobalEventNumber.cc:99
evf::evtn::getfdlpsc
unsigned int getfdlpsc(const unsigned char *)
Definition: GlobalEventNumber.cc:122
evf::evtn::EVM_TCS_LSBLNR_OFFSET
const unsigned int EVM_TCS_LSBLNR_OFFSET
Definition: GlobalEventNumber.h:41
evf::evtn::EVM_TCS_BLOCK
const unsigned int EVM_TCS_BLOCK
Definition: GlobalEventNumber.h:39
evf::evtn::BST52_3BX
Definition: GlobalEventNumber.h:25
evf::evtn::SLINK_HALFWORD_SIZE
const unsigned int SLINK_HALFWORD_SIZE
Definition: GlobalEventNumber.h:12
evf::evtn::DAQ_TOTTRG_OFFSET
const unsigned int DAQ_TOTTRG_OFFSET
Definition: GlobalEventNumber.h:16
evf::evtn::EvmRecordScheme
EvmRecordScheme
Definition: GlobalEventNumber.h:22
evf::evtn::evm_board_sense
bool evm_board_sense(const unsigned char *p, size_t size)
Definition: GlobalEventNumber.cc:15
evf::evtn::EVM_BOARDID_MASK
const unsigned int EVM_BOARDID_MASK
Definition: GlobalEventNumber.h:30
evf::evtn::FED_HEADER_SIZE
const unsigned int FED_HEADER_SIZE
Definition: GlobalEventNumber.h:13
evf::evtn::EVM_GTFE_BLOCK_V0011
const unsigned int EVM_GTFE_BLOCK_V0011
Definition: GlobalEventNumber.h:35
evf::evtn::BST32_3BX
Definition: GlobalEventNumber.h:23
evf::evtn::EVM_TCS_TRIGNR_OFFSET
const unsigned int EVM_TCS_TRIGNR_OFFSET
Definition: GlobalEventNumber.h:40
evf
Definition: fillJson.h:27
evf::evtn::GTPE_BCNRIN_MASK
const unsigned int GTPE_BCNRIN_MASK
Definition: GlobalEventNumber.h:65
evf::evtn::GTPE_TRIGNR_OFFSET
const unsigned int GTPE_TRIGNR_OFFSET
Definition: GlobalEventNumber.h:62
evf::evtn::SLINK_WORD_SIZE
const unsigned int SLINK_WORD_SIZE
Definition: GlobalEventNumber.h:11
evf::evtn::DAQ_BOARDID_MASK
const unsigned int DAQ_BOARDID_MASK
Definition: GlobalEventNumber.h:18
evf::evtn::GTPE_BOARDID_SHIFT
const unsigned int GTPE_BOARDID_SHIFT
Definition: GlobalEventNumber.h:60
evf::evtn::gtpe_get
unsigned int gtpe_get(const unsigned char *)
Definition: GlobalEventNumber.cc:83
FEDHeader.h
evf::evtn::GTPE_BOARDID_OFFSET
const unsigned int GTPE_BOARDID_OFFSET
Definition: GlobalEventNumber.h:58
evf::evtn::EVM_BOARDID_SHIFT
const unsigned int EVM_BOARDID_SHIFT
Definition: GlobalEventNumber.h:31
evf::evtn::EVM_FDL_BLOCK
const unsigned int EVM_FDL_BLOCK
Definition: GlobalEventNumber.h:51
evf::evtn::EVM_FDL_TECTRG_OFFSET
const unsigned int EVM_FDL_TECTRG_OFFSET
Definition: GlobalEventNumber.h:53
evf::evtn::getgpshigh
unsigned int getgpshigh(const unsigned char *)
Definition: GlobalEventNumber.cc:95
evf::evtn::EVM_GTFE_BLOCK_V0000
const unsigned int EVM_GTFE_BLOCK_V0000
Definition: GlobalEventNumber.h:34
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443