Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 09:45:37

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(zdcsums_.begin(), zdcsums_.end(), [] { return std::make_unique<EtSumBxCollection>(); });
0028         std::generate(jets_.begin(), jets_.end(), [] { return std::make_unique<JetBxCollection>(); });
0029         std::generate(taus_.begin(), taus_.end(), [] { return std::make_unique<TauBxCollection>(); });
0030       };
0031 
0032       ~GTCollections() override;
0033 
0034       inline MuonBxCollection* getMuons(const unsigned int copy) override { return muons_[copy].get(); };
0035       inline MuonShowerBxCollection* getMuonShowers(const unsigned int copy) override {
0036         return muonShowers_[copy].get();
0037       };
0038       inline EGammaBxCollection* getEGammas(const unsigned int copy) override { return egammas_[copy].get(); };
0039       inline EtSumBxCollection* getEtSums(const unsigned int copy) override { return etsums_[copy].get(); };
0040       inline EtSumBxCollection* getZDCSums(const unsigned int copy) override { return zdcsums_[copy].get(); };
0041       inline JetBxCollection* getJets(const unsigned int copy) override { return jets_[copy].get(); };
0042       inline TauBxCollection* getTaus(const unsigned int copy) override { return taus_[copy].get(); };
0043 
0044       inline GlobalAlgBlkBxCollection* getAlgs() { return algBlk_.get(); };
0045       inline GlobalExtBlkBxCollection* getExts() { return extBlk_.get(); };
0046 
0047     private:
0048       std::array<std::unique_ptr<MuonBxCollection>, 6> muons_;
0049       std::array<std::unique_ptr<MuonShowerBxCollection>, 6> muonShowers_;
0050       std::array<std::unique_ptr<EGammaBxCollection>, 6> egammas_;
0051       std::array<std::unique_ptr<EtSumBxCollection>, 6> etsums_;
0052       std::array<std::unique_ptr<EtSumBxCollection>, 6> zdcsums_;
0053       std::array<std::unique_ptr<JetBxCollection>, 6> jets_;
0054       std::array<std::unique_ptr<TauBxCollection>, 6> taus_;
0055 
0056       std::unique_ptr<GlobalAlgBlkBxCollection> algBlk_;
0057       std::unique_ptr<GlobalExtBlkBxCollection> extBlk_;
0058     };
0059   }  // namespace stage2
0060 }  // namespace l1t
0061 
0062 #endif