ATLAS Offline Software
Public Member Functions | Private Member Functions | Private Attributes | List of all members
PerfMon::PyChrono Class Reference

#include <PyChrono.h>

Collaboration diagram for PerfMon::PyChrono:

Public Member Functions

 PyChrono ()
 Constructor with parameters: More...
 
 ~PyChrono ()
 Destructor: More...
 
void chronoStart (const std::string &t)
 start chrono, tagged by its name More...
 
void chronoStop (const std::string &t)
 stop chrono, tagged by its name More...
 
double chronoDelta (const std::string &t, const std::string &f)
 return chrono delta time of last start/stop pair More...
 

Private Member Functions

 PyChrono (const PyChrono &)
 
PyChronooperator= (const PyChrono &)
 

Private Attributes

ServiceHandle< IChronoStatSvc > m_chronoSvc
 Pointer to the IChronoStatSvc. More...
 

Detailed Description

Definition at line 27 of file PyChrono.h.

Constructor & Destructor Documentation

◆ PyChrono() [1/2]

PyChrono::PyChrono ( )

Constructor with parameters:

Definition at line 33 of file PyChrono.cxx.

33  :
34  m_chronoSvc( "ChronoStatSvc", "PerfMon::PyChrono" )
35 {
36  if ( ! m_chronoSvc.retrieve().isSuccess() ) {
37  throw std::exception();
38  }
39 }

◆ ~PyChrono()

PyChrono::~PyChrono ( )

Destructor:

Definition at line 43 of file PyChrono.cxx.

44 {}

◆ PyChrono() [2/2]

PerfMon::PyChrono::PyChrono ( const PyChrono )
private

Member Function Documentation

◆ chronoDelta()

double PyChrono::chronoDelta ( const std::string &  t,
const std::string &  f 
)

return chrono delta time of last start/stop pair

Parameters
tchrono tag (name)
fchtono type
Returns
delta time

Definition at line 58 of file PyChrono.cxx.

60 {
61  double v = -999.;
62  if ( f == "u" ) {
63  v = static_cast<double>(m_chronoSvc->chronoDelta(t,IChronoStatSvc::USER));
64  } else if ( f == "s" ) {
65  v = static_cast<double>(m_chronoSvc->chronoDelta(t,IChronoStatSvc::KERNEL));
66  } else if ( f == "r" ) {
67  v = static_cast<double>(m_chronoSvc->chronoDelta(t, IChronoStatSvc::ELAPSED));
68  }
69  return v;
70 }

◆ chronoStart()

void PyChrono::chronoStart ( const std::string &  t)

start chrono, tagged by its name

Parameters
tchrno tag (name)
Returns
status code

Definition at line 51 of file PyChrono.cxx.

52 { m_chronoSvc->chronoStart(t); }

◆ chronoStop()

void PyChrono::chronoStop ( const std::string &  t)

stop chrono, tagged by its name

Parameters
tchrono tag (name)
Returns
status code

Definition at line 54 of file PyChrono.cxx.

55 { m_chronoSvc->chronoStop(t); }

◆ operator=()

PyChrono& PerfMon::PyChrono::operator= ( const PyChrono )
private

Member Data Documentation

◆ m_chronoSvc

ServiceHandle<IChronoStatSvc> PerfMon::PyChrono::m_chronoSvc
private

Pointer to the IChronoStatSvc.

Definition at line 73 of file PyChrono.h.


The documentation for this class was generated from the following files:
python.CaloRecoConfig.f
f
Definition: CaloRecoConfig.py:127
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
PerfMon::PyChrono::m_chronoSvc
ServiceHandle< IChronoStatSvc > m_chronoSvc
Pointer to the IChronoStatSvc.
Definition: PyChrono.h:73
calibdata.exception
exception
Definition: calibdata.py:496
python.PyAthena.v
v
Definition: PyAthena.py:157