CMS 3D CMS Logo

GMTCollections.h
Go to the documentation of this file.
1 #ifndef GMTCollections_h
2 #define GMTCollections_h
3 
6 
7 #include "L1TObjectCollections.h"
8 
9 #include <array>
10 
11 namespace l1t {
12  namespace stage2 {
14  public:
15  // If the zero suppression deletes all the blocks used to
16  // fill a collection the BX range cannot be determined.
17  // Set default values here to then create an empty collection
18  // with a defined BX range.
20  edm::Event& e, const int iFirstBx = -2, const int iLastBx = 2, const int oFirstBx = -2, const int oLastBx = 2)
22  regionalMuonCandsBMTF_(std::make_unique<RegionalMuonCandBxCollection>(0, iFirstBx, iLastBx)),
23  regionalMuonCandsOMTF_(std::make_unique<RegionalMuonCandBxCollection>(0, iFirstBx, iLastBx)),
24  regionalMuonCandsEMTF_(std::make_unique<RegionalMuonCandBxCollection>(0, iFirstBx, iLastBx)),
25  muons_(),
26  imdMuonsBMTF_(std::make_unique<MuonBxCollection>(0, oFirstBx, oLastBx)),
27  imdMuonsEMTFNeg_(std::make_unique<MuonBxCollection>(0, oFirstBx, oLastBx)),
28  imdMuonsEMTFPos_(std::make_unique<MuonBxCollection>(0, oFirstBx, oLastBx)),
29  imdMuonsOMTFNeg_(std::make_unique<MuonBxCollection>(0, oFirstBx, oLastBx)),
30  imdMuonsOMTFPos_(std::make_unique<MuonBxCollection>(0, oFirstBx, oLastBx)) {
31  std::generate(muons_.begin(), muons_.end(), [&oFirstBx, &oLastBx] {
32  return std::make_unique<MuonBxCollection>(0, oFirstBx, oLastBx);
33  });
34  };
35 
36  ~GMTCollections() override;
37 
41  inline MuonBxCollection* getMuons(const unsigned int copy) override { return muons_[copy].get(); };
42  inline MuonBxCollection* getImdMuonsBMTF() { return imdMuonsBMTF_.get(); };
47 
48  private:
49  std::unique_ptr<RegionalMuonCandBxCollection> regionalMuonCandsBMTF_;
50  std::unique_ptr<RegionalMuonCandBxCollection> regionalMuonCandsOMTF_;
51  std::unique_ptr<RegionalMuonCandBxCollection> regionalMuonCandsEMTF_;
52  std::array<std::unique_ptr<MuonBxCollection>, 6> muons_;
53  std::unique_ptr<MuonBxCollection> imdMuonsBMTF_;
54  std::unique_ptr<MuonBxCollection> imdMuonsEMTFNeg_;
55  std::unique_ptr<MuonBxCollection> imdMuonsEMTFPos_;
56  std::unique_ptr<MuonBxCollection> imdMuonsOMTFNeg_;
57  std::unique_ptr<MuonBxCollection> imdMuonsOMTFPos_;
58  };
59  } // namespace stage2
60 } // namespace l1t
61 
62 #endif
MuonBxCollection * getImdMuonsEMTFNeg()
MuonBxCollection * getImdMuonsOMTFNeg()
std::unique_ptr< MuonBxCollection > imdMuonsOMTFNeg_
std::unique_ptr< RegionalMuonCandBxCollection > regionalMuonCandsOMTF_
std::unique_ptr< RegionalMuonCandBxCollection > regionalMuonCandsEMTF_
RegionalMuonCandBxCollection * getRegionalMuonCandsBMTF()
RegionalMuonCandBxCollection * getRegionalMuonCandsEMTF()
delete x;
Definition: CaloConfig.h:22
def generate(map_blobs=False, class_name=None)
Definition: models.py:189
std::unique_ptr< MuonBxCollection > imdMuonsEMTFNeg_
MuonBxCollection * getMuons(const unsigned int copy) override
std::array< std::unique_ptr< MuonBxCollection >, 6 > muons_
std::unique_ptr< RegionalMuonCandBxCollection > regionalMuonCandsBMTF_
GMTCollections(edm::Event &e, const int iFirstBx=-2, const int iLastBx=2, const int oFirstBx=-2, const int oLastBx=2)
RegionalMuonCandBxCollection * getRegionalMuonCandsOMTF()
MuonBxCollection * getImdMuonsOMTFPos()
std::unique_ptr< MuonBxCollection > imdMuonsOMTFPos_
MuonBxCollection * getImdMuonsBMTF()
MuonBxCollection * getImdMuonsEMTFPos()
std::unique_ptr< MuonBxCollection > imdMuonsBMTF_
std::unique_ptr< MuonBxCollection > imdMuonsEMTFPos_