The Gaudi Framework  v33r0 (d5ea422b)
ChronoStatSvc Class Reference

The Chrono & Stat Sservice: service implements the IChronoStatSvc interface and provides the basic chronometry and some statistical counts needed by all applications. More...

#include <src/ChronoStatSvc.h>

Inheritance diagram for ChronoStatSvc:
Collaboration diagram for ChronoStatSvc:

Public Types

using ChronoMap = std::map< IChronoStatSvc::ChronoTag, ChronoEntity >
 some useful typedefs More...
 
using StatMap = std::map< IChronoStatSvc::StatTag, StatEntity >
 
- Public Types inherited from extends< Service, IChronoStatSvc, IIncidentListener >
using base_class = extends
 Typedef to this class. More...
 
using extend_interfaces_base = extend_interfaces< Interfaces... >
 Typedef to the base of this class. More...
 
- Public Types inherited from Service
using Factory = Gaudi::PluginService::Factory< IService *(const std::string &, ISvcLocator *)>
 
- Public Types inherited from PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
using PropertyHolderImpl = PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
 Typedef used to refer to this class from derived classes, as in. More...
 
- Public Types inherited from CommonMessaging< implements< IService, IProperty, IStateful > >
using base_class = CommonMessaging
 
- Public Types inherited from extend_interfaces< Interfaces... >
using ext_iids = typename Gaudi::interface_list_cat< typename Interfaces::ext_iids... >::type
 take union of the ext_iids of all Interfaces... More...
 

Public Member Functions

StatusCode initialize () override
 Implementation of IService::initialize() More...
 
StatusCode finalize () override
 Implementation of IService::finalize() More...
 
ChronoEntitychronoStart (const IChronoStatSvc::ChronoTag &chronoTag) override
 Implementation of IChronoStatSvc::chronoStart. More...
 
const ChronoEntitychronoStop (const IChronoStatSvc::ChronoTag &chronoTag) override
 Implementation of IChronoStatSvc::chronoStop. More...
 
IChronoStatSvc::ChronoTime chronoDelta (const IChronoStatSvc::ChronoTag &chronoTag, IChronoStatSvc::ChronoType theType) override
 Implementation of IchronoStatSvc::chronoDelta. More...
 
void chronoPrint (const IChronoStatSvc::ChronoTag &chronoTag) override
 Implementation of IChronoStatSvc::chronoPrint. More...
 
ChronoStatus chronoStatus (const IChronoStatSvc::ChronoTag &chronoTag) override
 Implementation of IChronoStatSvc::chronoStatus. More...
 
void stat (const IChronoStatSvc::StatTag &statTag, const IChronoStatSvc::StatFlag &statFlag) override
 Implementation of IChronoStatSvc::stat add statistical information to the entity , tagged by its name. More...
 
void statPrint (const IChronoStatSvc::ChronoTag &statTag) override
 prints (using message service) info about statistical entity, tagged by its name More...
 
const ChronoEntitychrono (const IChronoStatSvc::ChronoTag &t) const override
 extract the chrono entity for the given tag (name) More...
 
StatEntitystat (const IChronoStatSvc::StatTag &t) override
 extract the stat entity for the given tag (name) More...
 
 ChronoStatSvc (const std::string &name, ISvcLocator *svcloc)
 Default constructor. More...
 
void merge (const ChronoStatSvc &css)
 Compound assignment operator. More...
 
void handle (const Incident &incident) override
 
 ~ChronoStatSvc () override=default
 
- Public Member Functions inherited from extends< Service, IChronoStatSvc, IIncidentListener >
void * i_cast (const InterfaceID &tid) const override
 Implementation of IInterface::i_cast. More...
 
StatusCode queryInterface (const InterfaceID &ti, void **pp) override
 Implementation of IInterface::queryInterface. More...
 
std::vector< std::stringgetInterfaceNames () const override
 Implementation of IInterface::getInterfaceNames. More...
 
- Public Member Functions inherited from Service
const std::stringname () const override
 Retrieve name of the service. More...
 
StatusCode configure () override
 
StatusCode initialize () override
 
StatusCode start () override
 
StatusCode stop () override
 
StatusCode finalize () override
 
StatusCode terminate () override
 
Gaudi::StateMachine::State FSMState () const override
 
Gaudi::StateMachine::State targetFSMState () const override
 
StatusCode reinitialize () override
 
StatusCode restart () override
 
StatusCode sysInitialize () override
 Initialize Service. More...
 
StatusCode sysStart () override
 Initialize Service. More...
 
StatusCode sysStop () override
 Initialize Service. More...
 
StatusCode sysFinalize () override
 Finalize Service. More...
 
StatusCode sysReinitialize () override
 Re-initialize the Service. More...
 
StatusCode sysRestart () override
 Re-initialize the Service. More...
 
 Service (std::string name, ISvcLocator *svcloc)
 Standard Constructor. More...
 
SmartIF< ISvcLocator > & serviceLocator () const override
 Retrieve pointer to service locator. More...
 
StatusCode setProperties ()
 Method for setting declared properties to the values specified for the job. More...
 
template<class T >
StatusCode service (const std::string &name, const T *&psvc, bool createIf=true) const
 Access a service by name, creating it if it doesn't already exist. More...
 
template<class T >
StatusCode service (const std::string &name, T *&psvc, bool createIf=true) const
 
template<typename IFace = IService>
SmartIF< IFace > service (const std::string &name, bool createIf=true) const
 
template<class T >
StatusCode service (const std::string &svcType, const std::string &svcName, T *&psvc) const
 Access a service by name and type, creating it if it doesn't already exist. More...
 
template<class T >
StatusCode declareTool (ToolHandle< T > &handle, std::string toolTypeAndName, bool createIf=true)
 Declare used tool. More...
 
SmartIF< IAuditorSvc > & auditorSvc () const
 The standard auditor service.May not be invoked before sysInitialize() has been invoked. More...
 
- Public Member Functions inherited from PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
 PropertyHolder ()=default
 
Gaudi::Details::PropertyBasedeclareProperty (Gaudi::Details::PropertyBase &prop)
 Declare a property. More...
 
Gaudi::Details::PropertyBasedeclareProperty (const std::string &name, TYPE &value, const std::string &doc="none")
 Helper to wrap a regular data member and use it as a regular property. More...
 
Gaudi::Details::PropertyBasedeclareProperty (const std::string &name, Gaudi::Property< TYPE, VERIFIER, HANDLERS > &prop, const std::string &doc="none")
 Declare a PropertyBase instance setting name and documentation. More...
 
