PandaRoot
L1CATFIterTimerInfo Class Reference

#include <L1Timer.h>

Public Member Functions

void Clear ()
 
void Add (string name)
 
TimerInfooperator[] (string name)
 
TimerInfooperator[] (int i)
 
void operator+= (L1CATFIterTimerInfo &t)
 
L1CATFIterTimerInfo operator/ (float f)
 
void PrintReal (int f=0)
 
void PrintNames ()
 

Detailed Description

Definition at line 83 of file L1Timer.h.

Member Function Documentation

◆ Add()

void L1CATFIterTimerInfo::Add ( string  name)
inline

Definition at line 91 of file L1Timer.h.

References TimerInfo::TimerInfo().

92  {
93  fNameToI[name] = fTIs.size();
94  fTIs.push_back(TimerInfo(name));
95  };

◆ Clear()

void L1CATFIterTimerInfo::Clear ( void  )
inline

Definition at line 85 of file L1Timer.h.

References TimerInfo::Clear(), and i.

86  {
87  for (unsigned int i = 0; i < fTIs.size(); i++)
88  fTIs[i].Clear();
89  };
unsigned int i
Definition: P4_F32vec4.h:33

◆ operator+=()

void L1CATFIterTimerInfo::operator+= ( L1CATFIterTimerInfo t)
inline

Definition at line 98 of file L1Timer.h.

References i.

99  {
100  for (unsigned int i = 0; i < fTIs.size(); ++i)
101  fTIs[i] += t[i];
102  }
unsigned int i
Definition: P4_F32vec4.h:33

◆ operator/()

L1CATFIterTimerInfo L1CATFIterTimerInfo::operator/ ( float  f)
inline

Definition at line 103 of file L1Timer.h.

References f, and i.

104  {
106  r.fNameToI = fNameToI;
107  r.fTIs.resize(fTIs.size());
108  for (unsigned int i = 0; i < fTIs.size(); ++i) {
109  r.fTIs[i] = fTIs[i] / f;
110  }
111  return r;
112  }
unsigned int i
Definition: P4_F32vec4.h:33
float f
Definition: P4_F32vec4.h:32

◆ operator[]() [1/2]

TimerInfo& L1CATFIterTimerInfo::operator[] ( string  name)
inline

Definition at line 96 of file L1Timer.h.

96 { return fTIs[fNameToI[name]]; };

◆ operator[]() [2/2]

TimerInfo& L1CATFIterTimerInfo::operator[] ( int  i)
inline

Definition at line 97 of file L1Timer.h.

References i.

97 { return fTIs[i]; };
unsigned int i
Definition: P4_F32vec4.h:33

◆ PrintNames()

void L1CATFIterTimerInfo::PrintNames ( )
inline

Definition at line 128 of file L1Timer.h.

References i.

129  {
130  cout << fTIs[0].Name();
131  for (unsigned int i = 1; i < fTIs.size(); ++i) {
132  cout << " | " << fTIs[i].Name();
133  }
134  };
unsigned int i
Definition: P4_F32vec4.h:33

◆ PrintReal()

void L1CATFIterTimerInfo::PrintReal ( int  f = 0)
inline

Definition at line 114 of file L1Timer.h.

References f, i, and TimerInfo::Name().

115  {
116  if (f) {
117  PrintNames();
118  cout << endl;
119  }
120  fTIs[0].PrintReal();
121  for (unsigned int i = 1; i < fTIs.size(); ++i) {
122  cout << " | " << setw(fTIs[i].Name().size());
123  fTIs[i].PrintReal();
124  }
125  if (f)
126  cout << endl;
127  };
unsigned int i
Definition: P4_F32vec4.h:33
float f
Definition: P4_F32vec4.h:32

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