Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:15:09

0001 #ifndef EventFilter_L1TRawToDigi_Omtf_RpcDataWord64_H
0002 #define EventFilter_L1TRawToDigi_Omtf_RpcDataWord64_H
0003 
0004 #include <iostream>
0005 #include "DataFormats/L1TMuon/interface/OMTF/OmtfDataWord64.h"
0006 
0007 namespace omtf {
0008 
0009   class RpcDataWord64 {
0010   public:
0011     RpcDataWord64(Word64 data) : rawData(data) {}
0012     RpcDataWord64() : rawData(Word64(DataWord64::rpc) << 60) {}
0013     unsigned int frame1() const { return frame1_; }
0014     unsigned int frame2() const { return frame2_; }
0015     unsigned int frame3() const { return frame3_; }
0016     unsigned int empty() const { return empty_; }
0017     unsigned int linkNum() const { return linkNum_; }
0018     unsigned int bxNum() const { return bxNum_; }
0019     unsigned int type() const { return type_; }
0020     friend class OmtfPacker;
0021     friend class RpcPacker;
0022     friend std::ostream &operator<<(std::ostream &out, const RpcDataWord64 &o);
0023 
0024   private:
0025     union {
0026       uint64_t rawData;
0027       struct {
0028         uint64_t frame3_ : 16;
0029         uint64_t frame2_ : 16;
0030         uint64_t frame1_ : 16;
0031         uint64_t empty_ : 4;
0032         uint64_t linkNum_ : 5;
0033         uint64_t bxNum_ : 3;
0034         uint64_t type_ : 4;
0035       };
0036     };
0037   };
0038 
0039 }  //namespace omtf
0040 
0041 #endif