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 71 of file L1Timer.h.

Member Function Documentation

◆ Add()

void L1CATFIterTimerInfo::Add ( string  name)
inline

Definition at line 79 of file L1Timer.h.

References TimerInfo::TimerInfo().

80  {
81  fNameToI[name] = fTIs.size();
82  fTIs.push_back(TimerInfo(name));
83  };

◆ Clear()

void L1CATFIterTimerInfo::Clear ( void  )
inline

Definition at line 73 of file L1Timer.h.

References TimerInfo::Clear(), and i.

74  {
75  for (unsigned int i = 0; i < fTIs.size(); i++)
76  fTIs[i].Clear();
77  };
unsigned int i
Definition: P4_F32vec4.h:21

◆ operator+=()

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

Definition at line 86 of file L1Timer.h.

References i.

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

◆ operator/()

L1CATFIterTimerInfo L1CATFIterTimerInfo::operator/ ( float  f)
inline

Definition at line 91 of file L1Timer.h.

References f, and i.

92  {
94  r.fNameToI = fNameToI;
95  r.fTIs.resize(fTIs.size());
96  for (unsigned int i = 0; i < fTIs.size(); ++i) {
97  r.fTIs[i] = fTIs[i] / f;
98  }
99  return r;
100  }
unsigned int i
Definition: P4_F32vec4.h:21
float f
Definition: P4_F32vec4.h:20

◆ operator[]() [1/2]

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

Definition at line 84 of file L1Timer.h.

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

◆ operator[]() [2/2]

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

Definition at line 85 of file L1Timer.h.

References i.

85 { return fTIs[i]; };
unsigned int i
Definition: P4_F32vec4.h:21

◆ PrintNames()

void L1CATFIterTimerInfo::PrintNames ( )
inline

Definition at line 116 of file L1Timer.h.

References i.

117  {
118  cout << fTIs[0].Name();
119  for (unsigned int i = 1; i < fTIs.size(); ++i) {
120  cout << " | " << fTIs[i].Name();
121  }
122  };
unsigned int i
Definition: P4_F32vec4.h:21

◆ PrintReal()

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

Definition at line 102 of file L1Timer.h.

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

103  {
104  if (f) {
105  PrintNames();
106  cout << endl;
107  }
108  fTIs[0].PrintReal();
109  for (unsigned int i = 1; i < fTIs.size(); ++i) {
110  cout << " | " << setw(fTIs[i].Name().size());
111  fTIs[i].PrintReal();
112  }
113  if (f)
114  cout << endl;
115  };
unsigned int i
Definition: P4_F32vec4.h:21
float f
Definition: P4_F32vec4.h:20

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