Gaudi::Details::PropertyBasedeclareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="")
 Declare a remote property. More...
 
StatusCode setProperty (const Gaudi::Details::PropertyBase &p) override
 set the property form another property More...
 
StatusCode setProperty (const std::string &s) override
 set the property from the formatted string More...
 
StatusCode setProperty (const std::string &n, const std::string &v) override
 set the property from name and the value More...
 
StatusCode setProperty (const std::string &name, const TYPE &value)
 set the property form the value More...
 
StatusCode getProperty (Gaudi::Details::PropertyBase *p) const override
 get the property More...
 
const Gaudi::Details::PropertyBasegetProperty (const std::string &name) const override
 get the property by name More...
 
StatusCode getProperty (const std::string &n, std::string &v) const override
 convert the property to the string More...
 
const std::vector< Gaudi::Details::PropertyBase * > & getProperties () const override
 get all properties More...
 
bool hasProperty (const std::string &name) const override
 Return true if we have a property with the given name. More...
 
 PropertyHolder (const PropertyHolder &)=delete
 
PropertyHolderoperator= (const PropertyHolder &)=delete
 
- Public Member Functions inherited from CommonMessaging< implements< IService, IProperty, IStateful > >
MSG::Level msgLevel () const
 get the cached level (originally extracted from the embedded MsgStream) More...
 
bool msgLevel (MSG::Level lvl) const
 get the output level from the embedded MsgStream More...
 
MSG::Level outputLevel () const
 Backward compatibility function for getting the output level. More...
 
- Public Member Functions inherited from CommonMessagingBase
virtual ~CommonMessagingBase ()=default
 Virtual destructor. More...
 
const SmartIF< IMessageSvc > & msgSvc () const
 The standard message service. More...
 
MsgStreammsgStream () const
 Return an uninitialized MsgStream. More...
 
MsgStreammsgStream (const MSG::Level level) const
 Predefined configurable message stream for the efficient printouts. More...
 
MsgStreamalways () const
 shortcut for the method msgStream(MSG::ALWAYS) More...
 
MsgStreamfatal () const
 shortcut for the method msgStream(MSG::FATAL) More...
 
MsgStreamerr () const
 shortcut for the method msgStream(MSG::ERROR) More...
 
MsgStreamerror () const
 shortcut for the method msgStream(MSG::ERROR) More...
 
MsgStreamwarning () const
 shortcut for the method msgStream(MSG::WARNING) More...
 
MsgStreaminfo () const
 shortcut for the method msgStream(MSG::INFO) More...
 
MsgStreamdebug () const
 shortcut for the method msgStream(MSG::DEBUG) More...
 
MsgStreamverbose () const
 shortcut for the method msgStream(MSG::VERBOSE) More...
 
MsgStreammsg () const
 shortcut for the method msgStream(MSG::INFO) More...
 

Protected Member Functions

void printStats ()
 
- Protected Member Functions inherited from Service
 ~Service () override
 Standard Destructor. More...
 
int outputLevel () const
 get the Service's output level More...
 
- Protected Member Functions inherited from PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
Gaudi::Details::PropertyBaseproperty (const std::string &name) const
 
- Protected Member Functions inherited from CommonMessaging< implements< IService, IProperty, IStateful > >
MSG::Level setUpMessaging () const
 Set up local caches. More...
 
MSG::Level resetMessaging ()
 Reinitialize internal states. More...
 
void updateMsgStreamOutputLevel (int level)
 Update the output level of the cached MsgStream. More...
 

Private Types

typedef std::lock_guard< std::mutexlock_t
 
using TimeMap = std::map< ChronoTag, std::vector< IChronoSvc::ChronoTime > >
 

Private Member Functions

 ChronoStatSvc ()=delete
 
 ChronoStatSvc (const ChronoStatSvc &)=delete
 
ChronoStatSvcoperator= (const ChronoStatSvc &)=delete
 
void saveStats ()
 dump the statistics into an ASCII file for offline processing More...
 
bool isMT () const
 
ChronoEntitygetEntity (const ChronoTag &chronoTag)
 

Static Private Member Functions

static MSG::Level int2level (int l)
 

Private Attributes

ChronoMap m_chronoEntities
 chrono part More...
 
std::mutex m_mutex
 Mutex protecting m_chronoEntities. More...
 
MSG::Level m_chronoPrintLevel = MSG::INFO
 level of info printing More...
 
StatMap m_statEntities
 stat part More...
 
MSG::Level m_statPrintLevel = MSG::INFO
 level of info printing More...
 
Gaudi::Property< bool > m_chronoTableFlag
 
Gaudi::Property< bool > m_chronoCoutFlag
 
Gaudi::Property< int > m_intChronoPrintLevel
 
Gaudi::Property< bool > m_chronoOrderFlag {this, "ChronoTableToBeOrdered", true, "should the printout be ordered"}
 
Gaudi::Property< bool > m_printUserTime {this, "PrintUserTime", true}
 
Gaudi::Property< bool > m_printSystemTime {this, "PrintSystemTime", false}
 
Gaudi::Property< bool > m_printEllapsedTime {this, "PrintEllapsedTime", false}
 
Gaudi::Property< bool > m_statTableFlag
 
Gaudi::Property< bool > m_statCoutFlag
 
Gaudi::Property< int > m_intStatPrintLevel
 
Gaudi::Property< bool > m_statOrderFlag {this, "StatTableToBeOrdered", true, "should the printout be ordered"}
 
Gaudi::Property< std::stringm_statsOutFileName
 
Gaudi::Property< std::stringm_header
 
Gaudi::Property< bool > m_useEffFormat
 
Gaudi::Property< std::stringm_perEventFile {this, "PerEventFile", "", "File name for per-event deltas"}
 
ServiceHandle< IInterfacem_hiveWhiteBoardSvc {this, "HiveWhiteBoardSvc", "EventDataSvc"}
 
TimeMap m_perEvtTime
 
std::ofstream m_ofd
 

Additional Inherited Members

- Protected Attributes inherited from Service
Gaudi::StateMachine::State m_state = Gaudi::StateMachine::OFFLINE
 Service state. More...
 
Gaudi::StateMachine::State m_targetState = Gaudi::StateMachine::OFFLINE
 Service state. More...
 
Gaudi::Property< int > m_outputLevel {this, "OutputLevel", MSG::NIL, "output level"}
 
