![]() |
The Gaudi Framework
v26r4
|
Simple implementation of the abstract interface ICounterSvc. More...


Public Member Functions | |
| CounterSvc (const std::string &name, ISvcLocator *svcLoc) | |
| Standard Constructor. More... | |
| virtual | ~CounterSvc () |
| Standard destructor. More... | |
| virtual StatusCode | finalize () |
| Finalization. More... | |
| virtual Counter * | get (const std::string &group, const std::string &name) const |
| Access an existing counter object. More... | |
| virtual ICounterSvc::Counters | get (const std::string &group) const |
| get all counters form the given group: More... | |
| virtual StatusCode | create (const std::string &group, const std::string &name, longlong initial_value, Counter *&refpCounter) |
| Create a new counter object. More... | |
| virtual CountObject | create (const std::string &group, const std::string &name, longlong initial_value=0) |
| Create a new counter object. More... | |
| virtual StatusCode | remove (const std::string &group, const std::string &name) |
| Remove a counter object. More... | |
| virtual StatusCode | remove (const std::string &group) |
| Remove all counters of a given group. More... | |
| virtual StatusCode | remove () |
| Remove all known counter objects. More... | |
| virtual StatusCode | print (const std::string &group, const std::string &name, Printout &printer) const |
| Print counter value. More... | |
| virtual StatusCode | print (const std::string &group, Printout &printer) const |
| If no such counter exists the return code is COUNTER_NOT_PRESENT Note: This call is not direct access. More... | |
| virtual StatusCode | print (const Counter *pCounter, Printout &printer) const |
| Print counter value. More... | |
| virtual StatusCode | print (const CountObject &pCounter, Printout &printer) const |
| Print counter value. More... | |
| virtual StatusCode | print (Printout &printer) const |
| virtual StatusCode | defaultPrintout (MsgStream &log, const Counter *pCounter) const |
| Default Printout for counters. More... | |
| void | print () const |
| "standard" printout a'la GaudiCommon More... | |
Public Member Functions inherited from extends< BASE, Interfaces > | |
| 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::string > | getInterfaceNames () const override |
| Implementation of IInterface::getInterfaceNames. More... | |
| ~extends () override=default | |
| Virtual destructor. More... | |
| 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::string > | getInterfaceNames () const override |
| Implementation of IInterface::getInterfaceNames. More... | |
| ~extends () override=default | |
| Virtual destructor. More... | |
Public Member Functions inherited from extend_interfaces< Interfaces...> | |
| ~extend_interfaces () override=default | |
| Virtual destructor. More... | |
| ~extend_interfaces () override=default | |
| Virtual destructor. More... | |
Private Types | |
| typedef GaudiUtils::HashMap< std::string, Counter * > | NameMap |
| typedef GaudiUtils::HashMap< std::string, NameMap > | CountMap |
Private Member Functions | |
| std::pair< std::string, std::string > | _find (const Counter *c) const |
| size_t | num () const |
Private Attributes | |
| CountMap | m_counts |
| the actual map of counters More... | |
| bool | m_print |
| boolean flag to print statistics 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... | |
Additional Inherited Members | |
Public Types inherited from extends< BASE, Interfaces > | |
| typedef extends | base_class |
| Typedef to this class. More... | |
| typedef extend_interfaces< Interfaces...> | extend_interfaces_base |
| Typedef to the base of this class. More... | |
| typedef extends | base_class |
| Typedef to this class. More... | |
| typedef extend_interfaces< Interfaces...> | extend_interfaces_base |
| Typedef to the base of this class. More... | |
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... | |
| using | ext_iids = typename Gaudi::interface_list_cat< typename Interfaces::ext_iids...>::type |
| take union of the ext_iids of all Interfaces... More... | |
Simple implementation of the abstract interface ICounterSvc.
Definition at line 24 of file CounterSvc.cpp.
|
private |
Definition at line 213 of file CounterSvc.cpp.
|
private |
Definition at line 212 of file CounterSvc.cpp.
|
inline |
Standard Constructor.
Definition at line 27 of file CounterSvc.cpp.
|
inlinevirtual |
|
inlineprivate |
Definition at line 186 of file CounterSvc.cpp.
|
virtual |
Create a new counter object.
If the counter object exists already the existing object is returned. In this event the return code is COUNTER_EXISTS. The ownership of the actual counter stays with the service.
| group | [IN] Hint for smart printing |
| name | [IN] Counter name |
| initial_value | [IN] Initial counter value |
| refpCounter | [OUT] Reference to store pointer to counter. |
Definition at line 269 of file CounterSvc.cpp.
|
virtual |
Create a new counter object.
If the counter object exists already, a std::runtime_error exception is thrown. The ownership of the actual counter stays with the service.
| group | [IN] Hint for smart printing |
| name | [IN] Counter name |
| initial_value | [IN] Initial counter value |
| refpCounter | [OUT] Reference to store pointer to counter. |
Definition at line 300 of file CounterSvc.cpp.
|
virtual |
Default Printout for counters.
Definition at line 428 of file CounterSvc.cpp.
|
inlinevirtual |
Finalization.
< finalize the base class
Definition at line 64 of file CounterSvc.cpp.
|
virtual |
Access an existing counter object.
| group | [IN] Hint for smart printing |
| name | [IN] Counter name |
Definition at line 235 of file CounterSvc.cpp.
|
virtual |
get all counters form the given group:
Definition at line 247 of file CounterSvc.cpp.
|
inlineprivate |
Definition at line 200 of file CounterSvc.cpp.
|
virtual |
Print counter value.
| group | [IN] Hint for smart printing |
| name | [IN] Counter name |
| printer | [IN] Print actor |
Definition at line 349 of file CounterSvc.cpp.
|
virtual |
If no such counter exists the return code is COUNTER_NOT_PRESENT Note: This call is not direct access.
| group | [IN] Hint for smart printing |
| printer | [IN] Print actor |
Definition at line 380 of file CounterSvc.cpp.
|
virtual |
Print counter value.
| pCounter | [IN] Pointer to Counter object |
| printer | [IN] Print actor |
Definition at line 397 of file CounterSvc.cpp.
|
virtual |
Print counter value.
| refCounter | [IN] Reference to CountObject object |
| printer | [IN] Print actor |
Definition at line 407 of file CounterSvc.cpp.
|
virtual |
| printer | [IN] Print actor |
Definition at line 413 of file CounterSvc.cpp.
| void CounterSvc::print | ( | ) | const |
"standard" printout a'la GaudiCommon
Definition at line 443 of file CounterSvc.cpp.
|
virtual |
Remove a counter object.
If the counter object does not exists, the return code is COUNTER_NOT_PRESENT. The counter may not be used anymore after this call.
| group | [IN] Hint for smart printing |
| name | [IN] Counter name |
| initial_value | [IN] Initial counter value |
| refpCounter | [OUT] Reference to store pointer to counter. |
Definition at line 313 of file CounterSvc.cpp.
|
virtual |
Remove all counters of a given group.
If no such counter exists the return code is COUNTER_NOT_PRESENT
| group | [IN] Hint for smart printing |
Definition at line 327 of file CounterSvc.cpp.
|
virtual |
Remove all known counter objects.
Definition at line 338 of file CounterSvc.cpp.
|
private |
the actual map of counters
Definition at line 215 of file CounterSvc.cpp.
|
private |
format for regular statistical printout rows
Definition at line 221 of file CounterSvc.cpp.
|
private |
format for "efficiency" statistical printout rows
Definition at line 223 of file CounterSvc.cpp.
|
private |
the header row
Definition at line 219 of file CounterSvc.cpp.
|
private |
boolean flag to print statistics
Definition at line 217 of file CounterSvc.cpp.
|
private |
flag to use the special "efficiency" format
Definition at line 225 of file CounterSvc.cpp.