CMS 3D CMS Logo

L1GtfeExtWord.h
Go to the documentation of this file.
1 #ifndef L1GlobalTrigger_L1GtfeExtWord_h
2 #define L1GlobalTrigger_L1GtfeExtWord_h
3 
18 // system include files
19 #include <vector>
20 #include <iosfwd>
21 
22 // user include files
24 
25 // base class
27 
28 // forward declarations
29 
30 // class declaration
31 class L1GtfeExtWord : public L1GtfeWord {
32 public:
34  L1GtfeExtWord(); // empty constructor, all members set to zero;
35 
37  L1GtfeExtWord(int bstSizeBytes);
38 
40  L1GtfeExtWord(cms_uint16_t boardIdValue,
41  cms_uint16_t recordLengthValue,
42  cms_uint16_t recordLength1Value,
43  cms_uint16_t bxNrValue,
44  cms_uint32_t setupVersionValue,
45  cms_uint16_t activeBoardsValue,
46  cms_uint16_t altNrBxBoardValue,
47  cms_uint32_t totalTriggerNrValue, // end of L1GtfeWord
48  const std::vector<cms_uint16_t>& bstValue,
49  cms_uint16_t bstSourceValue);
50 
52  ~L1GtfeExtWord() override;
53 
55  bool operator==(const L1GtfeExtWord&) const;
56 
58  bool operator!=(const L1GtfeExtWord&) const;
59 
60 public:
62  inline const std::vector<cms_uint16_t>& bst() const { return m_bst; }
63 
65  inline const unsigned int bstLengthBytes() const { return m_bst.size(); }
66 
67 public:
69 
70  const cms_uint64_t gpsTime() const;
71  void setGpsTime(const cms_uint64_t);
72 
73  const cms_uint16_t bstMasterStatus() const;
74  const cms_uint32_t turnCountNumber() const;
75  const cms_uint32_t lhcFillNumber() const;
76  const cms_uint16_t beamMode() const;
77  const cms_uint16_t particleTypeBeam1() const;
78  const cms_uint16_t particleTypeBeam2() const;
79  const cms_uint16_t beamMomentum() const;
80  const cms_uint32_t totalIntensityBeam1() const;
81  const cms_uint32_t totalIntensityBeam2() const;
82 
83 public:
85  const cms_uint16_t bst(int iB) const;
86  void setBst(const cms_uint16_t bstVal, const int iB);
87 
89  void setBst(const cms_uint64_t& word64, const int iB);
90 
93  void setBstWord64(cms_uint64_t& word64, int iB, const int iWord);
94 
96  inline const cms_uint16_t bstSource() const { return m_bstSource; }
97 
98  inline void setBstSource(const cms_uint16_t bstSourceVal) { m_bstSource = bstSourceVal; }
99 
101  void setBstSource(const cms_uint64_t& word64);
102 
105  void setBstSourceWord64(cms_uint64_t& word64, const int iWord);
106 
107 public:
109  const unsigned int getSize() const;
110 
111 public:
113  void resize(int bstSizeBytes);
114 
116  void reset() override;
117 
119  void print(std::ostream& myCout) const override;
120 
123  void unpack(const unsigned char* gtfePtr) override;
124 
125 private:
127 
129  static const int BstFirstWord;
130 
132  static const int BstBitSize;
133 
137 
139 
140  static const int GpsTimeFirstBlock;
141  static const int GpsTimeLastBlock;
142 
143  static const int BstMasterStatusFirstBlock;
144  static const int BstMasterStatusLastBlock;
145 
146  static const int TurnCountNumberFirstBlock;
147  static const int TurnCountNumberLastBlock;
148 
149  static const int LhcFillNumberFirstBlock;
150  static const int LhcFillNumberLastBlock;
151 
152  static const int BeamModeFirstBlock;
153  static const int BeamModeLastBlock;
154 
155  static const int ParticleTypeBeam1FirstBlock;
156  static const int ParticleTypeBeam1LastBlock;
157 
158  static const int ParticleTypeBeam2FirstBlock;
159  static const int ParticleTypeBeam2LastBlock;
160 
161  static const int BeamMomentumFirstBlock;
162  static const int BeamMomentumLastBlock;
163 
166 
169 
170  // BST message source written always in the last word of GTFE extended
172 
173  static const int BstSourceShift;
174 
175 private:
177  std::vector<cms_uint16_t> m_bst;
178 
181 };
182 
183 #endif /*L1GlobalTrigger_L1GtfeExtWord_h*/
L1GtfeExtWord::~L1GtfeExtWord
~L1GtfeExtWord() override
destructor
Definition: L1GtfeExtWord.cc:68
L1GtfeExtWord::reset
void reset() override
reset the content of a L1GtfeExtWord
Definition: L1GtfeExtWord.cc:428
cms_uint32_t
unsigned int cms_uint32_t
Definition: typedefs.h:15
L1GtfeExtWord::BeamMomentumLastBlock
static const int BeamMomentumLastBlock
Definition: L1GtfeExtWord.h:162
L1GtfeExtWord::unpack
void unpack(const unsigned char *gtfePtr) override
Definition: L1GtfeExtWord.cc:481
L1GtfeExtWord::GpsTimeFirstBlock
static const int GpsTimeFirstBlock
BST blocks: conversion to defined quantities (LHC-BOB-ES-0001)
Definition: L1GtfeExtWord.h:140
L1GtfeExtWord::TotalIntensityBeam1FirstBlock
static const int TotalIntensityBeam1FirstBlock
Definition: L1GtfeExtWord.h:164
L1GtfeExtWord::LhcFillNumberFirstBlock
static const int LhcFillNumberFirstBlock
Definition: L1GtfeExtWord.h:149
L1GtfeExtWord::bst
const std::vector< cms_uint16_t > & bst() const
get the full BST block
Definition: L1GtfeExtWord.h:62
L1GtfeExtWord::operator==
bool operator==(const L1GtfeExtWord &) const
equal operator
Definition: L1GtfeExtWord.cc:73
L1GtfeExtWord::ParticleTypeBeam2FirstBlock
static const int ParticleTypeBeam2FirstBlock
Definition: L1GtfeExtWord.h:158
L1GtfeExtWord::L1GtfeExtWord
L1GtfeExtWord()
constructors
Definition: L1GtfeExtWord.cc:34
L1GtfeExtWord::BstBitSize
static const int BstBitSize
size in bits for a BST block
Definition: L1GtfeExtWord.h:132
L1GtfeExtWord::turnCountNumber
const cms_uint32_t turnCountNumber() const
Definition: L1GtfeExtWord.cc:175
L1GtfeExtWord::ParticleTypeBeam1LastBlock
static const int ParticleTypeBeam1LastBlock
Definition: L1GtfeExtWord.h:156
L1GtfeExtWord::BstMasterStatusLastBlock
static const int BstMasterStatusLastBlock
Definition: L1GtfeExtWord.h:144
L1GtfeExtWord::BstSourceShift
static const int BstSourceShift
Definition: L1GtfeExtWord.h:173
L1GtfeExtWord::ParticleTypeBeam1FirstBlock
static const int ParticleTypeBeam1FirstBlock
Definition: L1GtfeExtWord.h:155
L1GtfeExtWord::setBstWord64
void setBstWord64(cms_uint64_t &word64, int iB, const int iWord)
Definition: L1GtfeExtWord.cc:372
L1GtfeExtWord::BeamModeFirstBlock
static const int BeamModeFirstBlock
Definition: L1GtfeExtWord.h:152
L1GtfeWord
Definition: L1GtfeWord.h:30
L1GtfeExtWord::totalIntensityBeam1
const cms_uint32_t totalIntensityBeam1() const
Definition: L1GtfeExtWord.cc:295
L1GtfeExtWord::TotalIntensityBeam1LastBlock
static const int TotalIntensityBeam1LastBlock
Definition: L1GtfeExtWord.h:165
L1GtfeExtWord::TurnCountNumberFirstBlock
static const int TurnCountNumberFirstBlock
Definition: L1GtfeExtWord.h:146
L1GtfeExtWord::setGpsTime
void setGpsTime(const cms_uint64_t)
Definition: L1GtfeExtWord.cc:124
L1GtfeExtWord::bstMasterStatus
const cms_uint16_t bstMasterStatus() const
Definition: L1GtfeExtWord.cc:155
L1GtfeExtWord::setBstSourceWord64
void setBstSourceWord64(cms_uint64_t &word64, const int iWord)
Definition: L1GtfeExtWord.cc:390
L1GtfeExtWord::BstMasterStatusFirstBlock
static const int BstMasterStatusFirstBlock
Definition: L1GtfeExtWord.h:143
L1GtfeExtWord::m_bst
std::vector< cms_uint16_t > m_bst
BST message - each byte is an vector element.
Definition: L1GtfeExtWord.h:177
typedefs.h
L1GtfeExtWord::beamMomentum
const cms_uint16_t beamMomentum() const
Definition: L1GtfeExtWord.cc:275
L1GtfeExtWord::particleTypeBeam1
const cms_uint16_t particleTypeBeam1() const
Definition: L1GtfeExtWord.cc:235
L1GtfeExtWord::BeamModeLastBlock
static const int BeamModeLastBlock
Definition: L1GtfeExtWord.h:153
L1GtfeExtWord::resize
void resize(int bstSizeBytes)
resize the BST vector to get the right size of the block
Definition: L1GtfeExtWord.cc:425
L1GtfeExtWord::operator!=
bool operator!=(const L1GtfeExtWord &) const
unequal operator
Definition: L1GtfeExtWord.cc:100
L1GtfeExtWord::lhcFillNumber
const cms_uint32_t lhcFillNumber() const
Definition: L1GtfeExtWord.cc:195
L1GtfeExtWord::BstSourceMask
static const cms_uint64_t BstSourceMask
Definition: L1GtfeExtWord.h:171
L1GtfeExtWord::print
void print(std::ostream &myCout) const override
pretty print the content of a L1GtfeExtWord
Definition: L1GtfeExtWord.cc:434
cms_uint64_t
unsigned long long cms_uint64_t
Definition: typedefs.h:17
cms_uint16_t
unsigned short cms_uint16_t
Definition: typedefs.h:13
L1GtfeExtWord::BstBlockMask
static const cms_uint64_t BstBlockMask
Definition: L1GtfeExtWord.h:136
L1GtfeExtWord::BstFirstWord
static const int BstFirstWord
block description in the raw GT record
Definition: L1GtfeExtWord.h:129
L1GtfeWord.h
L1GtfeExtWord
Definition: L1GtfeExtWord.h:31
L1GtfeExtWord::ParticleTypeBeam2LastBlock
static const int ParticleTypeBeam2LastBlock
Definition: L1GtfeExtWord.h:159
L1GtfeExtWord::TotalIntensityBeam2FirstBlock
static const int TotalIntensityBeam2FirstBlock
Definition: L1GtfeExtWord.h:167
L1GtfeExtWord::totalIntensityBeam2
const cms_uint32_t totalIntensityBeam2() const
Definition: L1GtfeExtWord.cc:315
L1GtfeExtWord::bstLengthBytes
const unsigned int bstLengthBytes() const
get the size of the BST block
Definition: L1GtfeExtWord.h:65
L1GtfeExtWord::BeamMomentumFirstBlock
static const int BeamMomentumFirstBlock
Definition: L1GtfeExtWord.h:161
L1GtfeExtWord::setBstSource
void setBstSource(const cms_uint16_t bstSourceVal)
Definition: L1GtfeExtWord.h:98
L1GtfeExtWord::TotalIntensityBeam2LastBlock
static const int TotalIntensityBeam2LastBlock
Definition: L1GtfeExtWord.h:168
L1GtfeExtWord::getSize
const unsigned int getSize() const
get the size of the GTFE block in GT EVM record (in multiple of 8 bits)
Definition: L1GtfeExtWord.cc:402
L1GtfeExtWord::bstSource
const cms_uint16_t bstSource() const
get/set hex message indicating the source of BST message
Definition: L1GtfeExtWord.h:96
L1GtfeExtWord::LhcFillNumberLastBlock
static const int LhcFillNumberLastBlock
Definition: L1GtfeExtWord.h:150
L1GtfeExtWord::GpsTimeLastBlock
static const int GpsTimeLastBlock
Definition: L1GtfeExtWord.h:141
L1GtfeExtWord::particleTypeBeam2
const cms_uint16_t particleTypeBeam2() const
Definition: L1GtfeExtWord.cc:255
L1GtfeExtWord::TurnCountNumberLastBlock
static const int TurnCountNumberLastBlock
Definition: L1GtfeExtWord.h:147
L1GtfeExtWord::setBst
void setBst(const cms_uint16_t bstVal, const int iB)
L1GtfeExtWord::beamMode
const cms_uint16_t beamMode() const
Definition: L1GtfeExtWord.cc:215
L1GtfeExtWord::m_bstSource
cms_uint16_t m_bstSource
hex message indicating the source of BST message (beam or simulated)
Definition: L1GtfeExtWord.h:180
L1GtfeExtWord::gpsTime
const cms_uint64_t gpsTime() const
LHC-BOB-ES-0001 (EDMS 638899)
Definition: L1GtfeExtWord.cc:104