  | 
  
    ATLAS Offline Software
    
   | 
 
 
 
 
Go to the documentation of this file.
   14 static const std::string BEGINEVENT_INCIDENT_NAME = 
"BeginEvent";
 
   15 static const std::string ENDEVENT_INCIDENT_NAME   = 
"EndEvent";
 
   16 static const std::string ENDEVTLOOP_INCIDENT_NAME = 
"EndEvtLoop";
 
   22   : base_class( 
name, svcloc ),
 
   23     m_incidentSvc( 
"IncidentSvc", 
name ),
 
   24      m_processedEvents( 0 )  {
 
   27                        "Event in which to resume the profiling." );
 
   29                        "Event in which to pause the profiling. Negative number " 
   30                        "profiles the entire event-loop." );
 
   31       declareProperty( 
"ProfiledAlgs", 
m_algs,
 
   32                        "List of profiled algorithms." );
 
   48     ATH_MSG_INFO(
"ResumeEvent/PauseEvent don't work in conjuction with ProfiledAlgs. " <<
 
   49                  "Execute methods of all provided algorithms will be sampled in all events." );
 
   52     ATH_CHECK( auditorSvc()->addAuditor(
"VTuneAuditor") );
 
   64   return StatusCode::SUCCESS;
 
   76     return StatusCode::SUCCESS;
 
   83   m_runner = std::make_unique< VTuneProfileRunner >();
 
   85   return StatusCode::SUCCESS;
 
   97     return StatusCode::SUCCESS;
 
  106   return StatusCode::SUCCESS;
 
  126   if ( !
m_algs.empty() ) 
return;
 
  131   if( inc.type() == ENDEVTLOOP_INCIDENT_NAME ) {
 
  135            << 
"Could not pause the profiling";
 
  144   if( inc.type() == BEGINEVENT_INCIDENT_NAME ) {
 
  154               << 
"Could not resume the profiling";
 
  161   else if( inc.type() == ENDEVENT_INCIDENT_NAME ) {
 
  171               << 
"Could not pause the profiling";
 
  
virtual bool isProfilingRunning() const override
Is the profiling running at the moment?
 
ServiceHandle< IIncidentSvc > m_incidentSvc
Handle to the incident service.
 
virtual StatusCode pauseProfiling() override
Pause profiling.
 
std::atomic< int > m_processedEvents
Number of events processed so far.
 
virtual StatusCode resumeProfiling() override
Resume profiling.
 
int m_resumeEvent
Property: Event in which profiling should start.
 
::StatusCode StatusCode
StatusCode definition for legacy code.
 
VTuneProfilerService(const std::string &name, ISvcLocator *svcloc)
Standard Gaudi service constructor.
 
#define CHECK(...)
Evaluate an expression and check for errors.
 
virtual void handle(const Incident &inc) override
Function handling incoming incidents.
 
int m_pauseEvent
Property: Event in which profiling should pause.
 
Helpers for checking error return status codes and reporting errors.
 
virtual StatusCode initialize() override
Standard Gaudi initialization function.
 
#define REPORT_MESSAGE(LVL)
Report a message.
 
std::unique_ptr< VTuneProfileRunner > m_runner
Unique ptr to the VTuneProfileRunner.
 
#define ATH_MSG_WARNING(x)
 
std::vector< std::string > m_algs
Property: List of algorithms to profile.