CMS 3D CMS Logo

HTimerStack Class Reference

#include <Calibration/Tools/interface/TimerStack.h>

List of all members.

Public Member Functions

void clean_stack ()
void pop ()
void pop_and_push (std::string name)
void push (std::string name)
 ~HTimerStack ()

Private Attributes

std::stack< TimeMe * > stack


Detailed Description

Definition at line 5 of file TimerStack.h.


Constructor & Destructor Documentation

HTimerStack::~HTimerStack (  )  [inline]

Definition at line 8 of file TimerStack.h.

References clean_stack().

00009      {
00010         clean_stack();
00011      }


Member Function Documentation

void HTimerStack::clean_stack (  )  [inline]

Definition at line 27 of file TimerStack.h.

References pop(), and stack.

Referenced by ~HTimerStack().

00027                      {
00028       while(!stack.empty()) pop();
00029    }

void HTimerStack::pop (  )  [inline]

Definition at line 20 of file TimerStack.h.

References stack.

Referenced by clean_stack(), and pop_and_push().

00020              {
00021       if (!stack.empty()) {
00022          delete stack.top();
00023          stack.pop();
00024       }
00025    }

void HTimerStack::pop_and_push ( std::string  name  )  [inline]

Definition at line 31 of file TimerStack.h.

References pop(), and push().

Referenced by HTrackAssociator::fillCaloTowers(), HTrackAssociator::fillEcal(), HTrackAssociator::fillHcal(), and HTrackAssociator::fillHcalTowers().

00031                                      {
00032       pop();
00033       push(name);
00034    }

void HTimerStack::push ( std::string  name  )  [inline]

Definition at line 13 of file TimerStack.h.

References counter(), TimingReport::current(), and stack.

Referenced by HTrackAssociator::fillCaloTowers(), HTrackAssociator::fillEcal(), HTrackAssociator::fillHcal(), HTrackAssociator::fillHcalTowers(), and pop_and_push().

00013                             {
00014       if( (*TimingReport::current())["firstcall_"+name].counter == 0)
00015         stack.push(new TimeMe("firstcall_"+name));
00016       else
00017         stack.push(new TimeMe(name));
00018    }


Member Data Documentation

std::stack<TimeMe*> HTimerStack::stack [private]

Definition at line 37 of file TimerStack.h.

Referenced by clean_stack(), pop(), and push().


The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:24:48 2009 for CMSSW by  doxygen 1.5.4