![]() |
![]() |
Public Member Functions | |
PatTriggerAnalyzerPrescale (const edm::ParameterSet &iConfig) | |
default constructor | |
~PatTriggerAnalyzerPrescale () | |
default destructor | |
Private Member Functions | |
virtual void | analyze (const edm::Event &iEvent, const edm::EventSetup &iSetup) |
everything that needs to be done during the event loop | |
virtual void | beginJob () |
everything that needs to be done before the event loop | |
virtual void | endJob () |
everything that needs to be done after the event loop | |
Private Attributes | |
Int_t | bin_ |
event counter | |
TH1D * | histo_ |
histogram | |
std::string | pathName_ |
HLT path name configuration parameter. |
Definition at line 10 of file PatTriggerAnalyzerPrescale.cc.
PatTriggerAnalyzerPrescale::PatTriggerAnalyzerPrescale | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
default constructor
Definition at line 46 of file PatTriggerAnalyzerPrescale.cc.
: bin_( 0 ) , pathName_( iConfig.getParameter< std::string >( "pathName" ) ) { }
PatTriggerAnalyzerPrescale::~PatTriggerAnalyzerPrescale | ( | ) | [inline] |
void PatTriggerAnalyzerPrescale::analyze | ( | const edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [private, virtual] |
everything that needs to be done during the event loop
Implements edm::EDAnalyzer.
Definition at line 63 of file PatTriggerAnalyzerPrescale.cc.
References bin_, edm::Event::getByLabel(), histo_, scaleCards::path, and pathName_.
{ // PAT trigger event edm::Handle< TriggerEvent > triggerEvent; iEvent.getByLabel( "patTriggerEvent", triggerEvent ); // Get the HLT path const TriggerPath * path( triggerEvent->path( pathName_ ) ); // Fill prescale factor into histogram ++bin_; if ( path ) histo_->SetBinContent( bin_, path->prescale() ); }
void PatTriggerAnalyzerPrescale::beginJob | ( | void | ) | [private, virtual] |
everything that needs to be done before the event loop
Reimplemented from edm::EDAnalyzer.
Definition at line 52 of file PatTriggerAnalyzerPrescale.cc.
References fileService, histo_, and pathName_.
{ edm::Service< TFileService > fileService; // Histogram definition for 100 events on the x-axis histo_ = fileService->make< TH1D >( "histo_", std::string( "Prescale values of " + pathName_ ).c_str(), 100, 0., 100.); histo_->SetXTitle( "event" ); histo_->SetYTitle( "prescale" ); histo_->SetMinimum( 0. ); }
virtual void PatTriggerAnalyzerPrescale::endJob | ( | void | ) | [inline, private, virtual] |
everything that needs to be done after the event loop
Reimplemented from edm::EDAnalyzer.
Definition at line 24 of file PatTriggerAnalyzerPrescale.cc.
{};
Int_t PatTriggerAnalyzerPrescale::bin_ [private] |
TH1D* PatTriggerAnalyzerPrescale::histo_ [private] |
histogram
Definition at line 24 of file PatTriggerAnalyzerPrescale.cc.
Referenced by analyze(), and beginJob().
std::string PatTriggerAnalyzerPrescale::pathName_ [private] |
HLT path name configuration parameter.
Definition at line 33 of file PatTriggerAnalyzerPrescale.cc.
Referenced by analyze(), and beginJob().