Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:10:57

0001 #ifndef RctUnpackCollections_h
0002 #define RctUnpackCollections_h
0003 
0004 /*!
0005 * \class RctUnpackCollections
0006 *
0007 */
0008 
0009 // CMSSW headers
0010 #include "FWCore/Framework/interface/Event.h"
0011 
0012 // DataFormat headers
0013 #include "DataFormats/L1CaloTrigger/interface/L1CaloCollections.h"
0014 #include "DataFormats/L1GlobalCaloTrigger/interface/L1GctCollections.h"
0015 #include "DataFormats/L1Trigger/interface/L1TriggerError.h"
0016 #include "TList.h"
0017 
0018 class RctUnpackCollections {
0019 public:
0020   /// Construct with an event. The collections get put into the event when the object instance goes out of scope (i.e. in the destructor).
0021   RctUnpackCollections(edm::Event& event);
0022 
0023   /// deliberately not implemented!
0024   RctUnpackCollections(const RctUnpackCollections&) = delete;             ///< Copy ctor
0025   RctUnpackCollections& operator=(const RctUnpackCollections&) = delete;  ///< Assignment op
0026 
0027   /// Destructor - the last action of this object is to put the rct collections into the event provided on construction.
0028   ~RctUnpackCollections();
0029 
0030   // Collections for storing RCT input data.
0031   L1CaloEmCollection* const rctEm() const { return m_rctEm.get(); }  ///< Input electrons from the RCT to the RCT.
0032   L1CaloRegionCollection* const rctCalo() const {
0033     return m_rctCalo.get();
0034   }  ///< Input calo regions from the RCT to the RCT.
0035 
0036 private:
0037   edm::Event&
0038       m_event;  ///< The event the collections will be put into on destruction of the RctUnpackCollections instance.
0039 
0040   // Collections for storing RCT input data.
0041   std::unique_ptr<L1CaloEmCollection> m_rctEm;        ///< Input electrons.
0042   std::unique_ptr<L1CaloRegionCollection> m_rctCalo;  ///< Input calo regions.
0043 };
0044 
0045 // Pretty print for the RctUnpackCollections sub-class
0046 std::ostream& operator<<(std::ostream& os, const RctUnpackCollections& rhs);
0047 
0048 #endif /* RctUnpackCollections_h */