FairRoot/PandaRoot
Public Member Functions | Private Attributes | List of all members
L1CATFTimerInfo Class Reference

#include <L1Timer.h>

Public Member Functions

 L1CATFTimerInfo ()
 
 L1CATFTimerInfo (int n)
 
void SetNIter (int n)
 
void Clear ()
 
void Add (string name)
 
L1CATFIterTimerInfoGetTimerAll ()
 
L1CATFIterTimerInfooperator[] (int i)
 
void operator+= (L1CATFTimerInfo &t)
 
L1CATFTimerInfo operator/ (float f)
 
void Calc ()
 
L1CATFIterTimerInfoGetAllInfo ()
 
void PrintReal ()
 

Private Attributes

vector< L1CATFIterTimerInfofTIIs
 
L1CATFIterTimerInfo fTIAll
 

Detailed Description

Definition at line 79 of file L1Timer.h.

Constructor & Destructor Documentation

L1CATFTimerInfo::L1CATFTimerInfo ( )
inline

Definition at line 81 of file L1Timer.h.

81 {};
L1CATFTimerInfo::L1CATFTimerInfo ( int  n)
inline

Definition at line 82 of file L1Timer.h.

References fTIIs.

82 { fTIIs.resize(n); };
int n
vector< L1CATFIterTimerInfo > fTIIs
Definition: L1Timer.h:131

Member Function Documentation

void L1CATFTimerInfo::Add ( string  name)
inline

Definition at line 91 of file L1Timer.h.

References L1CATFIterTimerInfo::Add(), fTIAll, fTIIs, and i.

Referenced by PndFTSCAGBTracker::PndFTSCAGBTracker().

91  {
92  for( unsigned int i = 0; i < fTIIs.size(); ++i )
93  fTIIs[i].Add(name);
94  fTIAll.Add(name);
95  }; // use after setniter
Int_t i
Definition: run_full.C:25
void Add(string name)
Definition: L1Timer.h:54
L1CATFIterTimerInfo fTIAll
Definition: L1Timer.h:134
TString name
vector< L1CATFIterTimerInfo > fTIIs
Definition: L1Timer.h:131
void Add(string name)
Definition: L1Timer.h:91
void L1CATFTimerInfo::Calc ( )
inline

Definition at line 109 of file L1Timer.h.

References fTIAll, fTIIs, and i.

109  {
110  fTIAll = fTIIs[0];
111  for( unsigned int i = 1; i < fTIIs.size(); ++i )
112  fTIAll += fTIIs[i];
113  }
Int_t i
Definition: run_full.C:25
L1CATFIterTimerInfo fTIAll
Definition: L1Timer.h:134
vector< L1CATFIterTimerInfo > fTIIs
Definition: L1Timer.h:131
void L1CATFTimerInfo::Clear ( void  )
inline

Definition at line 85 of file L1Timer.h.

References L1CATFIterTimerInfo::Clear(), fTIAll, fTIIs, and i.

85  {
86  for( unsigned int i = 0; i < fTIIs.size(); i++ )
87  fTIIs[i].Clear();
88  fTIAll.Clear();
89  };
Int_t i
Definition: run_full.C:25
void Clear()
Definition: L1Timer.h:85
L1CATFIterTimerInfo fTIAll
Definition: L1Timer.h:134
vector< L1CATFIterTimerInfo > fTIIs
Definition: L1Timer.h:131
L1CATFIterTimerInfo& L1CATFTimerInfo::GetAllInfo ( )
inline

Definition at line 115 of file L1Timer.h.

References fTIAll.

Referenced by operator+=().

115 { return fTIAll; };
L1CATFIterTimerInfo fTIAll
Definition: L1Timer.h:134
L1CATFIterTimerInfo& L1CATFTimerInfo::GetTimerAll ( )
inline

Definition at line 96 of file L1Timer.h.

References fTIAll.

96 { return fTIAll; };
L1CATFIterTimerInfo fTIAll
Definition: L1Timer.h:134
void L1CATFTimerInfo::operator+= ( L1CATFTimerInfo t)
inline

