CMS 3D CMS Logo

MuonPacker.h
Go to the documentation of this file.
1 #ifndef L1T_PACKER_STAGE2_MUONPACKER_H
2 #define L1T_PACKER_STAGE2_MUONPACKER_H
3 
4 #include <map>
7 
9 
10 namespace l1t {
11  namespace stage2 {
12  class MuonPacker : public Packer {
13  public:
14  MuonPacker(unsigned b1) : b1_(b1) {}
15  Blocks pack(const edm::Event&, const PackerTokens*) override;
16  unsigned b1_;
17  inline void setFwVersion(unsigned fwId) { fwId_ = fwId; };
18  inline void setFed(unsigned fedId) { fedId_ = fedId; };
19 
20  private:
21  struct GMTObjects {
22  std::vector<Muon> mus;
24  };
25  typedef std::map<size_t, GMTObjects> GMTOutputObjectMap; // Map of BX --> objects
26  typedef std::map<unsigned int, std::vector<uint32_t>> PayloadMap;
27 
28  std::pair<int, int> getMuonShowers(GMTOutputObjectMap& objMap,
29  const edm::Event& event,
30  const edm::EDGetTokenT<MuonShowerBxCollection>& showerToken);
31  std::pair<int, int> getMuons(GMTOutputObjectMap& objMap,
32  const edm::Event& event,
34  void packBx(const GMTOutputObjectMap& objMap,
35  int firstMuonBx,
36  int lastMuonBx,
37  int firstMuonShowerBx,
38  int lastMuonShowerBx,
39  PayloadMap& payloadMap);
40 
41  unsigned fwId_{0};
42  unsigned fedId_{0};
43  };
44 
45  class GTMuonPacker : public MuonPacker {
46  public:
48  };
49  class GMTMuonPacker : public MuonPacker {
50  public:
52  };
53  } // namespace stage2
54 } // namespace l1t
55 
56 #endif
weight_default_t b1[25]
Definition: b1.h:9
void setFed(unsigned fedId)
Definition: MuonPacker.h:18
std::pair< int, int > getMuons(GMTOutputObjectMap &objMap, const edm::Event &event, const edm::EDGetTokenT< MuonBxCollection > &muonToken)
Definition: MuonPacker.cc:41
std::map< size_t, GMTObjects > GMTOutputObjectMap
Definition: MuonPacker.h:25
void setFwVersion(unsigned fwId)
Definition: MuonPacker.h:17
std::map< unsigned int, std::vector< uint32_t > > PayloadMap
Definition: MuonPacker.h:26
delete x;
Definition: CaloConfig.h:22
MuonPacker(unsigned b1)
Definition: MuonPacker.h:14
void packBx(const GMTOutputObjectMap &objMap, int firstMuonBx, int lastMuonBx, int firstMuonShowerBx, int lastMuonShowerBx, PayloadMap &payloadMap)
Definition: MuonPacker.cc:55
Blocks pack(const edm::Event &, const PackerTokens *) override
Definition: MuonPacker.cc:8
std::vector< Block > Blocks
Definition: Block.h:99
std::pair< int, int > getMuonShowers(GMTOutputObjectMap &objMap, const edm::Event &event, const edm::EDGetTokenT< MuonShowerBxCollection > &showerToken)
Definition: MuonPacker.cc:28
Definition: event.py:1