ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHTimeServer Class Reference

PHTimer server for accessing external information. More...

#include <coresoftware/blob/master/offline/framework/phool/PHTimeServer.h>

+ Collaboration diagram for PHTimeServer:

Classes

class  iterator
 light iterator over PHTimer map More...
 
class  timer
 wrapper around PHTimer, for storage in a map More...
 

Public Member Functions

virtual ~PHTimeServer ()
 destructor
 
timer insert_new (const std::string &)
 insert new timer in map.
 
timer insert_new_single_shot (const std::string &)
 insert new single_shot timer in map.
 
timer get_timer (const std::string &)
 retrieve existing timer. throw exception if not found
 
timer get_single_shot_timer (const std::string &)
 retrieve existing timer. throw exception if not found
 
void print (std::ostream &out=std::cout) const
 dump all registered timer value.
 
void print_stat (std::ostream &out=std::cout) const
 dump all registered timer statistics.
 
iterator range (void)
 return iterator over the map, located at begin
 

Static Public Member Functions

static PHTimeServerget (void)
 singleton accessor
 

Protected Member Functions

 PHTimeServer ()
 constructor
 

Private Types

typedef std::map< std::string,
timer
time_map
 map
 
typedef std::map< std::string,
timer >::iterator 
time_iterator
 iterator over the map.
 
typedef std::map< std::string,
timer >::const_iterator 
const_time_iterator
 iterator over the map.
 

Private Attributes

time_map _timers
 list of timers
 
time_map _single_shot_timers
 list of single shot timers
 
unsigned short _timer_id
 running timer unique id
 
unsigned short _single_shot_timer_id
 running single shot timer unique id
 

Detailed Description

PHTimer server for accessing external information.

Definition at line 25 of file PHTimeServer.h.

View newest version in sPHENIX GitHub at line 25 of file PHTimeServer.h

Member Typedef Documentation

typedef std::map<std::string, timer>::const_iterator PHTimeServer::const_time_iterator
private

iterator over the map.

Definition at line 105 of file PHTimeServer.h.

View newest version in sPHENIX GitHub at line 105 of file PHTimeServer.h

typedef std::map<std::string, timer>::iterator PHTimeServer::time_iterator
private

iterator over the map.

Definition at line 102 of file PHTimeServer.h.

View newest version in sPHENIX GitHub at line 102 of file PHTimeServer.h

typedef std::map<std::string, timer> PHTimeServer::time_map
private

map

Definition at line 99 of file PHTimeServer.h.

View newest version in sPHENIX GitHub at line 99 of file PHTimeServer.h

Constructor & Destructor Documentation

virtual PHTimeServer::~PHTimeServer ( )
inlinevirtual

destructor

Definition at line 67 of file PHTimeServer.h.

View newest version in sPHENIX GitHub at line 67 of file PHTimeServer.h

PHTimeServer::PHTimeServer ( )
inlineprotected

constructor

Definition at line 91 of file PHTimeServer.h.

View newest version in sPHENIX GitHub at line 91 of file PHTimeServer.h

Referenced by get().

+ Here is the caller graph for this function:

Member Function Documentation

static PHTimeServer* PHTimeServer::get ( void  )
inlinestatic

singleton accessor

Definition at line 60 of file PHTimeServer.h.

View newest version in sPHENIX GitHub at line 60 of file PHTimeServer.h

References PHTimeServer().

Referenced by PgPostBankBackupManager::CleanTable(), PgPostBankBackupManager::commitAllBankfromTFile(), and PgPostBankBackupManager::fetchAllBank2TFile().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

PHTimeServer::timer PHTimeServer::get_single_shot_timer ( const std::string &  key)

retrieve existing timer. throw exception if not found

Definition at line 77 of file PHTimeServer.cc.

View newest version in sPHENIX GitHub at line 77 of file PHTimeServer.cc

References _single_shot_timers.

PHTimeServer::timer PHTimeServer::get_timer ( const std::string &  key)

retrieve existing timer. throw exception if not found

Definition at line 62 of file PHTimeServer.cc.

View newest version in sPHENIX GitHub at line 62 of file PHTimeServer.cc

PHTimeServer::timer PHTimeServer::insert_new ( const std::string &  key)

insert new timer in map.

Definition at line 19 of file PHTimeServer.cc.

View newest version in sPHENIX GitHub at line 19 of file PHTimeServer.cc

PHTimeServer::timer PHTimeServer::insert_new_single_shot ( const std::string &  key)

insert new single_shot timer in map.

Definition at line 40 of file PHTimeServer.cc.

View newest version in sPHENIX GitHub at line 40 of file PHTimeServer.cc

void PHTimeServer::print ( std::ostream &  out = std::cout) const

dump all registered timer value.

Definition at line 92 of file PHTimeServer.cc.

View newest version in sPHENIX GitHub at line 92 of file PHTimeServer.cc

References _single_shot_timers, _timers, PHTimer::PRINT(), and PHTimer::RUN.

+ Here is the call graph for this function:

void PHTimeServer::print_stat ( std::ostream &  out = std::cout) const

dump all registered timer statistics.

Definition at line 127 of file PHTimeServer.cc.

View newest version in sPHENIX GitHub at line 127 of file PHTimeServer.cc

References _single_shot_timers, _timers, and PHTimer::PRINT().

+ Here is the call graph for this function:

iterator PHTimeServer::range ( void  )
inline

return iterator over the map, located at begin

Definition at line 159 of file PHTimeServer.h.

View newest version in sPHENIX GitHub at line 159 of file PHTimeServer.h

References _timers.

Member Data Documentation

unsigned short PHTimeServer::_single_shot_timer_id
private

running single shot timer unique id

Definition at line 117 of file PHTimeServer.h.

View newest version in sPHENIX GitHub at line 117 of file PHTimeServer.h

time_map PHTimeServer::_single_shot_timers
private

list of single shot timers

Definition at line 111 of file PHTimeServer.h.

View newest version in sPHENIX GitHub at line 111 of file PHTimeServer.h

Referenced by get_single_shot_timer(), print(), and print_stat().

unsigned short PHTimeServer::_timer_id
private

running timer unique id

Definition at line 114 of file PHTimeServer.h.

View newest version in sPHENIX GitHub at line 114 of file PHTimeServer.h

time_map PHTimeServer::_timers
private

list of timers

Definition at line 108 of file PHTimeServer.h.

View newest version in sPHENIX GitHub at line 108 of file PHTimeServer.h

Referenced by print(), print_stat(), and range().


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