![]()  | 
						
							 
								EIC Software
							  
							
								Reference for 
								EIC 
								simulation and reconstruction software on GitHub
							  
						 | 
					
#include <fun4all_coresoftware/blob/master/offline/framework/phool/PHTimer.h>
 Collaboration diagram for PHTimer:Classes | |
| class | Frequency | 
| internal frequency read from cpu information file  More... | |
| struct | time_struct | 
| used to store high precision time using two integers  More... | |
Public Types | |
| enum | State { STOP = 0, RUN = 1 } | 
| enum for timer state  More... | |
Public Member Functions | |
| State | get_state (void) const | 
| access timer state   | |
| PHTimer (const std::string &name="Generic Timer") | |
| Construct with a name.   | |
| void | stop () | 
| stops the counter   | |
| void | restart () | 
| Restart timer.   | |
| void | print (std::ostream &os=std::cout) const | 
| Dump elapsed time to provided ostream.   | |
| void | print_stat (std::ostream &os=std::cout) const | 
| Dump statistics.   | |
| void | set_name (const std::string &name) | 
| Set timer name.   | |
| std::string | get_name (void) const | 
| get timer name   | |
| double | get_accumulated_time (void) const | 
| get cumulated time   | |
| unsigned int | get_ncycle (void) const | 
| get number of cycles   | |
| double | get_time_per_cycle (void) const | 
| get averaged time/cycle   | |
| double | elapsed (void) const | 
| retrieve elapsed value since last restart (in ms)   | |
| void | test (double time, std::ostream &os=std::cout) | 
| test PHTimer for a given amount of time (in ms)   | |
Static Public Member Functions | |
| static void | PRINT (std::ostream &os=std::cout, const std::string &message="") | 
| print a message (formated) to a stream   | |
Static Private Member Functions | |
| static time_struct | get_clock_counts (void) | 
| gets time from cpu clock counts   | |
| static double | get_difference (const time_struct &, const time_struct &) | 
| returns difference between to time   | |
Private Attributes | |
| std::string | _name | 
| timer name   | |
| State | _state | 
| timer state   | |
| time_struct | _start_time | 
| start time structure   | |
| time_struct | _stop_time | 
| stop time structure   | |
| double | _accumulated_time | 
| cumulated time   | |
| unsigned int | _ncycle | 
| number of restart/stop cycles   | |
Static Private Attributes | |
| static Frequency | _frequency = PHTimer::Frequency() | 
| static frequency object   | |
| static const double | _twopower32 = pow(2, 32) | 
| to stores 2^32   | |
high precision timer
Definition at line 25 of file PHTimer.h.
View newest version in sPHENIX GitHub at line 25 of file PHTimer.h
| enum PHTimer::State | 
      
  | 
  inlineexplicit | 
Construct with a name.
Definition at line 42 of file PHTimer.h.
View newest version in sPHENIX GitHub at line 42 of file PHTimer.h
References PHTimer::time_struct::_low, and _stop_time.
      
  | 
  inline | 
retrieve elapsed value since last restart (in ms)
Definition at line 126 of file PHTimer.h.
View newest version in sPHENIX GitHub at line 126 of file PHTimer.h
References _start_time, _state, _stop_time, get_clock_counts(), get_difference(), and RUN.
Referenced by print(), and stop().
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  inline | 
get cumulated time
Definition at line 108 of file PHTimer.h.
View newest version in sPHENIX GitHub at line 108 of file PHTimer.h
References _accumulated_time.
Referenced by SvtxEvaluator::fillOutputNtuples(), PHRTreeSeeding::FillTree(), PHActsTrkFitter::getTrackFitResult(), PHActsTrkFitter::loopTracks(), PHHoughSeeding::print_timers(), PHGenFitTrkProp::print_timers(), PHRTreeSeeding::Process(), PHRaveVertexing::process_event(), PHActsTrkFitter::process_event(), and PHActsTrkFitter::updateSvtxTrack().
 Here is the caller graph for this function:
      
  | 
  inlinestaticprivate | 
gets time from cpu clock counts
Definition at line 207 of file PHTimer.h.
View newest version in sPHENIX GitHub at line 207 of file PHTimer.h
References PHTimer::time_struct::_high, PHTimer::time_struct::_low, rdtsc, and t.
Referenced by elapsed(), restart(), and stop().
 Here is the caller graph for this function:
      
  | 
  staticprivate | 
returns difference between to time
Definition at line 64 of file PHTimer.cc.
View newest version in sPHENIX GitHub at line 64 of file PHTimer.cc
References _frequency, PHTimer::time_struct::_high, PHTimer::time_struct::_low, _twopower32, and PHTimer::Frequency::period().
Referenced by elapsed().
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  static | 
print a message (formated) to a stream
Definition at line 80 of file PHTimer.cc.
View newest version in sPHENIX GitHub at line 80 of file PHTimer.cc
Referenced by print(), PHTimeServer::print(), print_stat(), PHTimeServer::print_stat(), Fun4AllServer::PrintTimer(), and test().
 Here is the caller graph for this function:
      
  | 
  inline | 
