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

Public Member Functions

 Profiler (const edm::ParameterSet &)
 
 ~Profiler ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

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
 

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)
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

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

70 {
71  //now do what ever initialization is needed
72  m_firstEvent = parameters.getParameter<int>("firstEvent");
73  m_lastEvent = parameters.getParameter<int>("lastEvent");
74  m_action = parameters.getParameter<int>("action");
75  m_evtCount=0;
76 
77 }
T getParameter(std::string const &) const
Profiler::~Profiler ( )

Definition at line 80 of file CallgrindAnalyzer.cc.

81 {
82 
83  // do anything here that needs to be done at desctruction time
84  // (e.g. close files, deallocate resources etc.)
85 
86 }

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 95 of file CallgrindAnalyzer.cc.

References gather_cfg::cout.

96 {
97 m_evtCount++;
99  {
100  switch (m_action)
101  {
102  case 0:
103  CALLGRIND_STOP_INSTRUMENTATION;
104  cout << "Stop Instr" << endl;
105  break;
106  case 1:
107  CALLGRIND_START_INSTRUMENTATION;
108  CALLGRIND_DUMP_STATS;
109  cout << "Start Instr" << endl;
110  break;
111  case 2:
112  CALLGRIND_DUMP_STATS;
113  cout << "Dump stat" << endl;
114  break;
115 
116  }
117 
118  }
119 }
tuple cout
Definition: gather_cfg.py:41
void Profiler::beginJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 124 of file CallgrindAnalyzer.cc.

125 {
126 }
void Profiler::endJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 130 of file CallgrindAnalyzer.cc.

130  {
131 }

Member Data Documentation

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.