Public Member Functions | |
Profiler (const edm::ParameterSet &) | |
~Profiler () | |
Private Member Functions | |
virtual void | analyze (const edm::Event &, const edm::EventSetup &) |
virtual void | beginJob () |
virtual void | endJob () |
Private Attributes | |
int | m_action |
int | m_evtCount |
int | m_firstEvent |
int | m_lastEvent |
Description: <one line="" class="" summary>="">
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().
{ //now do what ever initialization is needed m_firstEvent = parameters.getParameter<int>("firstEvent"); m_lastEvent = parameters.getParameter<int>("lastEvent"); m_action = parameters.getParameter<int>("action"); m_evtCount=0; }
Profiler::~Profiler | ( | ) |
Definition at line 80 of file CallgrindAnalyzer.cc.
{ // do anything here that needs to be done at desctruction time // (e.g. close files, deallocate resources etc.) }
void Profiler::analyze | ( | const edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [private, virtual] |
Implements edm::EDAnalyzer.
Definition at line 97 of file CallgrindAnalyzer.cc.
References gather_cfg::cout.
{ m_evtCount++; if(m_evtCount >= m_firstEvent && (m_evtCount <= m_lastEvent || m_lastEvent == -1)) { switch (m_action) { case 0: CALLGRIND_STOP_INSTRUMENTATION; cout << "Stop Instr" << endl; break; case 1: CALLGRIND_START_INSTRUMENTATION; CALLGRIND_DUMP_STATS; cout << "Start Instr" << endl; break; case 2: CALLGRIND_DUMP_STATS; cout << "Dump stat" << endl; break; } } }
void Profiler::beginJob | ( | void | ) | [private, virtual] |
void Profiler::endJob | ( | void | ) | [private, virtual] |
int Profiler::m_action [private] |
Definition at line 54 of file CallgrindAnalyzer.cc.
int Profiler::m_evtCount [private] |
Definition at line 55 of file CallgrindAnalyzer.cc.
int Profiler::m_firstEvent [private] |
Definition at line 52 of file CallgrindAnalyzer.cc.
int Profiler::m_lastEvent [private] |
Definition at line 53 of file CallgrindAnalyzer.cc.