test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
HcalQLPlotAnal Class Reference

#include <MyEDProducts/HcalPlotter/src/HcalQLPlotAnal.cc>

Inheritance diagram for HcalQLPlotAnal:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 HcalQLPlotAnal (const edm::ParameterSet &)
 
 ~HcalQLPlotAnal ()
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &) override
 
virtual void endJob () override
 

Private Attributes

HcalQLPlotAnalAlgosalgo_
 
double calibFC2GeV_
 
bool doCalib_
 
edm::InputTag hcalDigiLabel_
 
edm::EDGetTokenT
< HcalCalibDigiCollection
tok_calib_
 
edm::EDGetTokenT
< HBHEDigiCollection
tok_hbhe_
 
edm::EDGetTokenT
< HBHERecHitCollection
tok_hbherec_
 
edm::EDGetTokenT
< HFDigiCollection
tok_hf_
 
edm::EDGetTokenT
< HFRecHitCollection
tok_hfrec_
 
edm::EDGetTokenT
< HODigiCollection
tok_ho_
 
edm::EDGetTokenT
< HORecHitCollection
tok_horec_
 
edm::EDGetTokenT
< HcalTBTriggerData
tok_tb_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 41 of file HcalQLPlotAnal.cc.

Constructor & Destructor Documentation

HcalQLPlotAnal::HcalQLPlotAnal ( const edm::ParameterSet iConfig)
explicit

Definition at line 78 of file HcalQLPlotAnal.cc.

References algo_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), hcalDigiLabel_, AlCaHLTBitMon_QueryRunRegistry::string, tok_calib_, tok_hbhe_, tok_hbherec_, tok_hf_, tok_hfrec_, tok_ho_, tok_horec_, and tok_tb_.

78  :
79  hcalDigiLabel_(iConfig.getUntrackedParameter<edm::InputTag>("hcalDigiTag")),
80  doCalib_(iConfig.getUntrackedParameter<bool>("doCalib",false)),
81  calibFC2GeV_(iConfig.getUntrackedParameter<double>("calibFC2GeV",0.2))
82 {
83  algo_ = new
84  HcalQLPlotAnalAlgos(iConfig.getUntrackedParameter<std::string>("outputFilename").c_str(),
85  iConfig.getParameter<edm::ParameterSet>("HistoParameters"));
86 
87  tok_hbherec_ = consumes<HBHERecHitCollection>(iConfig.getUntrackedParameter<edm::InputTag>("hbheRHtag"));
88  tok_horec_ = consumes<HORecHitCollection>(iConfig.getUntrackedParameter<edm::InputTag>("hoRHtag"));
89  tok_hfrec_ = consumes<HFRecHitCollection>(iConfig.getUntrackedParameter<edm::InputTag>("hfRHtag"));
90  tok_hbhe_ = consumes<HBHEDigiCollection>(hcalDigiLabel_);
91  tok_ho_ = consumes<HODigiCollection>(hcalDigiLabel_);
92  tok_hf_ = consumes<HFDigiCollection>(hcalDigiLabel_);
93  tok_calib_ = consumes<HcalCalibDigiCollection>(hcalDigiLabel_);
94  tok_tb_ = consumes<HcalTBTriggerData>(iConfig.getUntrackedParameter<edm::InputTag>("hcalTrigTag"));
95 
96 }
T getParameter(std::string const &) const
edm::EDGetTokenT< HcalCalibDigiCollection > tok_calib_
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< HBHERecHitCollection > tok_hbherec_
edm::EDGetTokenT< HBHEDigiCollection > tok_hbhe_
edm::EDGetTokenT< HFDigiCollection > tok_hf_
edm::EDGetTokenT< HORecHitCollection > tok_horec_
edm::EDGetTokenT< HcalTBTriggerData > tok_tb_
edm::EDGetTokenT< HFRecHitCollection > tok_hfrec_
edm::EDGetTokenT< HODigiCollection > tok_ho_
HcalQLPlotAnalAlgos * algo_
edm::InputTag hcalDigiLabel_
HcalQLPlotAnal::~HcalQLPlotAnal ( )

Definition at line 99 of file HcalQLPlotAnal.cc.

100 {
101  // do anything here that needs to be done at destruction time
102  // (e.g. close files, deallocate resources etc.)
103 }

Member Function Documentation

void HcalQLPlotAnal::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Implements edm::EDAnalyzer.

Definition at line 112 of file HcalQLPlotAnal.cc.

References algo_, calibFC2GeV_, doCalib_, edm::Event::getByToken(), edm::HandleBase::isValid(), HcalQLPlotAnalAlgos::processDigi(), HcalQLPlotAnalAlgos::processRH(), HcalQLPlotAnalAlgos::SetEventType(), tok_calib_, tok_hbhe_, tok_hbherec_, tok_hf_, tok_hfrec_, tok_ho_, tok_horec_, and tok_tb_.

