Go to the documentation of this file.00001 #ifndef L1GlobalTrigger_L1GtfeExtWord_h
00002 #define L1GlobalTrigger_L1GtfeExtWord_h
00003
00020
00021 #include <vector>
00022 #include <iosfwd>
00023
00024
00025 #include "FWCore/Utilities/interface/typedefs.h"
00026
00027
00028 #include "DataFormats/L1GlobalTrigger/interface/L1GtfeWord.h"
00029
00030
00031
00032
00033 class L1GtfeExtWord : public L1GtfeWord
00034 {
00035
00036 public:
00037
00039 L1GtfeExtWord();
00040
00042 L1GtfeExtWord(int bstSizeBytes);
00043
00045 L1GtfeExtWord(
00046 cms_uint16_t boardIdValue,
00047 cms_uint16_t recordLengthValue,
00048 cms_uint16_t recordLength1Value,
00049 cms_uint16_t bxNrValue,
00050 cms_uint32_t setupVersionValue,
00051 cms_uint16_t activeBoardsValue,
00052 cms_uint16_t altNrBxBoardValue,
00053 cms_uint32_t totalTriggerNrValue,
00054 std::vector<cms_uint16_t> bstValue,
00055 cms_uint16_t bstSourceValue
00056 );
00057
00058
00060 virtual ~L1GtfeExtWord();
00061
00063 bool operator==(const L1GtfeExtWord&) const;
00064
00066 bool operator!=(const L1GtfeExtWord&) const;
00067
00068 public:
00069
00071 inline const std::vector<cms_uint16_t>& bst() const {
00072 return m_bst;
00073 }
00074
00076 inline const unsigned int bstLengthBytes() const {
00077 return m_bst.size();
00078 }
00079
00080 public:
00081
00083
00084 const cms_uint64_t gpsTime() const;
00085 void setGpsTime(const cms_uint64_t);
00086
00087 const cms_uint16_t bstMasterStatus() const;
00088 const cms_uint32_t turnCountNumber() const;
00089 const cms_uint32_t lhcFillNumber() const;
00090 const cms_uint16_t beamMode() const;
00091 const cms_uint16_t particleTypeBeam1() const;
00092 const cms_uint16_t particleTypeBeam2() const;
00093 const cms_uint16_t beamMomentum() const;
00094 const cms_uint32_t totalIntensityBeam1() const;
00095 const cms_uint32_t totalIntensityBeam2() const;
00096
00097
00098
00099 public:
00100
00102 const cms_uint16_t bst(int iB) const;
00103 void setBst(const cms_uint16_t bstVal, const int iB);
00104
00106 void setBst(const cms_uint64_t& word64, const int iB);
00107
00110 void setBstWord64(cms_uint64_t& word64, int iB, const int iWord);
00111
00112
00114 inline const cms_uint16_t bstSource() const {
00115 return m_bstSource;
00116 }
00117
00118 inline void setBstSource(const cms_uint16_t bstSourceVal) {
00119 m_bstSource = bstSourceVal;
00120 }
00121
00123 void setBstSource(const cms_uint64_t& word64);
00124
00127 void setBstSourceWord64(cms_uint64_t& word64, const int iWord);
00128
00129 public:
00130
00132 const unsigned int getSize() const;
00133
00134 public:
00135
00137 void resize(int bstSizeBytes);
00138
00140 void reset();
00141
00143 virtual void print(std::ostream& myCout) const;
00144
00147 virtual void unpack(const unsigned char* gtfePtr);
00148
00149 private:
00150
00152
00154 static const int BstFirstWord;
00155
00157 static const int BstBitSize;
00158
00161 static const cms_uint64_t BstBlockMask;
00162
00164
00165 static const int GpsTimeFirstBlock;
00166 static const int GpsTimeLastBlock;
00167
00168 static const int BstMasterStatusFirstBlock;
00169 static const int BstMasterStatusLastBlock;
00170
00171 static const int TurnCountNumberFirstBlock;
00172 static const int TurnCountNumberLastBlock;
00173
00174 static const int LhcFillNumberFirstBlock;
00175 static const int LhcFillNumberLastBlock;
00176
00177 static const int BeamModeFirstBlock;
00178 static const int BeamModeLastBlock;
00179
00180 static const int ParticleTypeBeam1FirstBlock;
00181 static const int ParticleTypeBeam1LastBlock;
00182
00183 static const int ParticleTypeBeam2FirstBlock;
00184 static const int ParticleTypeBeam2LastBlock;
00185
00186 static const int BeamMomentumFirstBlock;
00187 static const int BeamMomentumLastBlock;
00188
00189 static const int TotalIntensityBeam1FirstBlock;
00190 static const int TotalIntensityBeam1LastBlock;
00191
00192 static const int TotalIntensityBeam2FirstBlock;
00193 static const int TotalIntensityBeam2LastBlock;
00194
00195
00196 static const cms_uint64_t BstSourceMask;
00197
00198 static const int BstSourceShift;
00199
00200
00201
00202 private:
00203
00205 std::vector<cms_uint16_t> m_bst;
00206
00208 cms_uint16_t m_bstSource;
00209
00210 };
00211
00212 #endif