Gaudi::Property< bool > m_auditInit {this, "AuditServices", false, " unused"}
 
Gaudi::Property< bool > m_auditorInitialize {this, "AuditInitialize", false, "trigger auditor on initialize()"}
 
Gaudi::Property< bool > m_auditorStart {this, "AuditStart", false, "trigger auditor on start()"}
 
Gaudi::Property< bool > m_auditorStop {this, "AuditStop", false, "trigger auditor on stop()"}
 
Gaudi::Property< bool > m_auditorFinalize {this, "AuditFinalize", false, "trigger auditor on finalize()"}
 
Gaudi::Property< bool > m_auditorReinitialize {this, "AuditReinitialize", false, "trigger auditor on reinitialize()"}
 
Gaudi::Property< bool > m_auditorRestart {this, "AuditRestart", false, "trigger auditor on restart()"}
 
SmartIF< IAuditorSvcm_pAuditorSvc
 Auditor Service. More...
 

Detailed Description

The Chrono & Stat Sservice: service implements the IChronoStatSvc interface and provides the basic chronometry and some statistical counts needed by all applications.

Author
: Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@i.nosp@m.tep..nosp@m.ru @daate: December 1, 1999

Definition at line 46 of file ChronoStatSvc.h.

Member Typedef Documentation

◆ ChronoMap

using ChronoStatSvc::ChronoMap = std::map<IChronoStatSvc::ChronoTag, ChronoEntity>

some useful typedefs

Definition at line 50 of file ChronoStatSvc.h.

◆ lock_t

Definition at line 165 of file ChronoStatSvc.h.

◆ StatMap

using ChronoStatSvc::StatMap = std::map<IChronoStatSvc::StatTag, StatEntity>

Definition at line 51 of file ChronoStatSvc.h.

◆ TimeMap

Definition at line 210 of file ChronoStatSvc.h.

Constructor & Destructor Documentation

◆ ChronoStatSvc() [1/3]

ChronoStatSvc::ChronoStatSvc ( const std::string name,
ISvcLocator svcloc 
)
inline

Default constructor.

Parameters
nameservice instance name
svclocpointer to service locator

Definition at line 118 of file ChronoStatSvc.h.

118 : base_class( name, svcloc ) {}
extends base_class
Typedef to this class.
Definition: extends.h:24
const std::string & name() const override
Retrieve name of the service.
Definition: Service.cpp:284

◆ ChronoStatSvc() [2/3]

ChronoStatSvc::ChronoStatSvc ( )
privatedelete

◆ ChronoStatSvc() [3/3]

ChronoStatSvc::ChronoStatSvc ( const ChronoStatSvc )
privatedelete

◆ ~ChronoStatSvc()

ChronoStatSvc::~ChronoStatSvc ( )
overridedefault

Member Function Documentation

◆ chrono()

const ChronoEntity * ChronoStatSvc::chrono ( const IChronoStatSvc::ChronoTag &  t) const
override

extract the chrono entity for the given tag (name)

See also
IChronoStatSvc
Parameters
tchrono tag(name)
Returns
pointer to chrono entity

Definition at line 357 of file ChronoStatSvc.cpp.

357  {
358  lock_t lock( m_mutex );
359  auto it = m_chronoEntities.find( t );
360  return m_chronoEntities.end() != it ? &( it->second ) : nullptr;
361 }
std::mutex m_mutex
Mutex protecting m_chronoEntities.
T end(T... args)
T lock(T... args)
T find(T... args)
std::lock_guard< std::mutex > lock_t
ChronoMap m_chronoEntities
chrono part

◆ chronoDelta()

IChronoStatSvc::ChronoTime ChronoStatSvc::chronoDelta ( const IChronoStatSvc::ChronoTag &  chronoTag,
IChronoStatSvc::ChronoType  theType 
)
override

Implementation of IchronoStatSvc::chronoDelta.

See also
IChronoStatSvc

Definition at line 306 of file ChronoStatSvc.cpp.

307  {
308  return getEntity( chronoTag ).delta( theType );
309 }
ChronoEntity & getEntity(const ChronoTag &chronoTag)
IChronoSvc::ChronoTime delta(IChronoSvc::ChronoType type) const
return the last delta-time of type "type"
Definition: ChronoEntity.h:271

◆ chronoPrint()

void ChronoStatSvc::chronoPrint ( const IChronoStatSvc::ChronoTag &  chronoTag)
override

Implementation of IChronoStatSvc::chronoPrint.

See also
IChronoStatSvc

Definition at line 313 of file ChronoStatSvc.cpp.

313  {
314  MsgStream log( msgSvc(), chronoTag );
315  if ( m_printUserTime ) { log << m_chronoPrintLevel << getEntity( chronoTag ).outputUserTime() << endmsg; }
316  if ( m_printSystemTime ) { log << m_chronoPrintLevel << getEntity( chronoTag ).outputSystemTime() << endmsg; }
317 }
ChronoEntity & getEntity(const ChronoTag &chronoTag)
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:34
const SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
Gaudi::Property< bool > m_printUserTime
MSG::Level m_chronoPrintLevel
level of info printing
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:202
std::string outputUserTime() const
print the chrono ;
std::string outputSystemTime() const
print the chrono ;
Gaudi::Property< bool > m_printSystemTime

◆ chronoStart()

ChronoEntity * ChronoStatSvc::chronoStart ( const IChronoStatSvc::ChronoTag &  chronoTag)
override

Implementation of IChronoStatSvc::chronoStart.

See also
IChronoStatSvc

Definition at line 290 of file ChronoStatSvc.cpp.

290  {
291  ChronoEntity& entity = getEntity( chronoTag );
292  entity.start();
293  return &entity;
294 }
ChronoEntity & getEntity(const ChronoTag &chronoTag)
a small helper class for implementation of ChronoStatSvc service, It also could be used as some local...
Definition: ChronoEntity.h:31
IChronoSvc::ChronoStatus start()
start the current chrono

◆ chronoStatus()

IChronoStatSvc::ChronoStatus ChronoStatSvc::chronoStatus ( const IChronoStatSvc::ChronoTag &  chronoTag)
override

Implementation of IChronoStatSvc::chronoStatus.

See also
IChronoStatSvc

Definition at line 321 of file ChronoStatSvc.cpp.

321  {
322  return getEntity( chronoTag ).status();
323 }
ChronoEntity & getEntity(const ChronoTag &chronoTag)
IChronoSvc::ChronoStatus status() const
return the status of chrono
Definition: ChronoEntity.h:187

