Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-02-08 06:27:53

0001 #ifndef L1T_PACKER_STAGE2_MUONUNPACKER_H
0002 #define L1T_PACKER_STAGE2_MUONUNPACKER_H
0003 
0004 #include "EventFilter/L1TRawToDigi/interface/Unpacker.h"
0005 #include "EventFilter/L1TRawToDigi/interface/Block.h"
0006 #include "L1TObjectCollections.h"
0007 
0008 namespace l1t {
0009   namespace stage2 {
0010     class MuonUnpacker : public Unpacker {
0011     public:
0012       MuonUnpacker();
0013       ~MuonUnpacker() override{};
0014 
0015       bool unpack(const Block& block, UnpackerCollections* coll) override;
0016 
0017       inline int getFedNumber() { return fed_; };
0018       inline unsigned int getMuonCopy() { return muonCopy_; };
0019 
0020       inline void setFedNumber(const int fed) { fed_ = fed; };
0021       inline void setMuonCopy(const unsigned int copy) { muonCopy_ = copy; };
0022 
0023     private:
0024       static constexpr unsigned nWords_ = 6;  // every link transmits 6 words (3 muons) per bx
0025       static constexpr unsigned bxzs_enable_shift_ = 1;
0026 
0027       MuonBxCollection* muonCollection_;
0028       MuonShowerBxCollection* muonShowerCollection_;
0029       int fed_;
0030       unsigned int muonCopy_;
0031 
0032       void unpackBx(int bx, const std::vector<uint32_t>& payload, unsigned int blockID, unsigned int startIdx = 0);
0033     };
0034   }  // namespace stage2
0035 }  // namespace l1t
0036 
0037 #endif