CMS 3D CMS Logo

Public Member Functions | Private Attributes

HTimerStack Class Reference

#include <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().

     {
        clean_stack();
     }

Member Function Documentation

void HTimerStack::clean_stack ( ) [inline]

Definition at line 27 of file TimerStack.h.

References pop(), and stack.

Referenced by ~HTimerStack().

                     {
      while(!stack.empty()) pop();
   }
void HTimerStack::pop ( ) [inline]

Definition at line 20 of file TimerStack.h.

References stack.

Referenced by clean_stack(), and pop_and_push().

             {
      if (!stack.empty()) {
         delete stack.top();
         stack.pop();
      }
   }
void HTimerStack::pop_and_push ( std::string  name) [inline]
void HTimerStack::push ( std::string  name) [inline]

Definition at line 13 of file TimerStack.h.

References TimingReport::current(), and stack.

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

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

Member Data Documentation

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

Definition at line 37 of file TimerStack.h.

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