CMS 3D CMS Logo

CSCCFEBStatusDigi.h
Go to the documentation of this file.
1 #ifndef CSCCFEBStatusDigi_CSCCFEBStatusDigi_h
2 #define CSCCFEBStatusDigi_CSCCFEBStatusDigi_h
3 
13 #include <vector>
14 #include <iosfwd>
15 #include <cstdint>
16 
18 public:
20  CSCCFEBStatusDigi(int cfebnmb) { cfebnmb_ = cfebnmb; }
21 
23  CSCCFEBStatusDigi(int cfebnmb,
24  const std::vector<uint16_t>& crcWords,
25  const std::vector<uint16_t>& contrWords,
26  const std::vector<uint16_t>& bWords) {
27  cfebnmb_ = cfebnmb;
28  crcWords_ = crcWords;
29  contrWords_ = contrWords;
30  bWords_ = bWords;
31  }
32 
35 
37  void setCRC(const std::vector<uint16_t>& crc) { crcWords_ = crc; }
38 
40  void setSCAC(const std::vector<uint16_t>& scac) { contrWords_ = scac; }
41 
43  int getCFEBNmb() const { return cfebnmb_; }
44 
46  std::vector<uint16_t> getSCAFullCond() const;
47 
49  std::vector<uint16_t> getCRC() const { return crcWords_; }
50 
52  int ShiftSel(int nmb, int nshift, int nsel) const;
53 
55  std::vector<int> getTS_FLAG() const;
56 
58  std::vector<int> getSCA_FULL() const;
59 
61  std::vector<int> getLCT_PHASE() const;
62 
64  std::vector<int> getL1A_PHASE() const;
65 
67  std::vector<int> getSCA_BLK() const;
68 
70  std::vector<int> getTRIG_TIME() const;
71 
73  void print() const;
74 
75 private:
76  uint16_t cfebnmb_;
77  std::vector<uint16_t> crcWords_;
78  std::vector<uint16_t> contrWords_;
79  std::vector<uint16_t> bWords_;
80 };
81 
82 std::ostream& operator<<(std::ostream& o, const CSCCFEBStatusDigi& digi);
83 
84 #endif
CSCCFEBStatusDigi(int cfebnmb, const std::vector< uint16_t > &crcWords, const std::vector< uint16_t > &contrWords, const std::vector< uint16_t > &bWords)
Constructor for all variables.
std::ostream & operator<<(std::ostream &o, const CSCCFEBStatusDigi &digi)
std::vector< int > getSCA_FULL() const
Get SCA_FULL bit from SCA Controller data per each time slice.
std::vector< uint16_t > getCRC() const
Get CRC per each time sample.
int ShiftSel(int nmb, int nshift, int nsel) const
Shift and select.
CSCCFEBStatusDigi()
Default construction.
CSCCFEBStatusDigi(int cfebnmb)
Construct from the CFEB number (1-5).
void setCRC(const std::vector< uint16_t > &crc)
Set CRC vector.
std::vector< int > getLCT_PHASE() const
Get LCT_PHASE bit from SCA Controller data per each time slice.
std::vector< int > getTS_FLAG() const
Get TS_FLAG bit from SCA Controller data per each time slice.
void setSCAC(const std::vector< uint16_t > &scac)
Set SCAC (SCA Controller) vector.
void print() const
Print content of digi.
std::vector< int > getL1A_PHASE() const
Get L1A_PHASE bit from SCA Controller data per each time slice.
std::vector< int > getSCA_BLK() const
Get SCA_BLK 4 bit word from SCA Controller data per each time slice.
std::vector< int > getTRIG_TIME() const
Get TRIG_TIME 8 bit word from SCA Controller data per each time slice.
std::vector< uint16_t > crcWords_
std::vector< uint16_t > contrWords_
std::vector< uint16_t > bWords_
std::vector< uint16_t > getSCAFullCond() const
Get SCA Full Condition.
int getCFEBNmb() const
Get the CFEB number.