CMS 3D CMS Logo

RegionalMuonGMTPacker.h
Go to the documentation of this file.
1 #ifndef L1T_PACKER_STAGE2_REGIONALMUONGMTPACKER_H
2 #define L1T_PACKER_STAGE2_REGIONALMUONGMTPACKER_H
3 
4 #include <vector>
5 #include <map>
11 
12 namespace l1t {
13  namespace stage2 {
14  class RegionalMuonGMTPacker : public Packer {
15  public:
16  Blocks pack(const edm::Event&, const PackerTokens*) override;
17  void setIsKbmtf() { isKbmtf_ = true; };
19  void setUseEmtfShowers() { useEmtfShowers_ = true; };
20 
21  private:
22  struct GMTObjects {
23  std::vector<RegionalMuonCand> mus;
25  };
26  typedef std::map<size_t, std::map<size_t, GMTObjects>> GMTObjectMap; // Map of BX --> linkID --> objects
27  typedef std::map<unsigned int, std::vector<uint32_t>> PayloadMap;
28  void packTF(const GMTObjectMap& objMap,
29  int firstMuonBx,
30  int lastMuonBx,
31  int firstMuonShowerBx,
32  int lastMuonShowerBx,
33  Blocks&);
34  std::pair<int, int> getMuons(GMTObjectMap& objMap,
35  const edm::Event& event,
37  std::pair<int, int> getMuonShowers(GMTObjectMap& objMap,
38  const edm::Event& event,
40 
41  static constexpr size_t wordsPerBx_ = 6; // number of 32 bit words per BX
42 
43  bool isKbmtf_{false};
45  bool useEmtfShowers_{false};
46  };
47  } // namespace stage2
48 } // namespace l1t
49 
50 #endif
std::pair< int, int > getMuons(GMTObjectMap &objMap, const edm::Event &event, const edm::EDGetTokenT< RegionalMuonCandBxCollection > &tfToken)
std::map< unsigned int, std::vector< uint32_t > > PayloadMap
delete x;
Definition: CaloConfig.h:22
void packTF(const GMTObjectMap &objMap, int firstMuonBx, int lastMuonBx, int firstMuonShowerBx, int lastMuonShowerBx, Blocks &)
std::vector< Block > Blocks
Definition: Block.h:99
std::pair< int, int > getMuonShowers(GMTObjectMap &objMap, const edm::Event &event, const edm::EDGetTokenT< RegionalMuonShowerBxCollection > &tfShowerToken)
std::map< size_t, std::map< size_t, GMTObjects > > GMTObjectMap
Blocks pack(const edm::Event &, const PackerTokens *) override
Definition: event.py:1