Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:13:18

0001 #ifndef DQMOFFLINE_TRIGGER_EGHLTOFFEVT
0002 #define DQMOFFLINE_TRIGGER_EGHLTOFFEVT
0003 
0004 //struct: EgHLTOffData (Egamma HLT Offline Data)
0005 //
0006 //author: Sam Harper (July 2008)
0007 //
0008 //WARNING: interface is NOT final, please dont use this class for now without clearing it with me
0009 //         as I will change it and possibly break all your code
0010 //
0011 //aim: this is a simple struct which allows all the data needed by the egamma offline HLT DQM  code to be passed in as single object
0012 //     this includes the TriggerEvent handle and the vector of EgHLTOffEle at the moment
0013 //
0014 //implimentation:
0015 //
0016 //
0017 
0018 #include <utility>
0019 
0020 #include "DQMOffline/Trigger/interface/EgHLTOffEle.h"
0021 #include "DQMOffline/Trigger/interface/EgHLTOffPho.h"
0022 
0023 #include "DataFormats/Common/interface/Handle.h"
0024 #include "DataFormats/HLTReco/interface/TriggerEvent.h"
0025 #include "DataFormats/JetReco/interface/CaloJetCollection.h"
0026 
0027 namespace egHLT {
0028   //we own nothing....
0029   class OffEvt {
0030   private:
0031     //edm::Handle<trigger::TriggerEvent> trigEvt_;
0032     edm::Handle<std::vector<reco::CaloJet> > jets_;
0033 
0034     std::vector<OffEle>
0035         eles_;  //egHLT::OffEle is lightweightish and handles copying okay hence it isnt a vector of pointers
0036     std::vector<OffPho>
0037         phos_;  //egHLT::OffPho is lightweightish and handles copying okay hence it isnt a vector of pointers
0038     //const std::vector<reco::CaloJet>* jets_;
0039 
0040     TrigCodes::TrigBitSet evtTrigBits_;  //the triggers that fired in the event all in a handy bit set
0041 
0042   public:
0043     OffEvt() = default;
0044     ~OffEvt() = default;
0045 
0046     //accessors
0047     //    const trigger::TriggerEvent& trigEvt()const{return *trigEvt_.product();}
0048     const std::vector<OffEle>& eles() const { return eles_; }
0049     std::vector<OffEle>& eles() { return eles_; }
0050     const std::vector<OffPho>& phos() const { return phos_; }
0051     std::vector<OffPho>& phos() { return phos_; }
0052     TrigCodes::TrigBitSet evtTrigBits() const { return evtTrigBits_; }
0053     const std::vector<reco::CaloJet>& jets() const { return *jets_.product(); }
0054 
0055     //modifiers
0056     void clear();
0057     void setEvtTrigBits(TrigCodes::TrigBitSet bits) { evtTrigBits_ = bits; }
0058     void setJets(edm::Handle<std::vector<reco::CaloJet> > jets) { jets_ = std::move(jets); }
0059   };
0060 }  // namespace egHLT
0061 
0062 #endif