CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Attributes
edm::RunDualStopwatches Class Reference

#include <RunStopwatch.h>

Public Types

typedef boost::shared_ptr
< CPUTimer
StopwatchPointer
 

Public Member Functions

 RunDualStopwatches (const StopwatchPointer &ptr1, CPUTimer *const ptr2)
 
 ~RunDualStopwatches ()
 

Private Attributes

StopwatchPointer stopwatch1_
 
CPUTimer *const stopwatch2_
 

Detailed Description

Definition at line 41 of file RunStopwatch.h.

Member Typedef Documentation

Definition at line 44 of file RunStopwatch.h.

Constructor & Destructor Documentation

edm::RunDualStopwatches::RunDualStopwatches ( const StopwatchPointer ptr1,
CPUTimer *const  ptr2 
)
inline

Definition at line 46 of file RunStopwatch.h.

References stopwatch1_, and stopwatch2_.

46  : stopwatch1_(ptr1),stopwatch2_(ptr2) {
47  if(stopwatch1_ && 0 != stopwatch2_) {
48  stopwatch1_->start();
49  }
50  }
StopwatchPointer stopwatch1_
Definition: RunStopwatch.h:59
CPUTimer *const stopwatch2_
Definition: RunStopwatch.h:60
edm::RunDualStopwatches::~RunDualStopwatches ( )
inline

Definition at line 52 of file RunStopwatch.h.

References edm::CPUTimer::add(), stopwatch1_, and stopwatch2_.

52  {
53  if (stopwatch1_ && 0 != stopwatch2_) {
54  stopwatch2_->add(stopwatch1_->stop());
55  }
56  }
void add(const Times &t)
Definition: CPUTimer.cc:113
StopwatchPointer stopwatch1_
Definition: RunStopwatch.h:59
CPUTimer *const stopwatch2_
Definition: RunStopwatch.h:60

Member Data Documentation

StopwatchPointer edm::RunDualStopwatches::stopwatch1_
private

Definition at line 59 of file RunStopwatch.h.

Referenced by RunDualStopwatches(), and ~RunDualStopwatches().

CPUTimer* const edm::RunDualStopwatches::stopwatch2_
private

Definition at line 60 of file RunStopwatch.h.

Referenced by RunDualStopwatches(), and ~RunDualStopwatches().