◆ chronoStop()

const ChronoEntity * ChronoStatSvc::chronoStop ( const IChronoStatSvc::ChronoTag &  chronoTag)
override

Implementation of IChronoStatSvc::chronoStop.

See also
IChronoStatSvc

Definition at line 298 of file ChronoStatSvc.cpp.

298  {
299  ChronoEntity& entity = getEntity( chronoTag );
300  entity.stop();
301  return &entity;
302 }
ChronoEntity & getEntity(const ChronoTag &chronoTag)
a small helper class for implementation of ChronoStatSvc service, It also could be used as some local...
Definition: ChronoEntity.h:31
IChronoSvc::ChronoStatus stop()
stop the chrono

◆ finalize()

StatusCode ChronoStatSvc::finalize ( )
override

Implementation of IService::finalize()

stop its own chrono

Is the final chrono table to be printed?

decoration

CONTINUE

CONTINUE

stop chrono (if it is still in RUNNING status)

print to std::cout

print to MsgStream

decoration

CONTINUE

CONTINUE

stop chrono (if it is still in RUNNING status)

print to std::cout

print to MsgStream

decoration

CONTINUE

CONTINUE

stop chrono (if it is still in RUNNING status)

print to std::cout

print to MsgStream

clear the temporary container

the final decoration

Is the final stat table to be printed?

< finalize the base class

Definition at line 136 of file ChronoStatSvc.cpp.

136  {
137  std::string local = name() + ".finalize()";
139  MsgStream main_log( msgSvc(), local );
142  chronoStop( name() );
143 
144  if ( m_ofd.is_open() ) {
145  debug() << "writing per-event timing data to '" << m_perEventFile << "'" << endmsg;
146  for ( const auto& itr : m_perEvtTime ) {
147  m_ofd << itr.first.substr( 0, itr.first.length() - 8 ) << " ";
148  for ( const auto& itt : itr.second ) { m_ofd << " " << (long int)( itt ); }
149  m_ofd << std::endl;
150  }
151 
152  m_ofd.close();
153  }
154 
159  MsgStream log( msgSvc(), "*****Chrono*****" );
160  const std::string stars( ( m_chronoCoutFlag ) ? 126 : 100, '*' );
161  if ( m_chronoCoutFlag ) {
162  std::cout << stars << std::endl;
163  if ( isMT() ) { std::cout << "WARNING: MT job; statistics are unreliable" << std::endl; }
164  std::cout << local << " The Final CPU consumption (Chrono) Table "
165  << ( m_chronoOrderFlag ? "(ordered)" : "(not ordered)" ) << std::endl;
166  std::cout << stars << std::endl;
167  } else {
168  log << m_chronoPrintLevel << stars << endmsg;
169  if ( isMT() ) { log << m_chronoPrintLevel << "WARNING: MT job; statistics are unreliable" << endmsg; }
170  log << m_chronoPrintLevel << " The Final CPU consumption ( Chrono ) Table "
171  << ( m_chronoOrderFlag ? "(ordered)" : "(not ordered)" ) << endmsg;
172  log << m_chronoPrintLevel << stars << endmsg;
173  }
175  { // prepare container for printing
177  tmpCont.reserve( m_chronoEntities.size() );
178  for ( auto& it : m_chronoEntities ) { tmpCont.emplace_back( &it.second, &it.first ); }
179  // sort it
180  if ( m_chronoOrderFlag ) std::sort( tmpCont.begin(), tmpCont.end(), CompareFirstOfPointerPair );
181  // print User Time statistics
182  if ( m_printUserTime ) {
183  for ( auto iter = tmpCont.begin(); tmpCont.end() != iter; ++iter ) {
184  //
185  ChronoEntity* entity = iter->first;
186  if ( !entity ) { continue; }
187  const ChronoTag* tag = iter->second;
188  if ( !tag ) { continue; }
189  entity->stop();
191  if ( m_chronoCoutFlag )
193  {
194  std::cout << *tag << "\t" << entity->outputUserTime() << std::endl;
195  } else
196  {
197  MsgStream( msgSvc(), *tag ) << m_chronoPrintLevel << entity->outputUserTime() << endmsg;
198  }
199  //
200  }
201  }
203  if ( m_printSystemTime ) {
207  std::cout << stars << std::endl;
208  } else if ( m_printUserTime && !m_chronoCoutFlag ) {
209  log << m_chronoPrintLevel << stars << endmsg;
210  }
212  for ( auto iter = tmpCont.begin(); tmpCont.end() != iter; ++iter ) {
214  ChronoEntity* entity = iter->first;
215  if ( !entity ) { continue; }
216  const ChronoTag* tag = iter->second;
217  if ( !tag ) { continue; }
218  entity->stop();
220  if ( m_chronoCoutFlag )
222  {
223  std::cout << *tag << "\t" << entity->outputSystemTime() << std::endl;
224  } else
225  {
226  MsgStream( msgSvc(), *tag ) << m_chronoPrintLevel << entity->outputSystemTime() << endmsg;
227  }
228  //
229  }
230  }
232  if ( m_printEllapsedTime ) {
236  std::cout << stars << std::endl;
237  } else if ( ( m_printUserTime || m_printSystemTime ) && !m_chronoCoutFlag ) {
238  log << m_chronoPrintLevel << stars << endmsg;
239  }
241  for ( const auto& i : tmpCont ) {
243  ChronoEntity* entity = i.first;
244  if ( !entity ) { continue; }
245  const ChronoTag* tag = i.second;
246  if ( !tag ) { continue; }
247  entity->stop();
249  if ( m_chronoCoutFlag )
251  {
252  std::cout << *tag << "\t" << entity->outputElapsedTime() << std::endl;
253  } else
254  {
255  MsgStream( msgSvc(), *tag ) << m_chronoPrintLevel << entity->outputElapsedTime() << endmsg;
256  }
257  //
258  }
259  }
261  tmpCont.clear();
262  }
264  if ( m_chronoCoutFlag ) {
265  std::cout << stars << std::endl;
266  } else {
267  log << m_chronoPrintLevel << stars << endmsg;
268  }
269  }
270 
272 
274  if ( m_statTableFlag ) { printStats(); }
275 
276  if ( !m_statsOutFileName.value().empty() ) { saveStats(); }
277 
278  // clear the maps.
282 
283  main_log << MSG::INFO << " Service finalized successfully " << endmsg;
284 
285  return Service::finalize();
286 }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:34
T empty(T... args)
const SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
StatusCode finalize() override
Definition: Service.cpp:174
StatMap m_statEntities
stat part
a small helper class for implementation of ChronoStatSvc service, It also could be used as some local...
Definition: ChronoEntity.h:31
T endl(T... args)
Gaudi::Property< bool > m_chronoOrderFlag
Gaudi::Property< bool > m_printUserTime
T end(T... args)
STL class.
const std::string & name() const override
Retrieve name of the service.
Definition: Service.cpp:284
void saveStats()
dump the statistics into an ASCII file for offline processing
constexpr struct CompareFirstOfPointerPair_t CompareFirstOfPointerPair
void clear(STATE_TYPE _i=std::ios_base::failbit)
Definition: MsgStream.h:181
TimeMap m_perEvtTime
T close(T... args)
const ChronoEntity * chronoStop(const IChronoStatSvc::ChronoTag &chronoTag) override
Implementation of IChronoStatSvc::chronoStop.
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
Gaudi::Property< bool > m_chronoTableFlag
T clear(T... args)
std::ofstream m_ofd
MSG::Level m_chronoPrintLevel
level of info printing
Gaudi::Property< bool > m_printEllapsedTime
T size(T... args)
STL class.
T begin(T... args)
Gaudi::Property< bool > m_statTableFlag
bool isMT() const
Gaudi::Property< std::string > m_statsOutFileName
Gaudi::Property< bool > m_chronoCoutFlag
T sort(T... args)
T is_open(T... args)
IChronoSvc::ChronoStatus stop()
stop the chrono
std::string outputElapsedTime() const
print the chrono ;
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:202
std::string outputUserTime() const
print the chrono ;
std::string outputSystemTime() const
print the chrono ;
T reserve(T... args)
ChronoMap m_chronoEntities
chrono part
T emplace_back(T... args)
Gaudi::Property< bool > m_printSystemTime
Gaudi::Property< std::string > m_perEventFile

