Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef GTCollections_h
0002 #define GTCollections_h
0003 
0004 #include "DataFormats/L1Trigger/interface/EGamma.h"
0005 #include "DataFormats/L1Trigger/interface/EtSum.h"
0006 #include "DataFormats/L1Trigger/interface/Jet.h"
0007 #include "DataFormats/L1Trigger/interface/Tau.h"
0008 #include "DataFormats/L1Trigger/interface/Muon.h"
0009 
0010 #include "DataFormats/L1TGlobal/interface/GlobalAlgBlk.h"
0011 #include "DataFormats/L1TGlobal/interface/GlobalExtBlk.h"
0012 
0013 //#include "EventFilter/L1TRawToDigi/interface/UnpackerCollections.h"
0014 #include "L1TObjectCollections.h"
0015 
0016 namespace l1t {
0017   namespace stage2 {
0018     class GTCollections : public L1TObjectCollections {
0019     public:
0020       GTCollections(edm::Event& e)
0021           : L1TObjectCollections(e), algBlk_(new GlobalAlgBlkBxCollection()), extBlk_(new GlobalExtBlkBxCollection()) {
0022         std::generate(muons_.begin(), muons_.end(), [] { return std::make_unique<MuonBxCollection>(); });
0023         std::generate(
0024             muonShowers_.begin(), muonShowers_.end(), [] { return std::make_unique<MuonShowerBxCollection>(); });
0025         std::generate(egammas_.begin(), egammas_.end(), [] { return std::make_unique<EGammaBxCollection>(); });
0026         std::generate(etsums_.begin(), etsums_.end(), [] { return std::make_unique<EtSumBxCollection>(); });
0027         std::generate(jets_.begin(), jets_.end(), [] { return std::make_unique<JetBxCollection>(); });
0028         std::generate(taus_.begin(), taus_.end(), [] { return std::make_unique<TauBxCollection>(); });
0029       };
0030 
0031       ~GTCollections() override;
0032 
0033       inline MuonBxCollection* getMuons(const unsigned int copy) override { return muons_[copy].get(); };
0034       inline MuonShowerBxCollection* getMuonShowers(const unsigned int copy) override {
0035         return muonShowers_[copy].get();
0036       };
0037       inline EGammaBxCollection* getEGammas(const unsigned int copy) override { return egammas_[copy].get(); };
0038       inline EtSumBxCollection* getEtSums(const unsigned int copy) override { return etsums_[copy].get(); };
0039       inline JetBxCollection* getJets(const unsigned int copy) override { return jets_[copy].get(); };
0040       inline TauBxCollection* getTaus(const unsigned int copy) override { return taus_[copy].get(); };
0041 
0042       inline GlobalAlgBlkBxCollection* getAlgs() { return algBlk_.get(); };
0043       inline GlobalExtBlkBxCollection* getExts() { return extBlk_.get(); };
0044 
0045     private:
0046       std::array<std::unique_ptr<MuonBxCollection>, 6> muons_;
0047       std::array<std::unique_ptr<MuonShowerBxCollection>, 6> muonShowers_;
0048       std::array<std::unique_ptr<EGammaBxCollection>, 6> egammas_;
0049       std::array<std::unique_ptr<EtSumBxCollection>, 6> etsums_;
0050       std::array<std::unique_ptr<JetBxCollection>, 6> jets_;
0051       std::array<std::unique_ptr<TauBxCollection>, 6> taus_;
0052 
0053       std::unique_ptr<GlobalAlgBlkBxCollection> algBlk_;
0054       std::unique_ptr<GlobalExtBlkBxCollection> extBlk_;
0055     };
0056   }  // namespace stage2
0057 }  // namespace l1t
0058 
0059 #endif