File indexing completed on 2023-03-17 10:49:33
0001 #ifndef CSCCFEBStatusDigi_CSCCFEBStatusDigi_h
0002 #define CSCCFEBStatusDigi_CSCCFEBStatusDigi_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #include <vector>
0014 #include <iosfwd>
0015 #include <cstdint>
0016
0017 class CSCCFEBStatusDigi {
0018 public:
0019
0020 CSCCFEBStatusDigi(int cfebnmb) { cfebnmb_ = cfebnmb; }
0021
0022
0023 CSCCFEBStatusDigi(int cfebnmb,
0024 const std::vector<uint16_t>& crcWords,
0025 const std::vector<uint16_t>& contrWords,
0026 const std::vector<uint16_t>& bWords) {
0027 cfebnmb_ = cfebnmb;
0028 crcWords_ = crcWords;
0029 contrWords_ = contrWords;
0030 bWords_ = bWords;
0031 }
0032
0033
0034 CSCCFEBStatusDigi() {}
0035
0036
0037 void setCRC(const std::vector<uint16_t>& crc) { crcWords_ = crc; }
0038
0039
0040 void setSCAC(const std::vector<uint16_t>& scac) { contrWords_ = scac; }
0041
0042
0043 int getCFEBNmb() const { return cfebnmb_; }
0044
0045
0046 std::vector<uint16_t> getSCAFullCond() const;
0047
0048
0049 std::vector<uint16_t> getCRC() const { return crcWords_; }
0050
0051
0052 int ShiftSel(int nmb, int nshift, int nsel) const;
0053
0054
0055 std::vector<int> getTS_FLAG() const;
0056
0057
0058 std::vector<int> getSCA_FULL() const;
0059
0060
0061 std::vector<int> getLCT_PHASE() const;
0062
0063
0064 std::vector<int> getL1A_PHASE() const;
0065
0066
0067 std::vector<int> getSCA_BLK() const;
0068
0069
0070 std::vector<int> getTRIG_TIME() const;
0071
0072
0073 void print() const;
0074
0075 private:
0076 uint16_t cfebnmb_;
0077 std::vector<uint16_t> crcWords_;
0078 std::vector<uint16_t> contrWords_;
0079 std::vector<uint16_t> bWords_;
0080 };
0081
0082 std::ostream& operator<<(std::ostream& o, const CSCCFEBStatusDigi& digi);
0083
0084 #endif