Dump statistics.
Definition at line 80 of file PHTimer.h.
View newest version in sPHENIX GitHub at line 80 of file PHTimer.h
References _accumulated_time, _name, _ncycle, and PRINT().
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:
      
  | 
  inline | 
Restart timer.
Definition at line 64 of file PHTimer.h.
View newest version in sPHENIX GitHub at line 64 of file PHTimer.h
References _start_time, _state, get_clock_counts(), and RUN.
Referenced by PHG4PhenixEventAction::BeginOfEventAction(), PgPostBankBackupManager::CleanTable(), PgPostBankBackupManager::commitAllBankfromTFile(), PgPostBankBackupManager::fetchAllBank2TFile(), SvtxEvaluator::fillOutputNtuples(), PHRTreeSeeding::FillTree(), PHHoughSeeding::full_track_seeding(), PHActsTrkFitter::getTrackFitResult(), PHGenFitTrkProp::KalmanTrkProp(), PHActsTrkFitter::loopTracks(), PHGenFitTrkProp::OutputPHGenFitTrack(), PHHoughSeeding::Process(), PHGenFitTrkProp::Process(), PHRTreeSeeding::Process(), PHRaveVertexing::process_event(), PHActsTrkFitter::process_event(), PHGenFitTrkProp::SearchHitsNearBy(), test(), PHGenFitTrkProp::TrackPropPatRec(), and PHActsTrkFitter::updateSvtxTrack().
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  inline | 
      
  | 
  inline | 
stops the counter
Definition at line 54 of file PHTimer.h.
View newest version in sPHENIX GitHub at line 54 of file PHTimer.h
References _accumulated_time, _ncycle, _state, _stop_time, elapsed(), get_clock_counts(), and STOP.
Referenced by __example_1.f__(), __example_2.f__(), __example_3.f__(), __example_4.f__(), alphas(), PgPostBankBackupManager::CleanTable(), PgPostBankBackupManager::commitAllBankfromTFile(), ctq4pdf(), ctq5pdf(), ctq6pdf(), d1mach(), PHG4PhenixEventAction::EndOfEventAction(), PgPostBankBackupManager::fetchAllBank2TFile(), SvtxEvaluator::fillOutputNtuples(), PHRTreeSeeding::FillTree(), fitparton(), PHHoughSeeding::full_track_seeding(), PHActsTrkFitter::getTrackFitResult(), grv98pa(), hijing(), hijset(), SvtxEvaluator::Init(), PHPatternReco::InitRun(), PHRaveVertexing::InitRun(), itafun(), linit(), lmidat(), lminew(), PHActsTrkFitter::loopTracks(), luerrm(), lutaud(), lutest(), lweits(), lxsect(), nextun(), nextun5(), nextun6(), PHGenFitTrkProp::OutputPHGenFitTrack(), parpolnew(), parton(), partonx6(), pollazimu(), pollinit(), PHHoughSeeding::Process(), PHGenFitTrkProp::Process(), PHRTreeSeeding::Process(), PHRaveVertexing::process_event(), PHActsTrkFitter::process_event(), pyhiinit(), pyhiinki(), pyhimaxi(), pyhirand(), pyhitest(), pystop(), pyupev(), radgen_init(), rndmq(), PHGenFitTrkProp::SearchHitsNearBy(), setctq4(), setctq5(), setctq6(), PHHoughSeeding::Setup(), PHGenFitTrkProp::Setup(), PHInitZVertexing::Setup(), PHGenFitTrkProp::TrackPropPatRec(), PHActsTrkFitter::updateSvtxTrack(), vacpol(), and xytabl().
 Here is the call graph for this function:
      
  | 
  inline | 
      
  | 
  private | 
cumulated time
Definition at line 238 of file PHTimer.h.
View newest version in sPHENIX GitHub at line 238 of file PHTimer.h
Referenced by get_accumulated_time(), get_time_per_cycle(), print_stat(), and stop().
      
  | 
  staticprivate | 
static frequency object
Definition at line 220 of file PHTimer.h.
View newest version in sPHENIX GitHub at line 220 of file PHTimer.h
Referenced by get_difference().
      
  | 
  private | 
timer name
Definition at line 226 of file PHTimer.h.
View newest version in sPHENIX GitHub at line 226 of file PHTimer.h
Referenced by get_name(), print(), print_stat(), set_name(), and test().
      
  | 
  private | 
number of restart/stop cycles
Definition at line 241 of file PHTimer.h.
View newest version in sPHENIX GitHub at line 241 of file PHTimer.h
Referenced by get_ncycle(), get_time_per_cycle(), print_stat(), and stop().
      
  | 
  private | 
      
  | 
  private | 
      
  | 
  private | 
      
  | 
  staticprivate | 
to stores 2^32
Definition at line 223 of file PHTimer.h.
View newest version in sPHENIX GitHub at line 223 of file PHTimer.h
Referenced by get_difference().