113 {
114  // Step A/C: Get Inputs and process (repeatedly)
116  iEvent.getByToken(tok_tb_,trig);
117  if (!trig.isValid()) {
118  edm::LogError("HcalQLPlotAnal::analyze") << "No Trigger Data found, skip event";
119  return;
120  } else {
121  algo_->SetEventType(*trig);
122  }
124  iEvent.getByToken(tok_hbhe_,hbhedg);
125  if (!hbhedg.isValid()) {
126  edm::LogWarning("HcalQLPlotAnal::analyze") << "One of HBHE Digis/RecHits not found";
127  } else {
128  algo_->processDigi(*hbhedg);
129  }
131  iEvent.getByToken(tok_hbherec_,hbherh);
132  if (!hbherh.isValid()) {
133  edm::LogWarning("HcalQLPlotAnal::analyze") << "One of HBHE Digis/RecHits not found";
134  } else {
135  algo_->processRH(*hbherh,*hbhedg);
136  }
137 
139  iEvent.getByToken(tok_ho_,hodg);
140  if (!hodg.isValid()) {
141  // can't find it!
142  edm::LogWarning("HcalQLPlotAnal::analyze") << "One of HO Digis/RecHits not found";
143  } else {
144  algo_->processDigi(*hodg);
145  }
147  iEvent.getByToken(tok_horec_,horh);
148  if (!horh.isValid()) {
149  // can't find it!
150  edm::LogWarning("HcalQLPlotAnal::analyze") << "One of HO Digis/RecHits not found";
151  } else {
152  algo_->processRH(*horh,*hodg);
153  }
154 
156  iEvent.getByToken(tok_hf_,hfdg);
157 
158  if (!hfdg.isValid()) {
159  // can't find it!
160  edm::LogWarning("HcalQLPlotAnal::analyze") << "One of HF Digis/RecHits not found";
161  } else {
162  algo_->processDigi(*hfdg);
163  }
164 
166  iEvent.getByToken(tok_hfrec_,hfrh);
167  if (!hfrh.isValid()) {
168  // can't find it!
169  edm::LogWarning("HcalQLPlotAnal::analyze") << "One of HF Digis/RecHits not found";
170  } else {
171  algo_->processRH(*hfrh,*hfdg);
172  }
173 
174  if (doCalib_) {
175  // No rechits as of yet...
177  iEvent.getByToken(tok_calib_,calibdg);
178  if (!calibdg.isValid()) {
179  edm::LogWarning("HcalQLPlotAnal::analyze") << "Hcal Calib Digis not found";
180  } else {
181  algo_->processDigi(*calibdg,calibFC2GeV_);
182  }
183  }
184 
185 }
edm::EDGetTokenT< HcalCalibDigiCollection > tok_calib_
edm::EDGetTokenT< HBHERecHitCollection > tok_hbherec_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
void processDigi(const HBHEDigiCollection &hbhedigic)
edm::EDGetTokenT< HBHEDigiCollection > tok_hbhe_
edm::EDGetTokenT< HFDigiCollection > tok_hf_
edm::EDGetTokenT< HORecHitCollection > tok_horec_
void processRH(const HBHERecHitCollection &hbherhc, const HBHEDigiCollection &hbhedgc)
edm::EDGetTokenT< HcalTBTriggerData > tok_tb_
bool isValid() const
Definition: HandleBase.h:75
void SetEventType(const HcalTBTriggerData &trigd)
edm::EDGetTokenT< HFRecHitCollection > tok_hfrec_
edm::EDGetTokenT< HODigiCollection > tok_ho_
HcalQLPlotAnalAlgos * algo_
void HcalQLPlotAnal::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 190 of file HcalQLPlotAnal.cc.

References algo_, and HcalQLPlotAnalAlgos::end().

191 {
192  algo_->end();
193 }
HcalQLPlotAnalAlgos * algo_

Member Data Documentation

HcalQLPlotAnalAlgos* HcalQLPlotAnal::algo_
private

Definition at line 63 of file HcalQLPlotAnal.cc.

Referenced by analyze(), endJob(), and HcalQLPlotAnal().

double HcalQLPlotAnal::calibFC2GeV_
private

Definition at line 62 of file HcalQLPlotAnal.cc.

Referenced by analyze().

bool HcalQLPlotAnal::doCalib_
private

Definition at line 61 of file HcalQLPlotAnal.cc.

Referenced by analyze().

edm::InputTag HcalQLPlotAnal::hcalDigiLabel_
private

Definition at line 52 of file HcalQLPlotAnal.cc.

Referenced by HcalQLPlotAnal().

edm::EDGetTokenT<HcalCalibDigiCollection> HcalQLPlotAnal::tok_calib_
private

Definition at line 59 of file HcalQLPlotAnal.cc.

Referenced by analyze(), and HcalQLPlotAnal().

edm::EDGetTokenT<HBHEDigiCollection> HcalQLPlotAnal::tok_hbhe_
private

Definition at line 56 of file HcalQLPlotAnal.cc.

Referenced by analyze(), and HcalQLPlotAnal().

edm::EDGetTokenT<HBHERecHitCollection> HcalQLPlotAnal::tok_hbherec_
private

Definition at line 53 of file HcalQLPlotAnal.cc.

Referenced by analyze(), and HcalQLPlotAnal().

edm::EDGetTokenT<HFDigiCollection> HcalQLPlotAnal::tok_hf_
private

Definition at line 58 of file HcalQLPlotAnal.cc.

Referenced by analyze(), and HcalQLPlotAnal().

edm::EDGetTokenT<HFRecHitCollection> HcalQLPlotAnal::tok_hfrec_
private

Definition at line 55 of file HcalQLPlotAnal.cc.

Referenced by analyze(), and HcalQLPlotAnal().

edm::EDGetTokenT<HODigiCollection> HcalQLPlotAnal::tok_ho_
private

Definition at line 57 of file HcalQLPlotAnal.cc.

Referenced by analyze(), and HcalQLPlotAnal().

edm::EDGetTokenT<HORecHitCollection> HcalQLPlotAnal::tok_horec_
private

Definition at line 54 of file HcalQLPlotAnal.cc.

Referenced by analyze(), and HcalQLPlotAnal().

edm::EDGetTokenT<HcalTBTriggerData> HcalQLPlotAnal::tok_tb_
private

Definition at line 60 of file HcalQLPlotAnal.cc.

Referenced by analyze(), and HcalQLPlotAnal().