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*/
static const int BstMasterStatusLastBlock
void setBstSource(const cms_uint16_t bstSourceVal)
Definition: L1GtfeExtWord.h:98
static const int TotalIntensityBeam1FirstBlock
static const int ParticleTypeBeam1FirstBlock
static const int GpsTimeLastBlock
const cms_uint16_t bstSource() const
get/set hex message indicating the source of BST message
Definition: L1GtfeExtWord.h:96
static const cms_uint64_t BstBlockMask
static const int ParticleTypeBeam2LastBlock
static const int TotalIntensityBeam1LastBlock
void print(std::ostream &myCout) const override
pretty print the content of a L1GtfeExtWord
const cms_uint64_t gpsTime() const
LHC-BOB-ES-0001 (EDMS 638899)
void setBst(const cms_uint16_t bstVal, const int iB)
static const int TurnCountNumberLastBlock
L1GtfeExtWord()
constructors
const unsigned int bstLengthBytes() const
get the size of the BST block
Definition: L1GtfeExtWord.h:65
static const int ParticleTypeBeam1LastBlock
bool operator==(const L1GtfeExtWord &) const
equal operator
static const int TotalIntensityBeam2LastBlock
const cms_uint16_t bstMasterStatus() const
void setBstWord64(cms_uint64_t &word64, int iB, const int iWord)
const unsigned int getSize() const
get the size of the GTFE block in GT EVM record (in multiple of 8 bits)
const cms_uint16_t beamMomentum() const
const std::vector< cms_uint16_t > & bst() const
get the full BST block
Definition: L1GtfeExtWord.h:62
static const int ParticleTypeBeam2FirstBlock
bool operator!=(const L1GtfeExtWord &) const
unequal operator
static const int BeamMomentumFirstBlock
static const cms_uint64_t BstSourceMask
static const int GpsTimeFirstBlock
BST blocks: conversion to defined quantities (LHC-BOB-ES-0001)
unsigned short cms_uint16_t
Definition: typedefs.h:13
static const int TurnCountNumberFirstBlock
static const int BstFirstWord
block description in the raw GT record
unsigned int cms_uint32_t
Definition: typedefs.h:15
static const int TotalIntensityBeam2FirstBlock
void setBstSourceWord64(cms_uint64_t &word64, const int iWord)
const cms_uint32_t totalIntensityBeam2() const
const cms_uint32_t totalIntensityBeam1() const
void resize(int bstSizeBytes)
resize the BST vector to get the right size of the block
static const int BstSourceShift
const cms_uint32_t lhcFillNumber() const
std::vector< cms_uint16_t > m_bst
BST message - each byte is an vector element.
~L1GtfeExtWord() override
destructor
static const int BeamModeLastBlock
void setGpsTime(const cms_uint64_t)
cms_uint16_t m_bstSource
hex message indicating the source of BST message (beam or simulated)
const cms_uint16_t particleTypeBeam2() const
static const int BstBitSize
size in bits for a BST block
static const int BstMasterStatusFirstBlock
static const int LhcFillNumberLastBlock
unsigned long long cms_uint64_t
Definition: typedefs.h:17
const cms_uint32_t turnCountNumber() const
static const int BeamMomentumLastBlock
void reset() override
reset the content of a L1GtfeExtWord
const cms_uint16_t beamMode() const
static const int BeamModeFirstBlock
void unpack(const unsigned char *gtfePtr) override
const cms_uint16_t particleTypeBeam1() const
static const int LhcFillNumberFirstBlock