Definition at line 98 of file L1Timer.h.

References fTIAll, fTIIs, GetAllInfo(), and i.

98 { for( unsigned int i = 0; i < fTIIs.size(); ++i ) fTIIs[i] += t[i]; fTIAll += t.GetAllInfo(); }
Int_t i
Definition: run_full.C:25
L1CATFIterTimerInfo & GetAllInfo()
Definition: L1Timer.h:115
L1CATFIterTimerInfo fTIAll
Definition: L1Timer.h:134
vector< L1CATFIterTimerInfo > fTIIs
Definition: L1Timer.h:131
L1CATFTimerInfo L1CATFTimerInfo::operator/ ( float  f)
inline

Definition at line 99 of file L1Timer.h.

References f, fTIAll, fTIIs, i, r, and SetNIter().

99  {
101  r.fTIAll = fTIAll/f;
102  r.SetNIter( fTIIs.size() );
103  for( unsigned int i = 0; i < fTIIs.size(); ++i ) {
104  r.fTIIs[i] = fTIIs[i]/f;
105  }
106  return r;
107  }
double r
Definition: RiemannTest.C:14
Int_t i
Definition: run_full.C:25
void SetNIter(int n)
Definition: L1Timer.h:83
L1CATFIterTimerInfo fTIAll
Definition: L1Timer.h:134
TFile * f
Definition: bump_analys.C:12
vector< L1CATFIterTimerInfo > fTIIs
Definition: L1Timer.h:131
L1CATFIterTimerInfo& L1CATFTimerInfo::operator[] ( int  i)
inline

Definition at line 97 of file L1Timer.h.

References fTIIs, and i.

97 { return fTIIs[i]; };
Int_t i
Definition: run_full.C:25
vector< L1CATFIterTimerInfo > fTIIs
Definition: L1Timer.h:131
void L1CATFTimerInfo::PrintReal ( )
inline

Definition at line 116 of file L1Timer.h.

References fTIAll, fTIIs, i, L1CATFIterTimerInfo::PrintNames(), and L1CATFIterTimerInfo::PrintReal().

Referenced by PndCAGBTracker::FindTracks().

116  {
117  //save original cout flags
118  std::ios_base::fmtflags coutFlags = cout.flags();
119 
120  int old_precision = cout.precision(1);
121  cout.setf(ios::fixed);
122  cout << " stage "<< " : "; fTIAll.PrintNames(); cout << endl;
123  for( unsigned int i = 0; i < fTIIs.size(); ++i ) {
124  cout << " iter " << i << " : "; fTIIs[i].PrintReal(); cout << endl;
125  }
126  cout << " all "<< " : "; fTIAll.PrintReal(); cout << endl;
127 
128  //restore original cout flags
129  cout.flags(coutFlags);
130  cout.precision(old_precision);
131  };
Int_t i
Definition: run_full.C:25
L1CATFIterTimerInfo fTIAll
Definition: L1Timer.h:134
void PrintNames()
Definition: L1Timer.h:73
vector< L1CATFIterTimerInfo > fTIIs
Definition: L1Timer.h:131
void PrintReal(int f=0)
Definition: L1Timer.h:68
void L1CATFTimerInfo::SetNIter ( int  n)
inline

Definition at line 83 of file L1Timer.h.

References fTIIs.

Referenced by operator/(), and PndFTSCAGBTracker::PndFTSCAGBTracker().

83 { fTIIs.resize(n); };
int n
vector< L1CATFIterTimerInfo > fTIIs
Definition: L1Timer.h:131

Member Data Documentation

L1CATFIterTimerInfo L1CATFTimerInfo::fTIAll
private

Definition at line 134 of file L1Timer.h.

Referenced by Add(), Calc(), Clear(), GetAllInfo(), GetTimerAll(), operator+=(), operator/(), and PrintReal().

vector<L1CATFIterTimerInfo> L1CATFTimerInfo::fTIIs
private

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