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 42 of file RunStopwatch.h.

Member Typedef Documentation

Definition at line 45 of file RunStopwatch.h.

Constructor & Destructor Documentation

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

Definition at line 47 of file RunStopwatch.h.

References stopwatch1_, and stopwatch2_.

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

Definition at line 53 of file RunStopwatch.h.

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

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

Member Data Documentation

StopwatchPointer edm::RunDualStopwatches::stopwatch1_
private

Definition at line 60 of file RunStopwatch.h.

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

CPUTimer* const edm::RunDualStopwatches::stopwatch2_
private

Definition at line 61 of file RunStopwatch.h.

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