#include <MyEDProducts/HcalPlotter/src/HcalQLPlotAnal.cc>
Public Member Functions | |
HcalQLPlotAnal (const edm::ParameterSet &) | |
~HcalQLPlotAnal () | |
Private Member Functions | |
virtual void | analyze (const edm::Event &, const edm::EventSetup &) |
virtual void | endJob () |
Private Attributes | |
HcalQLPlotAnalAlgos * | algo_ |
double | calibFC2GeV_ |
bool | doCalib_ |
edm::InputTag | hbheRHLabel_ |
edm::InputTag | hcalDigiLabel_ |
edm::InputTag | hcalTrigLabel_ |
edm::InputTag | hfRHLabel_ |
edm::InputTag | hoRHLabel_ |
Description: <one line="" class="" summary>="">
Implementation: <Notes on="" implementation>="">
Definition at line 42 of file HcalQLPlotAnal.cc.
HcalQLPlotAnal::HcalQLPlotAnal | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 72 of file HcalQLPlotAnal.cc.
References algo_, edm::ParameterSet::getParameter(), and edm::ParameterSet::getUntrackedParameter().
: hbheRHLabel_(iConfig.getUntrackedParameter<edm::InputTag>("hbheRHtag")), hoRHLabel_(iConfig.getUntrackedParameter<edm::InputTag>("hoRHtag")), hfRHLabel_(iConfig.getUntrackedParameter<edm::InputTag>("hfRHtag")), hcalDigiLabel_(iConfig.getUntrackedParameter<edm::InputTag>("hcalDigiTag")), hcalTrigLabel_(iConfig.getUntrackedParameter<edm::InputTag>("hcalTrigTag")), doCalib_(iConfig.getUntrackedParameter<bool>("doCalib",false)), calibFC2GeV_(iConfig.getUntrackedParameter<double>("calibFC2GeV",0.2)) { algo_ = new HcalQLPlotAnalAlgos(iConfig.getUntrackedParameter<std::string>("outputFilename").c_str(), iConfig.getParameter<edm::ParameterSet>("HistoParameters")); }
HcalQLPlotAnal::~HcalQLPlotAnal | ( | ) |
Definition at line 87 of file HcalQLPlotAnal.cc.
{ // do anything here that needs to be done at destruction time // (e.g. close files, deallocate resources etc.) }
void HcalQLPlotAnal::analyze | ( | const edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [private, virtual] |
Implements edm::EDAnalyzer.
Definition at line 100 of file HcalQLPlotAnal.cc.
References algo_, calibFC2GeV_, doCalib_, edm::Event::getByLabel(), hbheRHLabel_, hcalDigiLabel_, hcalTrigLabel_, hfRHLabel_, hoRHLabel_, edm::HandleBase::isValid(), HcalQLPlotAnalAlgos::processDigi(), HcalQLPlotAnalAlgos::processRH(), and HcalQLPlotAnalAlgos::SetEventType().
{ // Step A/C: Get Inputs and process (repeatedly) edm::Handle<HcalTBTriggerData> trig; iEvent.getByLabel(hcalTrigLabel_,trig); if (!trig.isValid()) { edm::LogError("HcalQLPlotAnal::analyze") << "No Trigger Data found, skip event"; return; } else { algo_->SetEventType(*trig); } edm::Handle<HBHEDigiCollection> hbhedg; iEvent.getByLabel(hcalDigiLabel_,hbhedg); if (!hbhedg.isValid()) { edm::LogWarning("HcalQLPlotAnal::analyze") << "One of HBHE Digis/RecHits not found"; } else { algo_->processDigi(*hbhedg); } edm::Handle<HBHERecHitCollection> hbherh; iEvent.getByLabel(hbheRHLabel_,hbherh); if (!hbherh.isValid()) { edm::LogWarning("HcalQLPlotAnal::analyze") << "One of HBHE Digis/RecHits not found"; } else { algo_->processRH(*hbherh,*hbhedg); } edm::Handle<HODigiCollection> hodg; iEvent.getByLabel(hcalDigiLabel_,hodg); if (!hodg.isValid()) { // can't find it! edm::LogWarning("HcalQLPlotAnal::analyze") << "One of HO Digis/RecHits not found"; } else { algo_->processDigi(*hodg); } edm::Handle<HORecHitCollection> horh; iEvent.getByLabel(hoRHLabel_,horh); if (!horh.isValid()) { // can't find it! edm::LogWarning("HcalQLPlotAnal::analyze") << "One of HO Digis/RecHits not found"; } else { algo_->processRH(*horh,*hodg); } edm::Handle<HFDigiCollection> hfdg; iEvent.getByLabel(hcalDigiLabel_,hfdg); if (!hfdg.isValid()) { // can't find it! edm::LogWarning("HcalQLPlotAnal::analyze") << "One of HF Digis/RecHits not found"; } else { algo_->processDigi(*hfdg); } edm::Handle<HFRecHitCollection> hfrh; iEvent.getByLabel(hfRHLabel_,hfrh); if (!hfrh.isValid()) { // can't find it! edm::LogWarning("HcalQLPlotAnal::analyze") << "One of HF Digis/RecHits not found"; } else { algo_->processRH(*hfrh,*hfdg); } if (doCalib_) { // No rechits as of yet... edm::Handle<HcalCalibDigiCollection> calibdg; iEvent.getByLabel(hcalDigiLabel_,calibdg); if (!calibdg.isValid()) { edm::LogWarning("HcalQLPlotAnal::analyze") << "Hcal Calib Digis not found"; } else { algo_->processDigi(*calibdg,calibFC2GeV_); } } }
void HcalQLPlotAnal::endJob | ( | void | ) | [private, virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 178 of file HcalQLPlotAnal.cc.
References algo_, and HcalQLPlotAnalAlgos::end().
HcalQLPlotAnalAlgos* HcalQLPlotAnal::algo_ [private] |
Definition at line 57 of file HcalQLPlotAnal.cc.
Referenced by analyze(), endJob(), and HcalQLPlotAnal().
double HcalQLPlotAnal::calibFC2GeV_ [private] |
Definition at line 56 of file HcalQLPlotAnal.cc.
Referenced by analyze().
bool HcalQLPlotAnal::doCalib_ [private] |
Definition at line 55 of file HcalQLPlotAnal.cc.
Referenced by analyze().
edm::InputTag HcalQLPlotAnal::hbheRHLabel_ [private] |
Definition at line 53 of file HcalQLPlotAnal.cc.
Referenced by analyze().
edm::InputTag HcalQLPlotAnal::hcalDigiLabel_ [private] |
Definition at line 54 of file HcalQLPlotAnal.cc.
Referenced by analyze().
edm::InputTag HcalQLPlotAnal::hcalTrigLabel_ [private] |
Definition at line 54 of file HcalQLPlotAnal.cc.
Referenced by analyze().
edm::InputTag HcalQLPlotAnal::hfRHLabel_ [private] |
Definition at line 53 of file HcalQLPlotAnal.cc.
Referenced by analyze().
edm::InputTag HcalQLPlotAnal::hoRHLabel_ [private] |
Definition at line 53 of file HcalQLPlotAnal.cc.
Referenced by analyze().