![]() |
The Gaudi Framework
v25r3
|
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>
Public Types | |
typedef std::map < IChronoStatSvc::ChronoTag, ChronoEntity > | ChronoMap |
some useful typedefs More... | |
typedef std::map < IChronoStatSvc::StatTag, StatEntity > | StatMap |
![]() | |
typedef extends2 | base_class |
Typedef to this class. More... | |
typedef extend_interfaces2 < IChronoStatSvc, IIncidentListener > | extend_interfaces_base |
Typedef to the base of this class. More... | |
typedef extend_interfaces_base::ext_iids | interfaces |
MPL set of all the implemented interfaces. More... | |
![]() | |
typedef Gaudi::PluginService::Factory2 < IService *, const std::string &, ISvcLocator * > | Factory |
![]() | |
typedef CommonMessaging | base_class |
![]() | |
typedef implements3 | base_class |
Typedef to this class. More... | |
typedef extend_interfaces3 < IService, IProperty, IStateful > | extend_interfaces_base |
Typedef to the base of this class. More... | |
typedef extend_interfaces_base::ext_iids | interfaces |
MPL set of all the implemented interfaces. More... | |
![]() | |
typedef mpl::fold< typename IService::iid::iids::type, typename mpl::fold< typename IProperty::iid::iids::type, typename IStateful::iid::iids::type, mpl::insert< mpl::_1, mpl::_2 > >::type, mpl::insert< mpl::_1, mpl::_2 > >::type | ext_iids |
MPL set of interfaces extended by this one. More... | |
![]() | |
enum | Status { SUCCESS = 1, NO_INTERFACE, VERSMISMATCH, LAST_ERROR } |
Return status. More... | |
typedef Gaudi::InterfaceId < IInterface, 0, 0 > | iid |
Interface ID. More... | |
typedef mpl::set1< iid > | ext_iids |
Extra interfaces. More... | |
![]() | |
typedef mpl::fold< typename IChronoStatSvc::iid::iids::type, typename IIncidentListener::iid::iids::type, mpl::insert< mpl::_1, mpl::_2 > >::type | ext_iids |
MPL set of interfaces extended by this one. More... | |
![]() | |
typedef mpl::fold< typename IService::iid::iids::type, typename mpl::fold< typename IChronoSvc::iid::iids::type, typename IStatSvc::iid::iids::type, mpl::insert< mpl::_1, mpl::_2 > >::type, mpl::insert< mpl::_1, mpl::_2 > >::type | ext_iids |
MPL set of interfaces extended by this one. More... | |
![]() | |
enum | ChronoStatus { UNKNOWN = 0, RUNNING, STOPPED } |
enum | ChronoType { USER = 0, KERNEL, ELAPSED } |
typedef std::string | ChronoTag |
the actual type of identifier for Chrono objects More... | |
typedef double | ChronoTime |
Type of the delta-time. More... | |
![]() | |
typedef std::string | StatTag |
the actual identificator of Stat More... | |
typedef double | StatFlag |
the actual value type used for Stat More... | |
Public Member Functions | |
virtual StatusCode | initialize () |
Implementation of IService::initialize() More... | |
virtual StatusCode | finalize () |
Implementation of IService::finalize() More... | |
virtual ChronoEntity * | chronoStart (const IChronoStatSvc::ChronoTag &chronoTag) |
Implementation of IChronoStatSvc::chronoStart. More... | |
virtual const ChronoEntity * | chronoStop (const IChronoStatSvc::ChronoTag &chronoTag) |
Implementation of IChronoStatSvc::chronoStop. More... | |
virtual IChronoStatSvc::ChronoTime | chronoDelta (const IChronoStatSvc::ChronoTag &chronoTag, IChronoStatSvc::ChronoType theType) |
Implementation of IchronoStatSvc::chronoDelta. More... | |
virtual void | chronoPrint (const IChronoStatSvc::ChronoTag &chronoTag) |
Implementation of IChronoStatSvc::chronoPrint. More... | |
virtual ChronoStatus | chronoStatus (const IChronoStatSvc::ChronoTag &chronoTag) |
Implementation of IChronoStatSvc::chronoStatus. More... | |
virtual void | stat (const IChronoStatSvc::StatTag &statTag, const IChronoStatSvc::StatFlag &statFlag) |
Implementation of IChronoStatSvc::stat add statistical information to the entity , tagged by its name. More... | |
virtual void | statPrint (const IChronoStatSvc::ChronoTag &statTag) |
prints (using message service) info about statistical entity, tagged by its name More... | |
virtual const ChronoEntity * | chrono (const IChronoStatSvc::ChronoTag &t) const |
extract the chrono entity for the given tag (name) More... | |
virtual const StatEntity * | stat (const IChronoStatSvc::StatTag &t) const |
extract the stat entity for the given tag (name) More... | |
ChronoStatSvc (const std::string &name, ISvcLocator *svcloc) | |
Default constructor. More... | |
virtual | ~ChronoStatSvc () |
Destructor. More... | |
void | handle (const Incident &incident) |
Inform that a new incident has occurred. More... | |
![]() | |
extends2 (A1 a1, A2 a2, A3 a3) | |
Templated constructor with 3 arguments. More... | |
extends2 (A1 a1, A2 a2) | |
Templated constructor with 2 arguments. More... | |
extends2 (A1 a1) | |
Templated constructor with 1 argument. More... | |
extends2 () | |
Default constructor. More... | |
virtual void * | i_cast (const InterfaceID &tid) const |
Implementation of IInterface::i_cast. More... | |
virtual StatusCode | queryInterface (const InterfaceID &ti, void **pp) |
Implementation of IInterface::queryInterface. More... | |
virtual std::vector< std::string > | getInterfaceNames () const |
Implementation of IInterface::getInterfaceNames. More... | |
virtual | ~extends2 () |
Virtual destructor. More... | |
![]() | |
virtual unsigned long | release () |
Release Interface instance. More... | |
virtual const std::string & | name () const |
Retrieve name of the service. More... | |
virtual StatusCode | configure () |
Configuration (from OFFLINE to CONFIGURED). More... | |
virtual StatusCode | start () |
Start (from INITIALIZED to RUNNING). More... | |
virtual StatusCode | stop () |
Stop (from RUNNING to INITIALIZED). More... | |
virtual StatusCode | terminate () |
Initialization (from CONFIGURED to OFFLINE). More... | |
virtual Gaudi::StateMachine::State | FSMState () const |
Get the current state. More... | |
virtual Gaudi::StateMachine::State | targetFSMState () const |
When we are in the middle of a transition, get the state where the transition is leading us. More... | |
virtual StatusCode | reinitialize () |
Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED). More... | |
virtual StatusCode | restart () |
Initialization (from RUNNING to RUNNING, via INITIALIZED). More... | |
virtual StatusCode | sysInitialize () |
Initialize Service. More... | |
virtual StatusCode | sysStart () |
Initialize Service. More... | |
virtual StatusCode | sysStop () |
Initialize Service. More... | |
virtual StatusCode | sysFinalize () |
Finalize Service. More... | |
virtual StatusCode | sysReinitialize () |
Re-initialize the Service. More... | |
virtual StatusCode | sysRestart () |
Re-initialize the Service. More... | |
virtual StatusCode | setProperty (const Property &p) |
Set the property by property. More... | |
virtual StatusCode | setProperty (const std::string &s) |
Set the property by string. More... | |
virtual StatusCode | setProperty (const std::string &n, const std::string &v) |
Set the property by std::string. More... | |
virtual StatusCode | getProperty (Property *p) const |
Get the property by property. More... | |
virtual const Property & | getProperty (const std::string &name) const |
Get the property by name. More... | |
virtual StatusCode | getProperty (const std::string &n, std::string &v) const |
Get the property by std::string. More... | |
virtual const std::vector < Property * > & | getProperties () const |
Get list of properties. More... | |
template<class TYPE > | |
StatusCode | setProperty (const std::string &name, const TYPE &value) |
set the property form the value More... | |
Service (const std::string &name, ISvcLocator *svcloc) | |
Standard Constructor. More... | |
SmartIF< ISvcLocator > & | serviceLocator () const |
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<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 > | |
Property * | declareProperty (const std::string &name, T &property, const std::string &doc="none") const |
Declare the named property. More... | |
Property * | declareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="") const |
Declare remote named properties. More... | |
SmartIF< IAuditorSvc > & | auditorSvc () const |
The standard auditor service.May not be invoked before sysInitialize() has been invoked. More... | |
![]() | |
CommonMessaging (const A1 &a1, const A2 &a2, const A3 &a3) | |
Templated constructor with 3 arguments. More... | |
CommonMessaging (const A1 &a1, const A2 &a2) | |
Templated constructor with 2 arguments. More... | |
CommonMessaging (const A1 &a1) | |
Templated constructor with 1 argument. More... | |
CommonMessaging () | |
Default constructor. More... | |
virtual | ~CommonMessaging () |
Virtual destructor. More... | |
SmartIF< IMessageSvc > & | msgSvc () const |
The standard message service. More... | |
MsgStream & | msgStream () const |
Return an uninitialized MsgStream. More... | |
MsgStream & | msgStream (const MSG::Level level) const |
Predefined configurable message stream for the efficient printouts. More... | |
MsgStream & | always () const |
shortcut for the method msgStream(MSG::ALWAYS) More... | |
MsgStream & | fatal () const |
shortcut for the method msgStream(MSG::FATAL) More... | |
MsgStream & | err () const |
shortcut for the method msgStream(MSG::ERROR) More... | |
MsgStream & | error () const |
shortcut for the method msgStream(MSG::ERROR) More... | |
MsgStream & | warning () const |
shortcut for the method msgStream(MSG::WARNING) More... | |
MsgStream & | info () const |
shortcut for the method msgStream(MSG::INFO) More... | |
MsgStream & | debug () const |
shortcut for the method msgStream(MSG::DEBUG) More... | |
MsgStream & | verbose () const |
shortcut for the method msgStream(MSG::VERBOSE) More... | |
MsgStream & | msg () const |
shortcut for the method msgStream(MSG::INFO) More... | |
MSG::Level | msgLevel () const |
get the output level from the embedded MsgStream More... | |
bool | msgLevel (MSG::Level lvl) const |
get the output level from the embedded MsgStream More... | |
![]() | |
virtual | ~extend_interfaces3 () |
Virtual destructor. More... | |
![]() | |
DeclareInterfaceID (IService, 3, 0) | |
InterfaceID. More... | |
virtual | ~IService () |
virtual destructor More... | |
![]() | |
DeclareInterfaceID (INamedInterface, 1, 0) | |
InterfaceID. More... | |
virtual | ~INamedInterface () |
Virtual destructor (always needed for abstract classes). More... | |
![]() | |
virtual unsigned long | addRef ()=0 |
Increment the reference count of Interface instance. More... | |
virtual unsigned long | refCount () const =0 |
Current reference count. More... | |
virtual | ~IInterface () |
Virtual destructor. More... | |
![]() | |
DeclareInterfaceID (IProperty, 2, 0) | |
InterfaceID. More... | |
![]() | |
DeclareInterfaceID (IStateful, 1, 0) | |
InterfaceID. More... | |
virtual | ~IStateful () |
![]() | |
virtual | ~extend_interfaces2 () |
Virtual destructor. More... | |
![]() | |
DeclareInterfaceIDMultiBase (IChronoStatSvc, 6, 0) | |
InterfaceID. More... | |
![]() | |
virtual | ~extend_interfaces3 () |
Virtual destructor. More... | |
![]() | |
DeclareInterfaceID (IChronoSvc, 3, 0) | |
InterfaceID. More... | |
![]() | |
DeclareInterfaceID (IStatSvc, 2, 0) | |
InterfaceID. More... | |
![]() | |
DeclareInterfaceID (IIncidentListener, 2, 0) | |
InterfaceID. More... | |
Protected Member Functions | |
void | printStats () |
![]() | |
virtual | ~Service () |
Standard Destructor. More... | |
int | outputLevel () const |
get the Service's output level More... | |
![]() | |
void | updateMsgStreamOutputLevel (int level) |
Update the output level of the cached MsgStream. More... | |
![]() | |
virtual | ~IChronoStatSvc () |
virtual desctructor More... | |
![]() | |
virtual | ~IChronoSvc () |
protected and virtual destructor More... | |
![]() | |
virtual | ~IStatSvc () |
Destructor. More... | |
Private Types | |
typedef std::map< ChronoTag, std::vector < IChronoSvc::ChronoTime > > | TimeMap |
Private Member Functions | |
ChronoStatSvc () | |
ChronoStatSvc (const ChronoStatSvc &) | |
ChronoStatSvc & | operator= (const ChronoStatSvc &) |
void | saveStats () |
dump the statistics into an ASCII file for offline processing More... | |
Private Attributes | |
ChronoMap | m_chronoEntities |
chrono part More... | |
int | m_intChronoPrintLevel |
level of info printing More... | |
MSG::Level | m_chronoPrintLevel |
bool | m_chronoTableFlag |
flag for printing the final table More... | |
bool | m_chronoCoutFlag |
flag for destination of the the final table More... | |
bool | m_chronoOrderFlag |
flag for formattion the final statistic table More... | |
bool | m_printUserTime |
flag for printing User quantities More... | |
bool | m_printSystemTime |
flag for printing System quantities More... | |
bool | m_printEllapsedTime |
flag for printing Ellapsed quantities More... | |
long | m_numberOfSkippedEventsForMemStat |
StatMap | m_statEntities |
stat part More... | |
int | m_intStatPrintLevel |
level of info printing More... | |
MSG::Level | m_statPrintLevel |
bool | m_statTableFlag |
flag for printing the final table More... | |
bool | m_statCoutFlag |
flag for destination of the t he final table More... | |
bool | m_statOrderFlag |
flag for formattion the final statistic table More... | |
StringProperty | m_statsOutFileName |
Name of the output file where we'll dump the stats. More... | |
std::string | m_header |
the header row More... | |
std::string | m_format1 |
format for regular statistical printout rows More... | |
std::string | m_format2 |
format for "efficiency" statistical printout rows More... | |
bool | m_useEffFormat |
flag to use the special "efficiency" format More... | |
TimeMap | m_perEvtTime |
std::string | m_perEventFile |
std::ofstream | m_ofd |
Additional Inherited Members | |
![]() | |
static const InterfaceID & | interfaceID () |
Return an instance of InterfaceID identifying the interface. More... | |
![]() | |
IntegerProperty | m_outputLevel |
Service output level. More... | |
Gaudi::StateMachine::State | m_state |
Service state. More... | |
Gaudi::StateMachine::State | m_targetState |
Service state. More... | |
![]() | |
SmartIF< IMessageSvc > | m_msgsvc |
Pointer to the message service;. More... | |
std::auto_ptr< MsgStream > | m_msgStream |
The predefined message stream. More... | |
bool | m_streamWithService |
Flag to create a new MsgStream if it was created without the message service. More... | |
The Chrono & Stat Sservice: service implements the IChronoStatSvc interface and provides the basic chronometry and some statistical counts needed by all applications.
Definition at line 33 of file ChronoStatSvc.h.
typedef std::map<IChronoStatSvc::ChronoTag,ChronoEntity> ChronoStatSvc::ChronoMap |
some useful typedefs
Definition at line 38 of file ChronoStatSvc.h.
typedef std::map<IChronoStatSvc::StatTag,StatEntity> ChronoStatSvc::StatMap |
Definition at line 39 of file ChronoStatSvc.h.
|
private |
Definition at line 191 of file ChronoStatSvc.h.
ChronoStatSvc::ChronoStatSvc | ( | const std::string & | name, |
ISvcLocator * | svcloc | ||
) |
Default constructor.
name | service instance name |
svcloc | pointer to servcie locator |
decide if the final printout should be performed
define the destination of the table to be printed
print level
if printout is to be performed, should one take care about some ordering?
if User Time information to be printed?
if System Time information to be printed?
if Ellapsed Time information to be printed?
deside if the final printout should be performed
define the destination of the table to be printed
print level
if printout is to be performed, should one take care about some ordering?
Definition at line 87 of file ChronoStatSvc.cpp.
|
virtual |
Destructor.
Definition at line 171 of file ChronoStatSvc.cpp.
|
private |
|
private |
|
virtual |
extract the chrono entity for the given tag (name)
t | chrono tag(name) |
Implements IChronoSvc.
Definition at line 509 of file ChronoStatSvc.cpp.
|
virtual |
Implementation of IchronoStatSvc::chronoDelta.
Implements IChronoSvc.
Definition at line 437 of file ChronoStatSvc.cpp.
|
virtual |
Implementation of IChronoStatSvc::chronoPrint.
Implements IChronoSvc.
Definition at line 446 of file ChronoStatSvc.cpp.
|
virtual |
Implementation of IChronoStatSvc::chronoStart.
Implements IChronoSvc.
Definition at line 415 of file ChronoStatSvc.cpp.
|
virtual |
Implementation of IChronoStatSvc::chronoStatus.
Implements IChronoSvc.
Definition at line 465 of file ChronoStatSvc.cpp.
|
virtual |
Implementation of IChronoStatSvc::chronoStop.
Implements IChronoSvc.
Definition at line 426 of file ChronoStatSvc.cpp.
|
virtual |
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
Reimplemented from Service.
Definition at line 246 of file ChronoStatSvc.cpp.
|
virtual |
Inform that a new incident has occurred.
Implements IIncidentListener.
Definition at line 688 of file ChronoStatSvc.cpp.
|
virtual |
Implementation of IService::initialize()
redefine some "properties"
start its own chrono
Reimplemented from Service.
Definition at line 181 of file ChronoStatSvc.cpp.
|
private |
|
protected |
nothing to print?
CONTINUE
CONTINUE
decoration
Definition at line 610 of file ChronoStatSvc.cpp.
|
private |
dump the statistics into an ASCII file for offline processing
CONTINUE
CONTINUE
Definition at line 532 of file ChronoStatSvc.cpp.
|
virtual |
Implementation of IChronoStatSvc::stat add statistical information to the entity , tagged by its name.
Implements IStatSvc.
Definition at line 471 of file ChronoStatSvc.cpp.
|
virtual |
extract the stat entity for the given tag (name)
t | stat tag(name) |
Implements IStatSvc.
Definition at line 523 of file ChronoStatSvc.cpp.
|
virtual |
prints (using message service) info about statistical entity, tagged by its name
Implements IStatSvc.
Definition at line 496 of file ChronoStatSvc.cpp.
|
private |
flag for destination of the the final table
Definition at line 152 of file ChronoStatSvc.h.
|
private |
chrono part
Definition at line 145 of file ChronoStatSvc.h.
|
private |
flag for formattion the final statistic table
Definition at line 154 of file ChronoStatSvc.h.
|
private |
Definition at line 148 of file ChronoStatSvc.h.
|
private |
flag for printing the final table
Definition at line 150 of file ChronoStatSvc.h.
|
private |
format for regular statistical printout rows
Definition at line 185 of file ChronoStatSvc.h.
|
private |
format for "efficiency" statistical printout rows
Definition at line 187 of file ChronoStatSvc.h.
|
private |
the header row
Definition at line 183 of file ChronoStatSvc.h.
|
private |
level of info printing
Definition at line 147 of file ChronoStatSvc.h.
|
private |
level of info printing
Definition at line 169 of file ChronoStatSvc.h.
|
private |
Definition at line 163 of file ChronoStatSvc.h.
|
private |
Definition at line 194 of file ChronoStatSvc.h.
|
private |
Definition at line 193 of file ChronoStatSvc.h.
|
private |
Definition at line 192 of file ChronoStatSvc.h.
|
private |
flag for printing Ellapsed quantities
Definition at line 160 of file ChronoStatSvc.h.
|
private |
flag for printing System quantities
Definition at line 158 of file ChronoStatSvc.h.
|
private |
flag for printing User quantities
Definition at line 156 of file ChronoStatSvc.h.
|
private |
flag for destination of the t he final table
Definition at line 174 of file ChronoStatSvc.h.
|
private |
stat part
Definition at line 166 of file ChronoStatSvc.h.
|
private |
flag for formattion the final statistic table
Definition at line 176 of file ChronoStatSvc.h.
|
private |
Definition at line 170 of file ChronoStatSvc.h.
|
private |
Name of the output file where we'll dump the stats.
Definition at line 180 of file ChronoStatSvc.h.
|
private |
flag for printing the final table
Definition at line 172 of file ChronoStatSvc.h.
|
private |
flag to use the special "efficiency" format
Definition at line 189 of file ChronoStatSvc.h.