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

Public Member Functions

 HcalQLPlotAnal (const edm::ParameterSet &)
 
 ~HcalQLPlotAnal ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Private Member Functions

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

Private Attributes

HcalQLPlotAnalAlgosalgo_
 
double calibFC2GeV_
 
bool doCalib_
 
edm::InputTag hbheRHLabel_
 
edm::InputTag hcalDigiLabel_
 
edm::InputTag hcalTrigLabel_
 
edm::InputTag hfRHLabel_
 
edm::InputTag hoRHLabel_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- 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::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

Detailed Description

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

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

Definition at line 42 of file HcalQLPlotAnal.cc.

Constructor & Destructor Documentation

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

Definition at line 72 of file HcalQLPlotAnal.cc.

References algo_, edm::ParameterSet::getParameter(), and edm::ParameterSet::getUntrackedParameter().

72  :
73  hbheRHLabel_(iConfig.getUntrackedParameter<edm::InputTag>("hbheRHtag")),
74  hoRHLabel_(iConfig.getUntrackedParameter<edm::InputTag>("hoRHtag")),
75  hfRHLabel_(iConfig.getUntrackedParameter<edm::InputTag>("hfRHtag")),
76  hcalDigiLabel_(iConfig.getUntrackedParameter<edm::InputTag>("hcalDigiTag")),
77  hcalTrigLabel_(iConfig.getUntrackedParameter<edm::InputTag>("hcalTrigTag")),
78  doCalib_(iConfig.getUntrackedParameter<bool>("doCalib",false)),
79  calibFC2GeV_(iConfig.getUntrackedParameter<double>("calibFC2GeV",0.2))
80 {
81  algo_ = new
82  HcalQLPlotAnalAlgos(iConfig.getUntrackedParameter<std::string>("outputFilename").c_str(),
83  iConfig.getParameter<edm::ParameterSet>("HistoParameters"));
84 }
edm::InputTag hbheRHLabel_
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::InputTag hcalTrigLabel_
edm::InputTag hfRHLabel_
edm::InputTag hoRHLabel_
HcalQLPlotAnalAlgos * algo_
edm::InputTag hcalDigiLabel_
HcalQLPlotAnal::~HcalQLPlotAnal ( )

Definition at line 87 of file HcalQLPlotAnal.cc.

88 {
89  // do anything here that needs to be done at destruction time
90  // (e.g. close files, deallocate resources etc.)
91 }

Member Function Documentation

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

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().

101 {
102  // Step A/C: Get Inputs and process (repeatedly)
104  iEvent.getByLabel(hcalTrigLabel_,trig);
105  if (!trig.isValid()) {
106  edm::LogError("HcalQLPlotAnal::analyze") << "No Trigger Data found, skip event";
107  return;
108  } else {
109  algo_->SetEventType(*trig);
110  }
112  iEvent.getByLabel(hcalDigiLabel_,hbhedg);
113  if (!hbhedg.isValid()) {
114  edm::LogWarning("HcalQLPlotAnal::analyze") << "One of HBHE Digis/RecHits not found";
115  } else {
116  algo_->processDigi(*hbhedg);
117  }
119  iEvent.getByLabel(hbheRHLabel_,hbherh);
120  if (!hbherh.isValid()) {
121  edm::LogWarning("HcalQLPlotAnal::analyze") << "One of HBHE Digis/RecHits not found";
122  } else {
123  algo_->processRH(*hbherh,*hbhedg);
124  }
125 
127  iEvent.getByLabel(hcalDigiLabel_,hodg);
128  if (!hodg.isValid()) {
129  // can't find it!
130  edm::LogWarning("HcalQLPlotAnal::analyze") << "One of HO Digis/RecHits not found";
131  } else {
132  algo_->processDigi(*hodg);
133  }
135  iEvent.getByLabel(hoRHLabel_,horh);
136  if (!horh.isValid()) {
137  // can't find it!
138  edm::LogWarning("HcalQLPlotAnal::analyze") << "One of HO Digis/RecHits not found";
139  } else {
140  algo_->processRH(*horh,*hodg);
141  }
142 
144  iEvent.getByLabel(hcalDigiLabel_,hfdg);
145 
146  if (!hfdg.isValid()) {
147  // can't find it!
148  edm::LogWarning("HcalQLPlotAnal::analyze") << "One of HF Digis/RecHits not found";
149  } else {
150  algo_->processDigi(*hfdg);
151  }
152 
154  iEvent.getByLabel(hfRHLabel_,hfrh);
155  if (!hfrh.isValid()) {
156  // can't find it!
157  edm::LogWarning("HcalQLPlotAnal::analyze") << "One of HF Digis/RecHits not found";
158  } else {
159  algo_->processRH(*hfrh,*hfdg);
160  }
161 
162  if (doCalib_) {
163  // No rechits as of yet...
165  iEvent.getByLabel(hcalDigiLabel_,calibdg);
166  if (!calibdg.isValid()) {
167  edm::LogWarning("HcalQLPlotAnal::analyze") << "Hcal Calib Digis not found";
168  } else {
169  algo_->processDigi(*calibdg,calibFC2GeV_);
170  }
171  }
172 
173 }
edm::InputTag hbheRHLabel_
edm::InputTag hcalTrigLabel_
void processDigi(const HBHEDigiCollection &hbhedigic)
edm::InputTag hfRHLabel_
edm::InputTag hoRHLabel_
void processRH(const HBHERecHitCollection &hbherhc, const HBHEDigiCollection &hbhedgc)
bool isValid() const
Definition: HandleBase.h:76
void SetEventType(const HcalTBTriggerData &trigd)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
HcalQLPlotAnalAlgos * algo_
edm::InputTag hcalDigiLabel_
void HcalQLPlotAnal::endJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 178 of file HcalQLPlotAnal.cc.

References algo_, and HcalQLPlotAnalAlgos::end().

179 {
180  algo_->end();
181 }
HcalQLPlotAnalAlgos * algo_

Member Data Documentation

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().