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 |
Implementation: <Notes on="" implementation>="">
Definition at line 40 of file CallgrindAnalyzer.cc.
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 }
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] |
int Profiler::m_action [private] |
int Profiler::m_evtCount [private] |
int Profiler::m_firstEvent [private] |
int Profiler::m_lastEvent [private] |