File indexing completed on 2024-04-06 12:04:28
0001 #ifndef L1GlobalTrigger_L1GtfeExtWord_h
0002 #define L1GlobalTrigger_L1GtfeExtWord_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019 #include <vector>
0020 #include <iosfwd>
0021
0022
0023 #include "FWCore/Utilities/interface/typedefs.h"
0024
0025
0026 #include "DataFormats/L1GlobalTrigger/interface/L1GtfeWord.h"
0027
0028
0029
0030
0031 class L1GtfeExtWord : public L1GtfeWord {
0032 public:
0033
0034 L1GtfeExtWord();
0035
0036
0037 L1GtfeExtWord(int bstSizeBytes);
0038
0039
0040 L1GtfeExtWord(cms_uint16_t boardIdValue,
0041 cms_uint16_t recordLengthValue,
0042 cms_uint16_t recordLength1Value,
0043 cms_uint16_t bxNrValue,
0044 cms_uint32_t setupVersionValue,
0045 cms_uint16_t activeBoardsValue,
0046 cms_uint16_t altNrBxBoardValue,
0047 cms_uint32_t totalTriggerNrValue,
0048 const std::vector<cms_uint16_t>& bstValue,
0049 cms_uint16_t bstSourceValue);
0050
0051
0052 ~L1GtfeExtWord() override;
0053
0054
0055 bool operator==(const L1GtfeExtWord&) const;
0056
0057
0058 bool operator!=(const L1GtfeExtWord&) const;
0059
0060 public:
0061
0062 inline const std::vector<cms_uint16_t>& bst() const { return m_bst; }
0063
0064
0065 inline const unsigned int bstLengthBytes() const { return m_bst.size(); }
0066
0067 public:
0068
0069
0070 const cms_uint64_t gpsTime() const;
0071 void setGpsTime(const cms_uint64_t);
0072
0073 const cms_uint16_t bstMasterStatus() const;
0074 const cms_uint32_t turnCountNumber() const;
0075 const cms_uint32_t lhcFillNumber() const;
0076 const cms_uint16_t beamMode() const;
0077 const cms_uint16_t particleTypeBeam1() const;
0078 const cms_uint16_t particleTypeBeam2() const;
0079 const cms_uint16_t beamMomentum() const;
0080 const cms_uint32_t totalIntensityBeam1() const;
0081 const cms_uint32_t totalIntensityBeam2() const;
0082
0083 public:
0084
0085 const cms_uint16_t bst(int iB) const;
0086 void setBst(const cms_uint16_t bstVal, const int iB);
0087
0088
0089 void setBst(const cms_uint64_t& word64, const int iB);
0090
0091
0092
0093 void setBstWord64(cms_uint64_t& word64, int iB, const int iWord);
0094
0095
0096 inline const cms_uint16_t bstSource() const { return m_bstSource; }
0097
0098 inline void setBstSource(const cms_uint16_t bstSourceVal) { m_bstSource = bstSourceVal; }
0099
0100
0101 void setBstSource(const cms_uint64_t& word64);
0102
0103
0104
0105 void setBstSourceWord64(cms_uint64_t& word64, const int iWord);
0106
0107 public:
0108
0109 const unsigned int getSize() const;
0110
0111 public:
0112
0113 void resize(int bstSizeBytes);
0114
0115
0116 void reset() override;
0117
0118
0119 void print(std::ostream& myCout) const override;
0120
0121
0122
0123 void unpack(const unsigned char* gtfePtr) override;
0124
0125 private:
0126
0127
0128
0129 static const int BstFirstWord;
0130
0131
0132 static const int BstBitSize;
0133
0134
0135
0136 static const cms_uint64_t BstBlockMask;
0137
0138
0139
0140 static const int GpsTimeFirstBlock;
0141 static const int GpsTimeLastBlock;
0142
0143 static const int BstMasterStatusFirstBlock;
0144 static const int BstMasterStatusLastBlock;
0145
0146 static const int TurnCountNumberFirstBlock;
0147 static const int TurnCountNumberLastBlock;
0148
0149 static const int LhcFillNumberFirstBlock;
0150 static const int LhcFillNumberLastBlock;
0151
0152 static const int BeamModeFirstBlock;
0153 static const int BeamModeLastBlock;
0154
0155 static const int ParticleTypeBeam1FirstBlock;
0156 static const int ParticleTypeBeam1LastBlock;
0157
0158 static const int ParticleTypeBeam2FirstBlock;
0159 static const int ParticleTypeBeam2LastBlock;
0160
0161 static const int BeamMomentumFirstBlock;
0162 static const int BeamMomentumLastBlock;
0163
0164 static const int TotalIntensityBeam1FirstBlock;
0165 static const int TotalIntensityBeam1LastBlock;
0166
0167 static const int TotalIntensityBeam2FirstBlock;
0168 static const int TotalIntensityBeam2LastBlock;
0169
0170
0171 static const cms_uint64_t BstSourceMask;
0172
0173 static const int BstSourceShift;
0174
0175 private:
0176
0177 std::vector<cms_uint16_t> m_bst;
0178
0179
0180 cms_uint16_t m_bstSource;
0181 };
0182
0183 #endif