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)
 
static void prevalidate (ConfigurationDescriptions &)
 
- 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 97 of file CallgrindAnalyzer.cc.

References gather_cfg::cout.

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

Reimplemented from edm::EDAnalyzer.

Definition at line 127 of file CallgrindAnalyzer.cc.

128 {
129 }
void Profiler::endJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 133 of file CallgrindAnalyzer.cc.

133  {
134 }

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.