◆ getEntity()

ChronoEntity& ChronoStatSvc::getEntity ( const ChronoTag &  chronoTag)
inlineprivate

Definition at line 150 of file ChronoStatSvc.h.

150  {
151  lock_t lock( m_mutex );
152  return m_chronoEntities[chronoTag];
153  }
std::mutex m_mutex
Mutex protecting m_chronoEntities.
T lock(T... args)
std::lock_guard< std::mutex > lock_t
ChronoMap m_chronoEntities
chrono part

◆ handle()

void ChronoStatSvc::handle ( const Incident incident)
override

Definition at line 522 of file ChronoStatSvc.cpp.

522  {
523 
524  if ( !m_ofd.is_open() ) return;
525 
526  lock_t lock( m_mutex );
527  for ( const auto& itr : m_chronoEntities ) {
528  if ( itr.first.find( ":Execute" ) == std::string::npos ) continue;
529 
530  auto itm = m_perEvtTime.find( itr.first );
531  if ( itm == m_perEvtTime.end() ) {
532  m_perEvtTime[itr.first] = {itr.second.delta( IChronoSvc::ELAPSED )};
533  } else {
534  itm->second.push_back( itr.second.delta( IChronoSvc::ELAPSED ) );
535  }
536  }
537 }
std::mutex m_mutex
Mutex protecting m_chronoEntities.
T end(T... args)
TimeMap m_perEvtTime
T lock(T... args)
std::ofstream m_ofd
T find(T... args)
std::lock_guard< std::mutex > lock_t
T is_open(T... args)
ChronoMap m_chronoEntities
chrono part

◆ initialize()

StatusCode ChronoStatSvc::initialize ( )
override

Implementation of IService::initialize()

start its own chrono

Definition at line 96 of file ChronoStatSvc.cpp.

96  {
98  if ( sc.isFailure() ) return sc;
100  // Set my own properties
101  sc = setProperties();
102 
103  if ( sc.isFailure() ) {
104  error() << "setting my properties" << endmsg;
105  return StatusCode::FAILURE;
106  }
107 
108  // only add an EndEvent listener if per-event output requested
109  if ( !m_perEventFile.empty() ) {
111  if ( !m_ofd.is_open() ) {
112  error() << "unable to open per-event output file \"" << m_perEventFile << "\"" << endmsg;
113  return StatusCode::FAILURE;
114  } else {
115  auto ii = serviceLocator()->service<IIncidentSvc>( "IncidentSvc" );
116  if ( !ii ) {
117  error() << "Unable to find IncidentSvc" << endmsg;
118  return StatusCode::FAILURE;
119  }
120  ii->addListener( this, IncidentType::EndEvent );
121  }
122  }
123 
129  chronoStart( name() );
131  return StatusCode::SUCCESS;
132 }
StatusCode initialize() override
Definition: Service.cpp:70
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
Definition: Service.cpp:287
T open(T... args)
constexpr static const auto SUCCESS
Definition: StatusCode.h:96
Gaudi::Property< bool > m_printUserTime
StatusCode service(const Gaudi::Utils::TypeNameString &name, T *&svc, bool createIf=true)
Templated method to access a service by name.
Definition: ISvcLocator.h:86
const std::string & name() const override
Retrieve name of the service.
Definition: Service.cpp:284
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:61
Gaudi::Property< bool > m_chronoTableFlag
std::ofstream m_ofd
StatusCode setProperties()
Method for setting declared properties to the values specified for the job.
Definition: Service.cpp:290
Gaudi::Property< bool > m_printEllapsedTime
ChronoEntity * chronoStart(const IChronoStatSvc::ChronoTag &chronoTag) override
Implementation of IChronoStatSvc::chronoStart.
constexpr static const auto FAILURE
Definition: StatusCode.h:97
bool isFailure() const
Definition: StatusCode.h:141
T is_open(T... args)
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:202
The interface implemented by the IncidentSvc service.
Definition: IIncidentSvc.h:33
Gaudi::Property< bool > m_printSystemTime
Gaudi::Property< std::string > m_perEventFile

◆ int2level()

static MSG::Level ChronoStatSvc::int2level ( int  l)
inlinestaticprivate

Definition at line 156 of file ChronoStatSvc.h.

156  {
157  return static_cast<MSG::Level>(
158  std::max( std::min( l, static_cast<int>( MSG::FATAL ) ), static_cast<int>( MSG::NIL ) ) );
159  };
T min(T... args)
T max(T... args)
dictionary l
Definition: gaudirun.py:543

