CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1GtfeExtWord.h
Go to the documentation of this file.
1 #ifndef L1GlobalTrigger_L1GtfeExtWord_h
2 #define L1GlobalTrigger_L1GtfeExtWord_h
3 
20 // system include files
21 #include <vector>
22 #include <iosfwd>
23 
24 // user include files
26 
27 // base class
29 
30 // forward declarations
31 
32 // class declaration
33 class L1GtfeExtWord : public L1GtfeWord
34 {
35 
36 public:
37 
39  L1GtfeExtWord(); // empty constructor, all members set to zero;
40 
42  L1GtfeExtWord(int bstSizeBytes);
43 
46  cms_uint16_t boardIdValue,
47  cms_uint16_t recordLengthValue,
48  cms_uint16_t recordLength1Value,
49  cms_uint16_t bxNrValue,
50  cms_uint32_t setupVersionValue,
51  cms_uint16_t activeBoardsValue,
52  cms_uint16_t altNrBxBoardValue,
53  cms_uint32_t totalTriggerNrValue, // end of L1GtfeWord
54  std::vector<cms_uint16_t> bstValue,
55  cms_uint16_t bstSourceValue
56  );
57 
58 
60  virtual ~L1GtfeExtWord();
61 
63  bool operator==(const L1GtfeExtWord&) const;
64 
66  bool operator!=(const L1GtfeExtWord&) const;
67 
68 public:
69 
71  inline const std::vector<cms_uint16_t>& bst() const {
72  return m_bst;
73  }
74 
76  inline const unsigned int bstLengthBytes() const {
77  return m_bst.size();
78  }
79 
80 public:
81 
83 
84  const cms_uint64_t gpsTime() const;
85  void setGpsTime(const cms_uint64_t);
86 
87  const cms_uint16_t bstMasterStatus() const;
88  const cms_uint32_t turnCountNumber() const;
89  const cms_uint32_t lhcFillNumber() const;
90  const cms_uint16_t beamMode() const;
91  const cms_uint16_t particleTypeBeam1() const;
92  const cms_uint16_t particleTypeBeam2() const;
93  const cms_uint16_t beamMomentum() const;
94  const cms_uint32_t totalIntensityBeam1() const;
95  const cms_uint32_t totalIntensityBeam2() const;
96 
97 
98 
99 public:
100 
102  const cms_uint16_t bst(int iB) const;
103  void setBst(const cms_uint16_t bstVal, const int iB);
104 
106  void setBst(const cms_uint64_t& word64, const int iB);
107 
110  void setBstWord64(cms_uint64_t& word64, int iB, const int iWord);
111 
112 
114  inline const cms_uint16_t bstSource() const {
115  return m_bstSource;
116  }
117 
118  inline void setBstSource(const cms_uint16_t bstSourceVal) {
119  m_bstSource = bstSourceVal;
120  }
121 
123  void setBstSource(const cms_uint64_t& word64);
124 
127  void setBstSourceWord64(cms_uint64_t& word64, const int iWord);
128 
129 public:
130 
132  const unsigned int getSize() const;
133 
134 public:
135 
137  void resize(int bstSizeBytes);
138 
140  void reset();
141 
143  virtual void print(std::ostream& myCout) const;
144 
147  virtual void unpack(const unsigned char* gtfePtr);
148 
149 private:
150 
152 
154  static const int BstFirstWord;
155 
157  static const int BstBitSize;
158 
162 
164 
165  static const int GpsTimeFirstBlock;
166  static const int GpsTimeLastBlock;
167 
168  static const int BstMasterStatusFirstBlock;
169  static const int BstMasterStatusLastBlock;
170 
171  static const int TurnCountNumberFirstBlock;
172  static const int TurnCountNumberLastBlock;
173 
174  static const int LhcFillNumberFirstBlock;
175  static const int LhcFillNumberLastBlock;
176 
177  static const int BeamModeFirstBlock;
178  static const int BeamModeLastBlock;
179 
180  static const int ParticleTypeBeam1FirstBlock;
181  static const int ParticleTypeBeam1LastBlock;
182 
183  static const int ParticleTypeBeam2FirstBlock;
184  static const int ParticleTypeBeam2LastBlock;
185 
186  static const int BeamMomentumFirstBlock;
187  static const int BeamMomentumLastBlock;
188 
191 
194 
195  // BST message source written always in the last word of GTFE extended
197 
198  static const int BstSourceShift;
199 
200 
201 
202 private:
203 
205  std::vector<cms_uint16_t> m_bst;
206 
209 
210 };
211 
212 #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:76
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:71
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