CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
Profiler Class Reference
Inheritance diagram for Profiler:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 Profiler (const edm::ParameterSet &)
 
 ~Profiler () override
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

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

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
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsInputProcessBlocks ()
 
static bool wantsProcessBlocks ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

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

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

Definition at line 37 of file CallgrindAnalyzer.cc.

Constructor & Destructor Documentation

◆ Profiler()

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

Definition at line 65 of file CallgrindAnalyzer.cc.

65  {
66  //now do what ever initialization is needed
67  m_firstEvent = parameters.getParameter<int>("firstEvent");
68  m_lastEvent = parameters.getParameter<int>("lastEvent");
69  m_action = parameters.getParameter<int>("action");
70  m_evtCount = 0;
71 }

◆ ~Profiler()

Profiler::~Profiler ( )
override

Definition at line 73 of file CallgrindAnalyzer.cc.

73  {
74  // do anything here that needs to be done at desctruction time
75  // (e.g. close files, deallocate resources etc.)
76 }

Member Function Documentation

◆ analyze()

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

Implements edm::EDAnalyzer.

Definition at line 85 of file CallgrindAnalyzer.cc.

85  {
86  m_evtCount++;
87  if (m_evtCount >= m_firstEvent && (m_evtCount <= m_lastEvent || m_lastEvent == -1)) {
88  switch (m_action) {
89  case 0:
90  CALLGRIND_STOP_INSTRUMENTATION;
91  cout << "Stop Instr" << endl;
92  break;
93  case 1:
94  CALLGRIND_START_INSTRUMENTATION;
95  CALLGRIND_DUMP_STATS;
96  cout << "Start Instr" << endl;
97  break;
98  case 2:
99  CALLGRIND_DUMP_STATS;
100  cout << "Dump stat" << endl;
101  break;
102  }
103  }
104 }

References gather_cfg::cout.

◆ beginJob()

void Profiler::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 108 of file CallgrindAnalyzer.cc.

108 {}

◆ endJob()

void Profiler::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 111 of file CallgrindAnalyzer.cc.

111 {}

Member Data Documentation

◆ m_action

int Profiler::m_action
private

Definition at line 50 of file CallgrindAnalyzer.cc.

◆ m_evtCount

int Profiler::m_evtCount
private

Definition at line 51 of file CallgrindAnalyzer.cc.

◆ m_firstEvent

int Profiler::m_firstEvent
private

Definition at line 48 of file CallgrindAnalyzer.cc.

◆ m_lastEvent

int Profiler::m_lastEvent
private

Definition at line 49 of file CallgrindAnalyzer.cc.

BeamSpotPI::parameters
parameters
Definition: BeamSpotPayloadInspectorHelper.h:30
gather_cfg.cout
cout
Definition: gather_cfg.py:144
Profiler::m_firstEvent
int m_firstEvent
Definition: CallgrindAnalyzer.cc:48
Profiler::m_lastEvent
int m_lastEvent
Definition: CallgrindAnalyzer.cc:49
Profiler::m_action
int m_action
Definition: CallgrindAnalyzer.cc:50
Profiler::m_evtCount
int m_evtCount
Definition: CallgrindAnalyzer.cc:51