◆ isMT()

bool ChronoStatSvc::isMT ( ) const
private

Definition at line 443 of file ChronoStatSvc.cpp.

443  {
444  bool isMT = false;
446  error() << "Cannot retrieve HiveWhiteBoardSvc";
447  } else {
448  // In non-MT mode, `EventDataSvc' does not have an IHiveWhiteBoard interface.
450  if ( wb && wb->getNumberOfStores() > 1 ) { isMT = true; }
451  }
452  return isMT;
453 }
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
StatusCode retrieve() const
Retrieve the Service.
Definition: ServiceHandle.h:80
ServiceHandle< IInterface > m_hiveWhiteBoardSvc
T * get() const
Release the Service.
Definition: ServiceHandle.h:91
bool isMT() const
bool isFailure() const
Definition: StatusCode.h:141

◆ merge()

void ChronoStatSvc::merge ( const ChronoStatSvc css)

Compound assignment operator.

Definition at line 66 of file ChronoStatSvc.cpp.

66  {
67 
68  // Add the content of the maps, leave the rest unchanged
69 
70  lock_t lock( m_mutex );
71  lock_t otherLock( css.m_mutex );
72 
73  // Merge Chronomaps
74  for ( auto& item : css.m_chronoEntities ) {
75  const IChronoStatSvc::ChronoTag& key = item.first;
76  const ChronoEntity& val = item.second;
77  if ( m_chronoEntities.count( key ) )
78  m_chronoEntities[key] += val;
79  else
81  }
82 
83  // Merge StatMaps
84  for ( auto& item : css.m_statEntities ) {
85  const IChronoStatSvc::StatTag& key = item.first;
86  const StatEntity& val = item.second;
87  if ( m_statEntities.count( key ) )
88  m_statEntities[key] += val;
89  else
90  m_statEntities.emplace( key, val );
91  }
92 }
StatMap m_statEntities
stat part
a small helper class for implementation of ChronoStatSvc service, It also could be used as some local...
Definition: ChronoEntity.h:31
std::mutex m_mutex
Mutex protecting m_chronoEntities.
T lock(T... args)
T count(T... args)
T insert(T... args)
std::lock_guard< std::mutex > lock_t
T emplace(T... args)
backward compatible StatEntity class.
Definition: StatEntity.h:18
ChronoMap m_chronoEntities
chrono part

◆ operator=()

ChronoStatSvc& ChronoStatSvc::operator= ( const ChronoStatSvc )
privatedelete

◆ printStats()

void ChronoStatSvc::printStats ( )
protected

nothing to print?

CONTINUE

CONTINUE

decoration

Definition at line 457 of file ChronoStatSvc.cpp.

457  {
459  if ( m_statEntities.empty() ) { return; }
460 
461  MsgStream log( msgSvc(), "******Stat******" );
463  const std::string stars( ( m_statCoutFlag ) ? 126 : 100, '*' );
465  if ( m_statCoutFlag ) {
466  std::cout << stars << std::endl;
467  if ( isMT() ) { std::cout << "WARNING: MT job; statistics are unreliable" << std::endl; }
468  std::cout << " The Final stat Table " << ( m_statOrderFlag ? "(ordered)" : "(not ordered)" ) << std::endl;
469  std::cout << stars << std::endl;
470  } else {
471  log << m_statPrintLevel << stars << endmsg;
472  if ( isMT() ) { log << (MSG::Level)m_chronoPrintLevel << "WARNING: MT job; statistics are unreliable" << endmsg; }
473  log << m_statPrintLevel << " The Final stat Table " << ( m_statOrderFlag ? "(ordered)" : "(not ordered)" )
474  << endmsg;
475  log << m_statPrintLevel << stars << endmsg;
476  }
477 
478  {
479  // prepare container for printing
481  typedef std::vector<SPair> SCont;
482  SCont tmpCont;
484  []( StatMap::const_reference i ) { return std::make_pair( &i.second, &i.first ); } );
485  // sort it
486  if ( m_statOrderFlag ) std::sort( tmpCont.begin(), tmpCont.end(), CompareFirstOfPointerPair );
487  // print the table header
488  if ( m_statCoutFlag ) {
489  std::cout << m_header.value() << std::endl;
490  } else {
491  log << m_statPrintLevel << m_header.value() << endmsg;
492  }
493 
494  // loop over counters and print them:
495  for ( const auto& iter : tmpCont ) {
497  const StatEntity* entity = iter.first;
498  if ( !entity ) { continue; }
499  const StatTag* tag = iter.second;
500  if ( !tag ) { continue; }
501  if ( m_statCoutFlag ) {
503  entity->print( std::cout, true, *tag, m_useEffFormat, "%|-15.15s|%|17t|" );
504  } else {
505  std::ostringstream ost;
506  entity->print( ost, true, *tag, m_useEffFormat, "%|-15.15s|%|17t|" );
507  log << m_statPrintLevel << ost.str() << endmsg;
508  }
509  }
510  tmpCont.clear();
511  }
513  if ( m_statCoutFlag ) {
514  std::cout << stars << std::endl;
515  } else {
516  log << m_statPrintLevel << stars << endmsg;
517  }
518 }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:34
T empty(T... args)
const SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
Gaudi::Property< std::string > m_header
StatMap m_statEntities
stat part
Gaudi::Property< bool > m_statCoutFlag
T endl(T... args)
T end(T... args)
STL class.
Gaudi::Property< bool > m_useEffFormat
constexpr struct CompareFirstOfPointerPair_t CompareFirstOfPointerPair
void clear(STATE_TYPE _i=std::ios_base::failbit)
Definition: MsgStream.h:181
Gaudi::Property< bool > m_statOrderFlag
T str(T... args)
T make_pair(T... args)
MSG::Level m_chronoPrintLevel
level of info printing
std::ostream & print(std::ostream &o, bool tableFormat, const std::string &name, bool flag=true, std::string fmtHead="%|-48.48s|%|27t|") const
Definition: StatEntity.h:159
STL class.
T begin(T... args)
T back_inserter(T... args)
bool isMT() const
MSG::Level m_statPrintLevel
level of info printing
T sort(T... args)
T transform(T... args)
backward compatible StatEntity class.
Definition: StatEntity.h:18
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:202

◆ saveStats()

void ChronoStatSvc::saveStats ( )
private

dump the statistics into an ASCII file for offline processing

CONTINUE

CONTINUE

Definition at line 376 of file ChronoStatSvc.cpp.

