Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:23:28

0001 #ifndef __L1Analysis_L1AnalysisCaloTP_H__
0002 #define __L1Analysis_L1AnalysisCaloTP_H__
0003 
0004 //-------------------------------------------------------------------------------
0005 // Created 06/01/2010 - A.C. Le Bihan
0006 //
0007 //
0008 // Original code : L1Trigger/L1TNtuples/L1NtupleProducer
0009 //-------------------------------------------------------------------------------
0010 
0011 #include "DataFormats/Common/interface/Handle.h"
0012 #include "DataFormats/HcalDigi/interface/HcalDigiCollections.h"
0013 #include "DataFormats/EcalDigi/interface/EcalDigiCollections.h"
0014 
0015 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0016 
0017 #include "L1AnalysisCaloTPDataFormat.h"
0018 
0019 class L1CaloEcalScale;
0020 class L1CaloHcalScale;
0021 
0022 namespace L1Analysis {
0023   class L1AnalysisCaloTP {
0024   public:
0025     L1AnalysisCaloTP();
0026     L1AnalysisCaloTP(bool verbose);
0027     ~L1AnalysisCaloTP();
0028 
0029     // setup scales
0030     void setEcalScale(const L1CaloEcalScale* ecalScale) {
0031       edm::LogInfo("L1NTUPLE") << "Setting ECAL TP scale " << ecalScale << std::endl;
0032       ecalScale_ = ecalScale;
0033     }
0034 
0035     void setHcalScale(const L1CaloHcalScale* hcalScale) {
0036       edm::LogInfo("L1NTUPLE") << "Setting HCAL TP scale " << hcalScale << std::endl;
0037       hcalScale_ = hcalScale;
0038     }
0039 
0040     void SetHCAL(const HcalTrigPrimDigiCollection& hcalTPs);
0041 
0042     void SetECAL(const EcalTrigPrimDigiCollection& ecalTPs);
0043 
0044     void Reset() { tp_.Reset(); }
0045 
0046     L1AnalysisCaloTPDataFormat* getData() { return &tp_; }
0047 
0048   private:
0049     bool verbose_;
0050     L1AnalysisCaloTPDataFormat tp_;
0051 
0052     const L1CaloEcalScale* ecalScale_;
0053     const L1CaloHcalScale* hcalScale_;
0054   };
0055 }  // namespace L1Analysis
0056 #endif