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
PatTriggerAnalyzerPrescale Class Reference
Inheritance diagram for PatTriggerAnalyzerPrescale:
edm::EDAnalyzer

Public Member Functions

 PatTriggerAnalyzerPrescale (const edm::ParameterSet &iConfig)
 default constructor More...
 
 ~PatTriggerAnalyzerPrescale ()
 default destructor More...
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Private Member Functions

virtual void analyze (const edm::Event &iEvent, const edm::EventSetup &iSetup)
 everything that needs to be done during the event loop More...
 
virtual void beginJob ()
 everything that needs to be done before the event loop More...
 
virtual void endJob ()
 everything that needs to be done after the event loop More...
 

Private Attributes

Int_t bin_
 event counter More...
 
TH1D * histo_
 histogram More...
 
std::string pathName_
 HLT path name configuration parameter. More...
 

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

Definition at line 10 of file PatTriggerAnalyzerPrescale.cc.

Constructor & Destructor Documentation

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

default constructor

Definition at line 46 of file PatTriggerAnalyzerPrescale.cc.

47 : bin_( 0 )
48 , pathName_( iConfig.getParameter< std::string >( "pathName" ) )
49 {
50 }
T getParameter(std::string const &) const
std::string pathName_
HLT path name configuration parameter.
PatTriggerAnalyzerPrescale::~PatTriggerAnalyzerPrescale ( )
inline

default destructor

Definition at line 16 of file PatTriggerAnalyzerPrescale.cc.

16 {};

Member Function Documentation

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

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_.

64 {
65  // PAT trigger event
66  edm::Handle< TriggerEvent > triggerEvent;
67  iEvent.getByLabel( "patTriggerEvent", triggerEvent );
68 
69  // Get the HLT path
70  const TriggerPath * path( triggerEvent->path( pathName_ ) );
71 
72  // Fill prescale factor into histogram
73  ++bin_;
74  if ( path ) histo_->SetBinContent( bin_, path->prescale() );
75 }
list path
Definition: scaleCards.py:51
Analysis-level HLTrigger path class.
Definition: TriggerPath.h:41
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
std::string pathName_
HLT path name configuration parameter.
void PatTriggerAnalyzerPrescale::beginJob ( void  )
privatevirtual

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_, TFileDirectory::make(), and pathName_.

53 {
55 
56  // Histogram definition for 100 events on the x-axis
57  histo_ = fileService->make< TH1D >( "histo_", std::string( "Prescale values of " + pathName_ ).c_str(), 100, 0., 100.);
58  histo_->SetXTitle( "event" );
59  histo_->SetYTitle( "prescale" );
60  histo_->SetMinimum( 0. );
61 }
std::string pathName_
HLT path name configuration parameter.
edm::Service< TFileService > fileService
T * make() const
make new ROOT object
virtual void PatTriggerAnalyzerPrescale::endJob ( void  )
inlineprivatevirtual

everything that needs to be done after the event loop

Reimplemented from edm::EDAnalyzer.

Definition at line 24 of file PatTriggerAnalyzerPrescale.cc.

24 {};

Member Data Documentation

Int_t PatTriggerAnalyzerPrescale::bin_
private

event counter

Definition at line 30 of file PatTriggerAnalyzerPrescale.cc.

Referenced by analyze().

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