376  {
377  std::ofstream out( m_statsOutFileName.value(), std::ios_base::out | std::ios_base::trunc );
378  if ( !out.good() ) {
379  info() << "Could not open the output file for writing chrono statistics [" << m_statsOutFileName.value() << "]"
380  << endmsg;
381  return;
382  } else {
383  // format it our way
384  out << std::scientific << std::setprecision( 8 );
385  }
386 
387  // ChronoEntity
389  {
390  lock_t lock( m_mutex );
391  chronos.reserve( m_chronoEntities.size() );
393  []( ChronoMap::const_reference i ) { return std::make_pair( &i.second, &i.first ); } );
394  }
395 
396  // sort it
397  std::sort( std::begin( chronos ), std::end( chronos ), CompareFirstOfPointerPair );
398 
399  // print User Time statistics
400  for ( const auto& iter : chronos ) {
401  //
402  const ChronoEntity* entity = iter.first;
403  if ( !entity ) { continue; }
404 
405  const ChronoTag* tag = iter.second;
406  if ( !tag ) { continue; }
407 
408  // create an entry in the .INI-like table
409  out << "\n[" << *tag << "]\n";
410 
411  // user
412  out << "cpu_user_total = " << entity->uTotalTime() << "\n";
413  out << "cpu_user_min = " << entity->uMinimalTime() << "\n";
414  out << "cpu_user_mean = " << entity->uMeanTime() << "\n";
415  out << "cpu_user_RMS = " << entity->uRMSTime() << "\n";
416  out << "cpu_user_max = " << entity->uMaximalTime() << "\n";
417  out << "cpu_user_nbr = " << entity->nOfMeasurements() << "\n";
418 
419  // system
420  out << "\n"; // just for clarity
421  out << "cpu_system_total = " << entity->kTotalTime() << "\n";
422  out << "cpu_system_min = " << entity->kMinimalTime() << "\n";
423  out << "cpu_system_mean = " << entity->kMeanTime() << "\n";
424  out << "cpu_system_RMS = " << entity->kRMSTime() << "\n";
425  out << "cpu_system_max = " << entity->kMaximalTime() << "\n";
426  out << "cpu_system_nbr = " << entity->nOfMeasurements() << "\n";
427 
428  // real
429  out << "\n"; // just for clarity
430  out << "cpu_real_total = " << entity->eTotalTime() << "\n";
431  out << "cpu_real_min = " << entity->eMinimalTime() << "\n";
432  out << "cpu_real_mean = " << entity->eMeanTime() << "\n";
433  out << "cpu_real_RMS = " << entity->eRMSTime() << "\n";
434  out << "cpu_real_max = " << entity->eMaximalTime() << "\n";
435  out << "cpu_real_nbr = " << entity->nOfMeasurements() << "\n";
436  }
437 
438  out << std::endl;
439 }
double eRMSTime() const
r.m.s Elapsed Time
Definition: ChronoEntity.h:255
a small helper class for implementation of ChronoStatSvc service, It also could be used as some local...
Definition: ChronoEntity.h:31
T endl(T... args)
std::mutex m_mutex
Mutex protecting m_chronoEntities.
double uMinimalTime() const
minimal measurement for user time
Definition: ChronoEntity.h:195
T end(T... args)
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
double kRMSTime() const
r.m.s Kernel Time
Definition: ChronoEntity.h:247
STL class.
double eMaximalTime() const
maximal measurement for elapsed time
Definition: ChronoEntity.h:215
double uTotalTime() const
total user time
Definition: ChronoEntity.h:219
constexpr struct CompareFirstOfPointerPair_t CompareFirstOfPointerPair
unsigned long nOfMeasurements() const
number of chrono measurements
Definition: ChronoEntity.h:191
double eMinimalTime() const
minimal measurement for elapsed time
Definition: ChronoEntity.h:203
T lock(T... args)
double uMeanTime() const
average User Time
Definition: ChronoEntity.h:239
double kMeanTime() const
average Kernel Time
Definition: ChronoEntity.h:235
T make_pair(T... args)
double eTotalTime() const
total Elapsed time
Definition: ChronoEntity.h:227
T scientific(T... args)
T size(T... args)
STL class.
double kTotalTime() const
total Kernel time
Definition: ChronoEntity.h:223
T begin(T... args)
T back_inserter(T... args)
std::lock_guard< std::mutex > lock_t
double uMaximalTime() const
maximal measurement for user time
Definition: ChronoEntity.h:207
double kMinimalTime() const
minimal measurement for kernel time
Definition: ChronoEntity.h:199
Gaudi::Property< std::string > m_statsOutFileName
T sort(T... args)
T transform(T... args)
double eMeanTime() const
average Elapsed Time
Definition: ChronoEntity.h:243
T setprecision(T... args)
double kMaximalTime() const
maximal measurement for kernel time
Definition: ChronoEntity.h:211
double uRMSTime() const
r.m.s User Time
Definition: ChronoEntity.h:251
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:202
T reserve(T... args)
ChronoMap m_chronoEntities
chrono part

◆ stat() [1/2]

void ChronoStatSvc::stat ( const IChronoStatSvc::StatTag &  statTag,
const IChronoStatSvc::StatFlag &  statFlag 
)
override

Implementation of IChronoStatSvc::stat add statistical information to the entity , tagged by its name.

See also
IChronoStatSvc

Definition at line 327 of file ChronoStatSvc.cpp.

327  {
328  auto theIter = m_statEntities.find( statTag );
329 
330  StatEntity* theStat = nullptr;
331  // if new entity, specify the number of events to be skipped
332  if ( theIter == m_statEntities.end() ) {
333  // new stat entity
334  StatEntity& theSe = m_statEntities[statTag];
335  theStat = &theSe;
336  } else {
337  // existing stat entity
338  theStat = &theIter->second;
339  }
340 
341  theStat->addFlag( statFlag );
342 }
StatMap m_statEntities
stat part
T end(T... args)
T find(T... args)
unsigned long addFlag(const double v)
Definition: StatEntity.h:85
backward compatible StatEntity class.
Definition: StatEntity.h:18

◆ stat() [2/2]

StatEntity * ChronoStatSvc::stat ( const IChronoStatSvc::StatTag &  t)
override

extract the stat entity for the given tag (name)

See also
IChronoStatSvc
Parameters
tstat tag(name)
Returns
pointer to stat entity

Definition at line 369 of file ChronoStatSvc.cpp.

