PandaRoot
PndCATFIterTimerInfo Class Reference

#include <PndCATimer.h>

Public Member Functions

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

Detailed Description

Definition at line 83 of file PndCATimer.h.

Member Function Documentation

◆ Add()

void PndCATFIterTimerInfo::Add ( string  name)
inline

Definition at line 91 of file PndCATimer.h.

References PndCATimerInfo::PndCATimerInfo().

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

◆ Clear()

void PndCATFIterTimerInfo::Clear ( void  )
inline

Definition at line 85 of file PndCATimer.h.

References PndCATimerInfo::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 PndCATFIterTimerInfo::operator+= ( PndCATFIterTimerInfo t)
inline

Definition at line 98 of file PndCATimer.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/()

PndCATFIterTimerInfo PndCATFIterTimerInfo::operator/ ( float  f)
inline

Definition at line 103 of file PndCATimer.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]

PndCATimerInfo& PndCATFIterTimerInfo::operator[] ( string  name)
inline

Definition at line 96 of file PndCATimer.h.

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

◆ operator[]() [2/2]

PndCATimerInfo& PndCATFIterTimerInfo::operator[] ( int  i)
inline

Definition at line 97 of file PndCATimer.h.

References i.

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

◆ PrintNames()

void PndCATFIterTimerInfo::PrintNames ( )
inline

Definition at line 128 of file PndCATimer.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 PndCATFIterTimerInfo::PrintReal ( int  f = 0)
inline

Definition at line 114 of file PndCATimer.h.

References f, i, and PndCATimerInfo::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: