#include <HarvestingAnalyzer.h>
Public Member Functions | |
virtual void | analyze (const edm::Event &, const edm::EventSetup &) |
virtual void | beginJob () |
virtual void | beginRun (const edm::Run &, const edm::EventSetup &) |
virtual void | endJob () |
virtual void | endRun (const edm::Run &, const edm::EventSetup &) |
HarvestingAnalyzer (const edm::ParameterSet &) | |
virtual | ~HarvestingAnalyzer () |
Private Attributes | |
DQMStore * | dbe |
std::string | fName |
int | verbosity |
Class to perform operations on MEs after EDMtoMEConverter
Definition at line 36 of file HarvestingAnalyzer.h.
HarvestingAnalyzer::HarvestingAnalyzer | ( | const edm::ParameterSet & | iPSet | ) | [explicit] |
Definition at line 3 of file HarvestingAnalyzer.cc.
References fName, edm::ParameterSet::getUntrackedParameter(), AlCaHLTBitMon_QueryRunRegistry::string, and verbosity.
{ std::string MsgLoggerCat = "HarvestingAnalyzer_HarvestingAnalyzer"; fName = iPSet.getUntrackedParameter<std::string>("Name"); verbosity = iPSet.getUntrackedParameter<int>("Verbosity"); if (verbosity >= 0) { edm::LogInfo(MsgLoggerCat) << "\n===============================\n" << "Initialized as EDAnalyzer with parameter values:\n" << " Name = " << fName << "\n" << " Verbosity = " << verbosity << "\n" << "===============================\n"; } }
HarvestingAnalyzer::~HarvestingAnalyzer | ( | ) | [virtual] |
Definition at line 20 of file HarvestingAnalyzer.cc.
{}
void HarvestingAnalyzer::analyze | ( | const edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [virtual] |
void HarvestingAnalyzer::beginJob | ( | void | ) | [virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 22 of file HarvestingAnalyzer.cc.
{
return;
}
void HarvestingAnalyzer::beginRun | ( | const edm::Run & | iRun, |
const edm::EventSetup & | iSetup | ||
) | [virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 72 of file HarvestingAnalyzer.cc.
{
return;
}
void HarvestingAnalyzer::endJob | ( | void | ) | [virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 27 of file HarvestingAnalyzer.cc.
References DQMStore::book1D(), gather_cfg::cout, dbe, cuy::denominator, DQMStore::get(), MonitorElement::getTH1F(), cuy::numerator, cppFunctionSkipper::operator, and DQMStore::setCurrentFolder().
{ dbe = 0; dbe = edm::Service<DQMStore>().operator->(); if (dbe) { // monitoring element numerator and denominator histogram MonitorElement *meN = dbe->get("ConverterTest/TH1F/Random1DN"); MonitorElement *meD = dbe->get("ConverterTest/TH1F/Random1DD"); if (meN && meD) { // get the numerator and denominator histogram TH1F *numerator = meN->getTH1F(); numerator->Sumw2(); TH1F *denominator = meD->getTH1F(); denominator->Sumw2(); // set the current directory dbe->setCurrentFolder("ConverterTest/TH1F"); // booked the new histogram to contain the results MonitorElement *me = dbe->book1D("Divide","Divide calculation", numerator->GetNbinsX(), numerator->GetXaxis()->GetXmin(), numerator->GetXaxis()->GetXmax()); // Calculate the efficiency me->getTH1F()->Divide(numerator, denominator, 1., 1., "B"); } else { std::cout << "Monitor elements don't exist" << std::endl; } } else { std::cout << "Don't have a valid DQM back end" << std::endl; } return; }
void HarvestingAnalyzer::endRun | ( | const edm::Run & | iRun, |
const edm::EventSetup & | iSetup | ||
) | [virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 78 of file HarvestingAnalyzer.cc.
{
return;
}
DQMStore* HarvestingAnalyzer::dbe [private] |
Definition at line 53 of file HarvestingAnalyzer.h.
Referenced by endJob().
std::string HarvestingAnalyzer::fName [private] |
Definition at line 51 of file HarvestingAnalyzer.h.
Referenced by HarvestingAnalyzer().
int HarvestingAnalyzer::verbosity [private] |
Definition at line 52 of file HarvestingAnalyzer.h.
Referenced by HarvestingAnalyzer().