#include <HLTEfficiencyCalculator.h>
Public Member Functions | |
HLTEffCalculator (const edm::ParameterSet &) | |
~HLTEffCalculator () | |
Private Member Functions | |
virtual void | analyze (const edm::Event &, const edm::EventSetup &) |
virtual void | beginJob () |
virtual void | endJob () |
Private Attributes | |
edm::InputTag | HLTresCollection |
EfficiencyHandler * | myEffHandler |
std::string | outputFileName |
int | verbosity |
Description: <one line="" class="" summary>="">
Implementation: <Notes on="" implementation>="">
Definition at line 121 of file HLTEfficiencyCalculator.h.
HLTEffCalculator::HLTEffCalculator | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 25 of file HLTEfficiencyCalculator.cc.
References edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), HLTresCollection, myEffHandler, outputFileName, and verbosity.
{ outputFileName = iConfig.getParameter<std::string>("OutputFileName"); HLTresCollection = iConfig.getParameter<edm::InputTag>("TriggerResCollection"); verbosity = iConfig.getUntrackedParameter<int>("verbosity",0); myEffHandler = new EfficiencyHandler("TopHLTs", iConfig.getParameter<std::vector<std::string> >("hltPaths"), verbosity); }
HLTEffCalculator::~HLTEffCalculator | ( | ) |
Definition at line 36 of file HLTEfficiencyCalculator.cc.
{ // do anything here that needs to be done at desctruction time // (e.g. close files, deallocate resources etc.) }
void HLTEffCalculator::analyze | ( | const edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [private, virtual] |
Implements edm::EDAnalyzer.
Definition at line 52 of file HLTEfficiencyCalculator.cc.
References edm::InputTag::encode(), EfficiencyHandler::Fill(), edm::Event::getByLabel(), HLTresCollection, LogDebug, and myEffHandler.
{ using namespace edm; // Trigger Handle<TriggerResults> trh; iEvent.getByLabel(HLTresCollection,trh); if( ! trh.isValid() ) { LogDebug("") << "HL TriggerResults with label ["+HLTresCollection.encode()+"] not found!"; return; } myEffHandler->Fill(iEvent,*trh); }
void HLTEffCalculator::beginJob | ( | void | ) | [private, virtual] |
void HLTEffCalculator::endJob | ( | void | ) | [private, virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 77 of file HLTEfficiencyCalculator.cc.
References F(), myEffHandler, outputFileName, and EfficiencyHandler::WriteAll().
{ TFile * F = new TFile(outputFileName.c_str(),"recreate"); myEffHandler->WriteAll(F); F->Save(); }
Definition at line 139 of file HLTEfficiencyCalculator.h.
Referenced by analyze(), and HLTEffCalculator().
EfficiencyHandler* HLTEffCalculator::myEffHandler [private] |
Definition at line 138 of file HLTEfficiencyCalculator.h.
Referenced by analyze(), endJob(), and HLTEffCalculator().
std::string HLTEffCalculator::outputFileName [private] |
Definition at line 137 of file HLTEfficiencyCalculator.h.
Referenced by endJob(), and HLTEffCalculator().
int HLTEffCalculator::verbosity [private] |
Definition at line 140 of file HLTEfficiencyCalculator.h.
Referenced by HLTEffCalculator().