CMS 3D CMS Logo

Profiler Class Reference

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

Inheritance diagram for Profiler:

edm::EDAnalyzer

List of all members.

Public Member Functions

 Profiler (const edm::ParameterSet &)
 ~Profiler ()

Private Member Functions

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

Private Attributes

int m_action
int m_evtCount
int m_firstEvent
int m_lastEvent


Detailed Description

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

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

Definition at line 40 of file CallgrindAnalyzer.cc.


Constructor & Destructor Documentation

Profiler::Profiler ( const edm::ParameterSet parameters  )  [explicit]

Definition at line 69 of file CallgrindAnalyzer.cc.

References edm::ParameterSet::getParameter(), m_action, m_evtCount, m_firstEvent, and m_lastEvent.

00070 {
00071    //now do what ever initialization is needed
00072    m_firstEvent         = parameters.getParameter<int>("firstEvent");
00073    m_lastEvent          = parameters.getParameter<int>("lastEvent");
00074    m_action             = parameters.getParameter<int>("action");
00075    m_evtCount=0;
00076 
00077 }

Profiler::~Profiler (  ) 

Definition at line 80 of file CallgrindAnalyzer.cc.

00081 {
00082  
00083    // do anything here that needs to be done at desctruction time
00084    // (e.g. close files, deallocate resources etc.)
00085 
00086 }


Member Function Documentation

void Profiler::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
) [private, virtual]

Implements edm::EDAnalyzer.

Definition at line 95 of file CallgrindAnalyzer.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), m_action, m_evtCount, m_firstEvent, and m_lastEvent.

00096 {
00097 m_evtCount++;
00098 if(m_evtCount >= m_firstEvent && (m_evtCount <= m_lastEvent || m_lastEvent == -1))
00099  {
00100   switch (m_action)
00101   {
00102    case 0: 
00103      CALLGRIND_STOP_INSTRUMENTATION;
00104      cout << "Stop Instr" << endl; 
00105      break;
00106    case 1:
00107      CALLGRIND_START_INSTRUMENTATION;
00108      CALLGRIND_DUMP_STATS;
00109      cout << "Start Instr" << endl; 
00110      break;
00111    case 2:
00112      CALLGRIND_DUMP_STATS;
00113      cout << "Dump stat" << endl; 
00114      break;
00115  
00116   }
00117 
00118  }
00119 }

void Profiler::beginJob ( const edm::EventSetup  )  [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 124 of file CallgrindAnalyzer.cc.

00125 {
00126 }

void Profiler::endJob ( void   )  [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 130 of file CallgrindAnalyzer.cc.

00130                  {
00131 }


Member Data Documentation

int Profiler::m_action [private]

Definition at line 54 of file CallgrindAnalyzer.cc.

Referenced by analyze(), and Profiler().

int Profiler::m_evtCount [private]

Definition at line 55 of file CallgrindAnalyzer.cc.

Referenced by analyze(), and Profiler().

int Profiler::m_firstEvent [private]

Definition at line 52 of file CallgrindAnalyzer.cc.

Referenced by analyze(), and Profiler().

int Profiler::m_lastEvent [private]

Definition at line 53 of file CallgrindAnalyzer.cc.

Referenced by analyze(), and Profiler().


The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:30:19 2009 for CMSSW by  doxygen 1.5.4