File indexing completed on 2024-04-06 12:04:33
0001 #ifndef DataFormat_L1TMuon_Omtf_CscDataWord64_H
0002 #define DataFormat_L1TMuon_Omtf_CscDataWord64_H
0003
0004 #include <iostream>
0005 #include "DataFormats/L1TMuon/interface/OMTF/OmtfDataWord64.h"
0006
0007 namespace omtf {
0008
0009 class CscDataWord64 {
0010 public:
0011 CscDataWord64(const Word64 &data) : rawData(data) {}
0012 CscDataWord64() : rawData(Word64(DataWord64::csc) << 60) {}
0013
0014 unsigned int type() const { return type_; }
0015 unsigned int bxNum() const { return bxNum_; }
0016 unsigned int hitNum() const { return hitNum_; }
0017 unsigned int wireGroup() const { return keyWG_; }
0018 unsigned int quality() const { return quality_; }
0019 unsigned int clctPattern() const { return clctPattern_; }
0020 unsigned int cscID() const { return cscID_; }
0021 unsigned int halfStrip() const { return halfStrip_; }
0022 unsigned int linkNum() const { return linkNum_; }
0023 unsigned int station() const { return station_; }
0024 unsigned int bend() const { return lr_; }
0025 unsigned int valid() const { return vp_; }
0026
0027 friend class OmtfPacker;
0028 friend class CscPacker;
0029 friend std::ostream &operator<<(std::ostream &out, const CscDataWord64 &o);
0030
0031 private:
0032 union {
0033 uint64_t rawData;
0034 struct {
0035 uint64_t dummy7_ : 3;
0036 uint64_t vp_ : 1;
0037 uint64_t station_ : 3;
0038 uint64_t af_ : 1;
0039 uint64_t dummy6_ : 4;
0040 uint64_t sm_ : 1;
0041 uint64_t se_ : 1;
0042 uint64_t dummy5_ : 1;
0043 uint64_t dummy4_ : 2;
0044 uint64_t nit_ : 1;
0045 uint64_t cik_ : 1;
0046 uint64_t dummy3_ : 1;
0047 uint64_t linkNum_ : 6;
0048 uint64_t halfStrip_ : 8;
0049 uint64_t cscID_ : 4;
0050 uint64_t lr_ : 1;
0051 uint64_t dummy2_ : 1;
0052 uint64_t dummy1_ : 1;
0053 uint64_t clctPattern_ : 4;
0054 uint64_t quality_ : 4;
0055 uint64_t keyWG_ : 7;
0056 uint64_t hitNum_ : 1;
0057 uint64_t bxNum_ : 3;
0058 uint64_t type_ : 4;
0059 };
0060 };
0061 };
0062
0063 }
0064 #endif