369  {
370  auto it = m_statEntities.find( t );
371  return m_statEntities.end() != it ? &( it->second ) : nullptr;
372 }
StatMap m_statEntities
stat part
T end(T... args)
T find(T... args)

◆ statPrint()

void ChronoStatSvc::statPrint ( const IChronoStatSvc::ChronoTag &  statTag)
override

prints (using message service) info about statistical entity, tagged by its name

See also
IChronoStatSvc

Definition at line 346 of file ChronoStatSvc.cpp.

346  {
347  MsgStream log( msgSvc(), statTag );
348  log << m_statPrintLevel << m_statEntities[statTag] << endmsg;
349 }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:34
const SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
StatMap m_statEntities
stat part
MSG::Level m_statPrintLevel
level of info printing
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:202

Member Data Documentation

◆ m_chronoCoutFlag

Gaudi::Property<bool> ChronoStatSvc::m_chronoCoutFlag
private
Initial value:
{this, "ChronoDestinationCout", false,
"define the destination of the table to be printed"}

Definition at line 177 of file ChronoStatSvc.h.

◆ m_chronoEntities

ChronoMap ChronoStatSvc::m_chronoEntities
private

chrono part

Definition at line 159 of file ChronoStatSvc.h.

◆ m_chronoOrderFlag

Gaudi::Property<bool> ChronoStatSvc::m_chronoOrderFlag {this, "ChronoTableToBeOrdered", true, "should the printout be ordered"}
private

Definition at line 182 of file ChronoStatSvc.h.

◆ m_chronoPrintLevel

MSG::Level ChronoStatSvc::m_chronoPrintLevel = MSG::INFO
private

level of info printing

Definition at line 168 of file ChronoStatSvc.h.

◆ m_chronoTableFlag

Gaudi::Property<bool> ChronoStatSvc::m_chronoTableFlag
private
Initial value:
{this, "ChronoPrintOutTable", true,
"decide if the final printout should be performed"}

Definition at line 175 of file ChronoStatSvc.h.

◆ m_header

Gaudi::Property<std::string> ChronoStatSvc::m_header
private
Initial value:
{
this, "StatTableHeader",
" | Counter | # | sum | mean/eff^* | rms/err^* | min | max |",
"The header row for the output Stat-table"}

Definition at line 199 of file ChronoStatSvc.h.

◆ m_hiveWhiteBoardSvc

ServiceHandle<IInterface> ChronoStatSvc::m_hiveWhiteBoardSvc {this, "HiveWhiteBoardSvc", "EventDataSvc"}
private

Definition at line 208 of file ChronoStatSvc.h.

◆ m_intChronoPrintLevel

Gaudi::Property<int> ChronoStatSvc::m_intChronoPrintLevel
private
Initial value:
{
this, "ChronoPrintLevel", MSG::INFO, [this]( auto& ) { m_chronoPrintLevel = int2level( m_intChronoPrintLevel ); },
"print level"}

Definition at line 179 of file ChronoStatSvc.h.

◆ m_intStatPrintLevel

Gaudi::Property<int> ChronoStatSvc::m_intStatPrintLevel
private
Initial value:
{this, "StatPrintLevel", MSG::INFO,
[this]( auto& ) { m_statPrintLevel = int2level( m_intStatPrintLevel ); },
"print level"}

Definition at line 190 of file ChronoStatSvc.h.

◆ m_mutex

std::mutex ChronoStatSvc::m_mutex
mutableprivate

Mutex protecting m_chronoEntities.

Definition at line 164 of file ChronoStatSvc.h.

◆ m_ofd

std::ofstream ChronoStatSvc::m_ofd
private

Definition at line 212 of file ChronoStatSvc.h.

◆ m_perEventFile

Gaudi::Property<std::string> ChronoStatSvc::m_perEventFile {this, "PerEventFile", "", "File name for per-event deltas"}
private

Definition at line 206 of file ChronoStatSvc.h.

◆ m_perEvtTime

TimeMap ChronoStatSvc::m_perEvtTime
private

Definition at line 211 of file ChronoStatSvc.h.

◆ m_printEllapsedTime

Gaudi::Property<bool> ChronoStatSvc::m_printEllapsedTime {this, "PrintEllapsedTime", false}
private

Definition at line 185 of file ChronoStatSvc.h.

◆ m_printSystemTime

Gaudi::Property<bool> ChronoStatSvc::m_printSystemTime {this, "PrintSystemTime", false}
private

Definition at line 184 of file ChronoStatSvc.h.

◆ m_printUserTime

Gaudi::Property<bool> ChronoStatSvc::m_printUserTime {this, "PrintUserTime", true}
private

Definition at line 183 of file ChronoStatSvc.h.

◆ m_statCoutFlag

Gaudi::Property<bool> ChronoStatSvc::m_statCoutFlag
private
Initial value:
{this, "StatDestinationCout", false,
"define the destination of the table to be printed"}

Definition at line 188 of file ChronoStatSvc.h.

◆ m_statEntities

StatMap ChronoStatSvc::m_statEntities
private

stat part

Definition at line 171 of file ChronoStatSvc.h.

◆ m_statOrderFlag

Gaudi::Property<bool> ChronoStatSvc::m_statOrderFlag {this, "StatTableToBeOrdered", true, "should the printout be ordered"}
private

Definition at line 193 of file ChronoStatSvc.h.

◆ m_statPrintLevel

MSG::Level ChronoStatSvc::m_statPrintLevel = MSG::INFO
private

level of info printing

Definition at line 173 of file ChronoStatSvc.h.

◆ m_statsOutFileName

Gaudi::Property<std::string> ChronoStatSvc::m_statsOutFileName
private
Initial value:
{
this, "AsciiStatsOutputFile", "",
"Name of the output file storing the stats. If empty, no statistics will be saved (default)"}

Definition at line 195 of file ChronoStatSvc.h.

◆ m_statTableFlag

Gaudi::Property<bool> ChronoStatSvc::m_statTableFlag
private
Initial value:
{this, "StatPrintOutTable", true,
"decide if the final printout should be performed"}

Definition at line 186 of file ChronoStatSvc.h.

◆ m_useEffFormat

Gaudi::Property<bool> ChronoStatSvc::m_useEffFormat
private
Initial value:
{this, "UseEfficiencyRowFormat", true,
"Use the special format for printout of efficiency counters"}

Definition at line 203 of file ChronoStatSvc.h.


The documentation for this class was generated from the following files: