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 {
33 
34 public:
35 
37  L1GtfeExtWord(); // empty constructor, all members set to zero;
38 
40  L1GtfeExtWord(int bstSizeBytes);
41 
44  cms_uint16_t boardIdValue,
45  cms_uint16_t recordLengthValue,
46  cms_uint16_t recordLength1Value,
47  cms_uint16_t bxNrValue,
48  cms_uint32_t setupVersionValue,
49  cms_uint16_t activeBoardsValue,
50  cms_uint16_t altNrBxBoardValue,
51  cms_uint32_t totalTriggerNrValue, // end of L1GtfeWord
52  const std::vector<cms_uint16_t>& bstValue,
53  cms_uint16_t bstSourceValue
54  );
55 
56 
58  virtual ~L1GtfeExtWord();
59 
61  bool operator==(const L1GtfeExtWord&) const;
62 
64  bool operator!=(const L1GtfeExtWord&) const;
65 
66 public:
67 
69  inline const std::vector<cms_uint16_t>& bst() const {
70  return m_bst;
71  }
72 
74  inline const unsigned int bstLengthBytes() const {
75  return m_bst.size();
76  }
77 
78 public:
79 
81 
82  const cms_uint64_t gpsTime() const;
83  void setGpsTime(const cms_uint64_t);
84 
85  const cms_uint16_t bstMasterStatus() const;
86  const cms_uint32_t turnCountNumber() const;
87  const cms_uint32_t lhcFillNumber() const;
88  const cms_uint16_t beamMode() const;
89  const cms_uint16_t particleTypeBeam1() const;
90  const cms_uint16_t particleTypeBeam2() const;
91  const cms_uint16_t beamMomentum() const;
92  const cms_uint32_t totalIntensityBeam1() const;
93  const cms_uint32_t totalIntensityBeam2() const;
94 
95 
96 
97 public:
98 
100  const cms_uint16_t bst(int iB) const;
101  void setBst(const cms_uint16_t bstVal, const int iB);
102 
104  void setBst(const cms_uint64_t& word64, const int iB);
105 
108  void setBstWord64(cms_uint64_t& word64, int iB, const int iWord);
109 
110 
112  inline const cms_uint16_t bstSource() const {
113  return m_bstSource;
114  }
115 
116  inline void setBstSource(const cms_uint16_t bstSourceVal) {
117  m_bstSource = bstSourceVal;
118  }
119 
121  void setBstSource(const cms_uint64_t& word64);
122 
125  void setBstSourceWord64(cms_uint64_t& word64, const int iWord);
126 
127 public:
128 
130  const unsigned int getSize() const;
131 
132 public:
133 
135  void resize(int bstSizeBytes);
136 
138  void reset();
139 
141  virtual void print(std::ostream& myCout) const;
142 
145  virtual void unpack(const unsigned char* gtfePtr);
146 
147 private:
148 
150 
152  static const int BstFirstWord;
153 
155  static const int BstBitSize;
156 
160 
162 
163  static const int GpsTimeFirstBlock;
164  static const int GpsTimeLastBlock;
165 
166  static const int BstMasterStatusFirstBlock;
167  static const int BstMasterStatusLastBlock;
168 
169  static const int TurnCountNumberFirstBlock;
170  static const int TurnCountNumberLastBlock;
171 
172  static const int LhcFillNumberFirstBlock;
173  static const int LhcFillNumberLastBlock;
174 
175  static const int BeamModeFirstBlock;
176  static const int BeamModeLastBlock;
177 
178  static const int ParticleTypeBeam1FirstBlock;
179  static const int ParticleTypeBeam1LastBlock;
180 
181  static const int ParticleTypeBeam2FirstBlock;
182  static const int ParticleTypeBeam2LastBlock;
183 
184  static const int BeamMomentumFirstBlock;
185  static const int BeamMomentumLastBlock;
186 
189 
192 
193  // BST message source written always in the last word of GTFE extended
195 
196  static const int BstSourceShift;
197 
198 
199 
200 private:
201 
203  std::vector<cms_uint16_t> m_bst;
204 
207 
208 };
209 
210 #endif /*L1GlobalTrigger_L1GtfeExtWord_h*/
static const int BstMasterStatusLastBlock
void setBstSource(const cms_uint16_t bstSourceVal)
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
static const cms_uint64_t BstBlockMask
static const int ParticleTypeBeam2LastBlock
static const int TotalIntensityBeam1LastBlock
void reset()
reset 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:74
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:69
static const int ParticleTypeBeam2FirstBlock
bool operator!=(const L1GtfeExtWord &) const
unequal operator
virtual void unpack(const unsigned char *gtfePtr)
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.
virtual ~L1GtfeExtWord()
destructor
static const int BeamModeLastBlock
virtual void print(std::ostream &myCout) const
pretty print the content of a L1GtfeExtWord
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
const cms_uint16_t beamMode() const
static const int BeamModeFirstBlock
const cms_uint16_t particleTypeBeam1() const
static const int LhcFillNumberFirstBlock