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.
19  GMTCollections(edm::Event& e, const int iFirstBx=-2, const int iLastBx=2, const int oFirstBx=-2, const int oLastBx=2) :
21  regionalMuonCandsBMTF_(std::make_unique<RegionalMuonCandBxCollection>(0, iFirstBx, iLastBx)),
22  regionalMuonCandsOMTF_(std::make_unique<RegionalMuonCandBxCollection>(0, iFirstBx, iLastBx)),
23  regionalMuonCandsEMTF_(std::make_unique<RegionalMuonCandBxCollection>(0, iFirstBx, iLastBx)),
24  muons_(),
25  imdMuonsBMTF_(std::make_unique<MuonBxCollection>(0, oFirstBx, oLastBx)),
26  imdMuonsEMTFNeg_(std::make_unique<MuonBxCollection>(0, oFirstBx, oLastBx)),
27  imdMuonsEMTFPos_(std::make_unique<MuonBxCollection>(0, oFirstBx, oLastBx)),
28  imdMuonsOMTFNeg_(std::make_unique<MuonBxCollection>(0, oFirstBx, oLastBx)),
29  imdMuonsOMTFPos_(std::make_unique<MuonBxCollection>(0, oFirstBx, oLastBx))
30  {
31  std::generate(muons_.begin(), muons_.end(), [&oFirstBx, &oLastBx]{ return std::make_unique<MuonBxCollection>(0, oFirstBx, oLastBx); });
32  };
33 
34  ~GMTCollections() override;
35 
39  inline MuonBxCollection* getMuons(const unsigned int copy) override { return muons_[copy].get(); };
40  inline MuonBxCollection* getImdMuonsBMTF() { return imdMuonsBMTF_.get(); };
45 
46  private:
47  std::unique_ptr<RegionalMuonCandBxCollection> regionalMuonCandsBMTF_;
48  std::unique_ptr<RegionalMuonCandBxCollection> regionalMuonCandsOMTF_;
49  std::unique_ptr<RegionalMuonCandBxCollection> regionalMuonCandsEMTF_;
50  std::array<std::unique_ptr<MuonBxCollection>, 6> muons_;
51  std::unique_ptr<MuonBxCollection> imdMuonsBMTF_;
52  std::unique_ptr<MuonBxCollection> imdMuonsEMTFNeg_;
53  std::unique_ptr<MuonBxCollection> imdMuonsEMTFPos_;
54  std::unique_ptr<MuonBxCollection> imdMuonsOMTFNeg_;
55  std::unique_ptr<MuonBxCollection> imdMuonsOMTFPos_;
56  };
57  }
58 }
59 
60 #endif
MuonBxCollection * getImdMuonsEMTFNeg()
MuonBxCollection * getImdMuonsOMTFNeg()
std::unique_ptr< MuonBxCollection > imdMuonsOMTFNeg_
std::unique_ptr< RegionalMuonCandBxCollection > regionalMuonCandsOMTF_
def copy(args, dbName)
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:188
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_