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 | Protected Member Functions | Private Member Functions | Private Attributes
edm::Worker Class Referenceabstract

#include <Worker.h>

Inheritance diagram for edm::Worker:
edm::WorkerT< T > edm::WorkerT< OutputModule > edm::OutputWorker

Public Types

enum  State { Ready, Pass, Fail, Exception }
 

Public Member Functions

void beginJob ()
 
void clearCounters ()
 
ModuleDescription const * descPtr () const
 
ModuleDescription const & description () const
 
template<typename T >
bool doWork (typename T::MyPrincipal &, EventSetup const &c, CurrentProcessingContext const *cpc, CPUTimer *const timer)
 
void endJob ()
 
void postForkReacquireResources (unsigned int iChildIndex, unsigned int iNumberOfChildren)
 
void preForkReleaseResources ()
 
void reset ()
 
void respondToCloseInputFile (FileBlock const &fb)
 
void respondToCloseOutputFiles (FileBlock const &fb)
 
void respondToOpenInputFile (FileBlock const &fb)
 
void respondToOpenOutputFiles (FileBlock const &fb)
 
void setActivityRegistry (boost::shared_ptr< ActivityRegistry > areg)
 
State state () const
 
std::pair< double, double > timeCpuReal () const
 
int timesExcept () const
 
int timesFailed () const
 
int timesPass () const
 
int timesPassed () const
 
int timesRun () const
 
int timesVisited () const
 
void useStopwatch ()
 
 Worker (ModuleDescription const &iMD, WorkerParams const &iWP)
 
virtual ~Worker ()
 

Protected Member Functions

virtual void implBeginJob ()=0
 
virtual bool implDoBegin (EventPrincipal &, EventSetup const &c, CurrentProcessingContext const *cpc)=0
 
virtual bool implDoBegin (RunPrincipal &rp, EventSetup const &c, CurrentProcessingContext const *cpc)=0
 
virtual bool implDoBegin (LuminosityBlockPrincipal &lbp, EventSetup const &c, CurrentProcessingContext const *cpc)=0
 
virtual bool implDoEnd (EventPrincipal &, EventSetup const &c, CurrentProcessingContext const *cpc)=0
 
virtual bool implDoEnd (RunPrincipal &rp, EventSetup const &c, CurrentProcessingContext const *cpc)=0
 
virtual bool implDoEnd (LuminosityBlockPrincipal &lbp, EventSetup const &c, CurrentProcessingContext const *cpc)=0
 
virtual void implEndJob ()=0
 
virtual std::string workerType () const =0
 

Private Member Functions

virtual void implPostForkReacquireResources (unsigned int iChildIndex, unsigned int iNumberOfChildren)=0
 
virtual void implPreForkReleaseResources ()=0
 
virtual void implRespondToCloseInputFile (FileBlock const &fb)=0
 
virtual void implRespondToCloseOutputFiles (FileBlock const &fb)=0
 
virtual void implRespondToOpenInputFile (FileBlock const &fb)=0
 
virtual void implRespondToOpenOutputFiles (FileBlock const &fb)=0
 

Private Attributes

ActionTable const * actions_
 
boost::shared_ptr
< ActivityRegistry
actReg_
 
boost::shared_ptr< edm::Exceptioncached_exception_
 
ModuleDescription md_
 
State state_
 
RunStopwatch::StopwatchPointer stopwatch_
 
int timesExcept_
 
int timesFailed_
 
int timesPassed_
 
int timesRun_
 
int timesVisited_
 

Detailed Description

Definition at line 40 of file Worker.h.

Member Enumeration Documentation

Enumerator
Ready 
Pass 
Fail 
Exception 

Definition at line 42 of file Worker.h.

Constructor & Destructor Documentation

edm::Worker::Worker ( ModuleDescription const &  iMD,
WorkerParams const &  iWP 
)

Definition at line 37 of file Worker.cc.

38  :
39  stopwatch_(),
40  timesRun_(),
41  timesVisited_(),
42  timesPassed_(),
43  timesFailed_(),
44  timesExcept_(),
45  state_(Ready),
46  md_(iMD),
47  actions_(iWP.actions_),
49  actReg_()
50  {
51  }
boost::shared_ptr< ActivityRegistry > actReg_
Definition: Worker.h:127
int timesExcept_
Definition: Worker.h:120
int timesPassed_
Definition: Worker.h:118
int timesRun_
Definition: Worker.h:116
ActionTable const * actions_
Definition: Worker.h:124
ModuleDescription md_
Definition: Worker.h:123
boost::shared_ptr< edm::Exception > cached_exception_
Definition: Worker.h:125
RunStopwatch::StopwatchPointer stopwatch_
Definition: Worker.h:114
int timesFailed_
Definition: Worker.h:119
State state_
Definition: Worker.h:121
int timesVisited_
Definition: Worker.h:117
edm::Worker::~Worker ( )
virtual

Definition at line 53 of file Worker.cc.

53  {
54  }

Member Function Documentation

void edm::Worker::beginJob ( void  )

Definition at line 60 of file Worker.cc.

References actReg_, edm::errors::BadAlloc, edm::errors::BadExceptionType, trackerHits::c, cached_exception_, description(), ExpressReco_HICollisions_FallBack::e, cmsCodeRules.cppFunctionSkipper::exception, Exception, implBeginJob(), md_, asciidump::s, state_, edm::errors::StdException, edm::errors::Unknown, and workerType().

Referenced by edm::Schedule::beginJob(), and edm::Schedule::changeModule().

60  {
61 
62  try {
63  ModuleBeginJobSignalSentry cpp(actReg_.get(), md_);
64  implBeginJob();
65  }
66  catch(cms::Exception& e) {
67  LogError("BeginJob")
68  << "A cms::Exception is going through " << workerType() << ":\n";
69  state_ = Exception;
70  e << "A cms::Exception is going through " << workerType() << ":\n";
71  exceptionContext(md_, e);
72  throw;
73  }
74  catch(std::bad_alloc& bda) {
75  LogError("BeginJob")
76  << "A std::bad_alloc is going through " << workerType() << ":\n"
77  << description() << "\n";
78  state_ = Exception;
81  << "A std::bad_alloc exception occurred during a call to the module ";
82  exceptionContext(md_, *cached_exception_)
83  << "The job has probably exhausted the virtual memory available to the process.\n";
84  throw *cached_exception_;
85  }
86  catch(std::exception& e) {
87  LogError("BeginJob")
88  << "A std::exception is going through " << workerType() << ":\n"
89  << description() << "\n";
90  state_ = Exception;
93  << "A std::exception occurred during a call to the module ";
94  exceptionContext(md_, *cached_exception_) << "and cannot be repropagated.\n"
95  << "Previous information:\n" << e.what();
96  throw *cached_exception_;
97  }
98  catch(std::string& s) {
99  LogError("BeginJob")
100  << "module caught a std::string during endJob\n";
101  state_ = Exception;
102  cached_exception_.reset(new edm::Exception(errors::BadExceptionType, "std::string"));
104  << "A std::string thrown as an exception occurred during a call to the module ";
105  exceptionContext(md_, *cached_exception_) << "and cannot be repropagated.\n"
106  << "Previous information:\n string = " << s;
107  throw *cached_exception_;
108  }
109  catch(char const* c) {
110  LogError("BeginJob")
111  << "module caught a const char* during endJob\n";
112  state_ = Exception;
113  cached_exception_.reset(new edm::Exception(errors::BadExceptionType, "const char *"));
115  << "A const char* thrown as an exception occurred during a call to the module ";
116  exceptionContext(md_, *cached_exception_) << "and cannot be repropagated.\n"
117  << "Previous information:\n const char* = " << c << "\n";
118  throw *cached_exception_;
119  }
120  catch(...) {
121  LogError("BeginJob")
122  << "An unknown Exception occurred in\n" << description() << "\n";
123  state_ = Exception;
124  cached_exception_.reset(new edm::Exception(errors::Unknown, "repeated"));
126  << "An unknown occurred during a previous call to the module ";
127  exceptionContext(md_, *cached_exception_) << "and cannot be repropagated.\n";
128  throw *cached_exception_;
129  }
130  }
ModuleDescription const & description() const
Definition: Worker.h:63
boost::shared_ptr< ActivityRegistry > actReg_
Definition: Worker.h:127
virtual std::string workerType() const =0
virtual void implBeginJob()=0
ModuleDescription md_
Definition: Worker.h:123
boost::shared_ptr< edm::Exception > cached_exception_
Definition: Worker.h:125
string s
Definition: asciidump.py:422
State state_
Definition: Worker.h:121
void edm::Worker::clearCounters ( )
inline

Definition at line 73 of file Worker.h.

References timesExcept_, timesFailed_, timesPassed_, timesRun_, and timesVisited_.

Referenced by edm::Schedule::clearCounters().

73  {
75  }
int timesExcept_
Definition: Worker.h:120
int timesPassed_
Definition: Worker.h:118
int timesRun_
Definition: Worker.h:116
int timesFailed_
Definition: Worker.h:119
int timesVisited_
Definition: Worker.h:117
ModuleDescription const* edm::Worker::descPtr ( ) const
inline

Definition at line 64 of file Worker.h.

References md_.

64 {return &md_; }
ModuleDescription md_
Definition: Worker.h:123
ModuleDescription const& edm::Worker::description ( ) const
inline
template<typename T >
bool edm::Worker::doWork ( typename T::MyPrincipal &  ep,
EventSetup const &  c,
CurrentProcessingContext const *  cpc,
CPUTimer *const  timer 
)

Definition at line 162 of file Worker.h.

References alignmentValidation::action, actions_, actReg_, edm::errors::BadAlloc, edm::errors::BadExceptionType, trackerHits::c, cached_exception_, ExpressReco_HICollisions_FallBack::e, cmsCodeRules.cppFunctionSkipper::exception, Exception, Fail, edm::actions::FailModule, edm::actions::FailPath, edm::ActionTable::find(), edm::actions::IgnoreCompletely, implDoBegin(), implDoEnd(), edm::CurrentProcessingContext::isEndPath(), edm::CurrentProcessingContext::isUnscheduled(), md_, edm::errors::OtherCMS, Pass, Ready, edm::actions::Rethrow, cms::Exception::rootCause(), asciidump::s, edm::actions::SkipEvent, state_, edm::errors::StdException, stopwatch_, timesExcept_, timesFailed_, timesPassed_, timesRun_, timesVisited_, edm::errors::Unknown, and cms::Exception::what().

Referenced by edm::WorkerInPath::runWorker().

165  {
166 
167  // A RunStopwatch, but only if we are processing an event.
168  RunDualStopwatches stopwatch(T::isEvent_ ? stopwatch_ : RunStopwatch::StopwatchPointer(),
169  iTimer);
170 
171  if (T::isEvent_) {
172  ++timesVisited_;
173  }
174  bool rc = false;
175 
176  switch(state_) {
177  case Ready: break;
178  case Pass: return true;
179  case Fail: return false;
180  case Exception: {
181  // rethrow the cached exception again
182  // It seems impossible to
183  // get here a second time until a cms::Exception has been
184  // thrown prviously.
185  LogWarning("repeat") << "A module has been invoked a second "
186  << "time even though it caught an "
187  << "exception during the previous "
188  << "invocation.\n"
189  << "This may be an indication of a "
190  << "configuration problem.\n";
191 
192  cached_exception_->raise();
193  }
194  }
195 
196  if (T::isEvent_) ++timesRun_;
197 
198  try {
199 
200  ModuleSignalSentry<T> cpp(actReg_.get(), md_);
201  if (T::begin_) {
202  rc = implDoBegin(ep, es, cpc);
203  } else {
204  rc = implDoEnd(ep, es, cpc);
205  }
206 
207  if (rc) {
208  state_ = Pass;
209  if (T::isEvent_) ++timesPassed_;
210  } else {
211  state_ = Fail;
212  if (T::isEvent_) ++timesFailed_;
213  }
214  }
215 
216  catch(cms::Exception& e) {
217 
218  // NOTE: the warning printed as a result of ignoring or failing
219  // a module will only be printed during the full true processing
220  // pass of this module
221 
222  // Get the action corresponding to this exception. However, if processing
223  // something other than an event (e.g. run, lumi) always rethrow.
225 
226  // If we are processing an endpath and the module was scheduled, treat SkipEvent or FailPath
227  // as FailModule, so any subsequent OutputModules are still run.
228  // For unscheduled modules only treat FailPath as a FailModule but still allow SkipEvent to throw
229  if (cpc && cpc->isEndPath()) {
230  if ((action == actions::SkipEvent && !cpc->isUnscheduled()) ||
231  action == actions::FailPath) action = actions::FailModule;
232  }
233  switch(action) {
235  rc = true;
236  ++timesPassed_;
237  state_ = Pass;
238  LogWarning("IgnoreCompletely")
239  << "Module ignored an exception\n"
240  << e.what() << "\n";
241  break;
242  }
243 
244  case actions::FailModule: {
245  rc = true;
246  LogWarning("FailModule")
247  << "Module failed due to an exception\n"
248  << e.what() << "\n";
249  ++timesFailed_;
250  state_ = Fail;
251  break;
252  }
253 
254  default: {
255 
256  // we should not need to include the event/run/module names
257  // the exception because the error logger will pick this
258  // up automatically. I'm leaving it in until this is
259  // verified
260 
261  // here we simply add a small amount of data to the
262  // exception to add some context, we could have rethrown
263  // it as something else and embedded with this exception
264  // as an argument to the constructor.
265 
266  if (T::isEvent_) ++timesExcept_;
267  state_ = Exception;
268  e << "cms::Exception going through module ";
269  exceptionContext(md_, ep, e);
270  edm::Exception *edmEx = dynamic_cast<edm::Exception *>(&e);
271  if (edmEx) {
272  cached_exception_.reset(new edm::Exception(*edmEx));
273  } else {
274  cached_exception_.reset(new edm::Exception(errors::OtherCMS, std::string(), e));
275  }
276  throw;
277  }
278  }
279  }
280 
281  catch(std::bad_alloc& bda) {
282  if (T::isEvent_) ++timesExcept_;
283  state_ = Exception;
286  << "A std::bad_alloc exception occurred during a call to the module ";
287  exceptionContext(md_, ep, *cached_exception_)
288  << "The job has probably exhausted the virtual memory available to the process.\n";
289  cached_exception_->raise();
290  }
291  catch(std::exception& e) {
292  if (T::isEvent_) ++timesExcept_;
293  state_ = Exception;
296  << "A std::exception occurred during a call to the module ";
297  exceptionContext(md_, ep, *cached_exception_) << "and cannot be repropagated.\n"
298  << "Previous information:\n" << e.what();
299  cached_exception_->raise();
300  }
301  catch(std::string& s) {
302  if (T::isEvent_) ++timesExcept_;
303  state_ = Exception;
304  cached_exception_.reset(new edm::Exception(errors::BadExceptionType, "std::string"));
306  << "A std::string thrown as an exception occurred during a call to the module ";
307  exceptionContext(md_, ep, *cached_exception_) << "and cannot be repropagated.\n"
308  << "Previous information:\n string = " << s;
309  cached_exception_->raise();
310  }
311  catch(char const* c) {
312  if (T::isEvent_) ++timesExcept_;
313  state_ = Exception;
314  cached_exception_.reset(new edm::Exception(errors::BadExceptionType, "const char *"));
316  << "A const char* thrown as an exception occurred during a call to the module ";
317  exceptionContext(md_, ep, *cached_exception_) << "and cannot be repropagated.\n"
318  << "Previous information:\n const char* = " << c << "\n";
319  cached_exception_->raise();
320  }
321  catch(...) {
322  if (T::isEvent_) ++timesExcept_;
323  state_ = Exception;
324  cached_exception_.reset(new edm::Exception(errors::Unknown, "repeated"));
326  << "An unknown occurred during a previous call to the module ";
327  exceptionContext(md_, ep, *cached_exception_) << "and cannot be repropagated.\n";
328  cached_exception_->raise();
329  }
330 
331  return rc;
332  }
virtual char const * what() const
Definition: Exception.cc:97
std::string rootCause() const
Definition: Exception.cc:78
boost::shared_ptr< ActivityRegistry > actReg_
Definition: Worker.h:127
virtual bool implDoEnd(EventPrincipal &, EventSetup const &c, CurrentProcessingContext const *cpc)=0
int timesExcept_
Definition: Worker.h:120
virtual bool implDoBegin(EventPrincipal &, EventSetup const &c, CurrentProcessingContext const *cpc)=0
boost::shared_ptr< CPUTimer > StopwatchPointer
Definition: RunStopwatch.h:23
int timesPassed_
Definition: Worker.h:118
int timesRun_
Definition: Worker.h:116
ActionTable const * actions_
Definition: Worker.h:124
ModuleDescription md_
Definition: Worker.h:123
boost::shared_ptr< edm::Exception > cached_exception_
Definition: Worker.h:125
RunStopwatch::StopwatchPointer stopwatch_
Definition: Worker.h:114
actions::ActionCodes find(const std::string &category) const
Definition: Actions.cc:95
int timesFailed_
Definition: Worker.h:119
string s
Definition: asciidump.py:422
State state_
Definition: Worker.h:121
int timesVisited_
Definition: Worker.h:117
void edm::Worker::endJob ( void  )

Definition at line 132 of file Worker.cc.

References actReg_, edm::errors::BadAlloc, edm::errors::BadExceptionType, trackerHits::c, cached_exception_, description(), ExpressReco_HICollisions_FallBack::e, cmsCodeRules.cppFunctionSkipper::exception, Exception, implEndJob(), md_, asciidump::s, state_, edm::errors::StdException, edm::errors::Unknown, and workerType().

132  {
133  try {
134  ModuleEndJobSignalSentry cpp(actReg_.get(), md_);
135  implEndJob();
136  }
137  catch(cms::Exception& e) {
138  LogError("EndJob")
139  << "A cms::Exception is going through " << workerType() << ":\n";
140  state_ = Exception;
141  e << "A cms::Exception is going through " << workerType() << ":\n";
142  exceptionContext(md_, e);
143  throw;
144  }
145  catch(std::bad_alloc& bda) {
146  LogError("EndJob")
147  << "A std::bad_alloc is going through " << workerType() << ":\n"
148  << description() << "\n";
149  state_ = Exception;
152  << "A std::bad_alloc exception occurred during a call to the module ";
153  exceptionContext(md_, *cached_exception_)
154  << "The job has probably exhausted the virtual memory available to the process.\n";
155  throw *cached_exception_;
156  }
157  catch(std::exception& e) {
158  LogError("EndJob")
159  << "A std::exception is going through " << workerType() << ":\n"
160  << description() << "\n";
161  state_ = Exception;
164  << "A std::exception occurred during a call to the module ";
165  exceptionContext(md_, *cached_exception_) << "and cannot be repropagated.\n"
166  << "Previous information:\n" << e.what();
167  throw *cached_exception_;
168  }
169  catch(std::string& s) {
170  LogError("EndJob")
171  << "module caught a std::string during endJob\n";
172  state_ = Exception;
173  cached_exception_.reset(new edm::Exception(errors::BadExceptionType, "std::string"));
175  << "A std::string thrown as an exception occurred during a call to the module ";
176  exceptionContext(md_, *cached_exception_) << "and cannot be repropagated.\n"
177  << "Previous information:\n string = " << s;
178  throw *cached_exception_;
179  }
180  catch(char const* c) {
181  LogError("EndJob")
182  << "module caught a const char* during endJob\n";
183  state_ = Exception;
184  cached_exception_.reset(new edm::Exception(errors::BadExceptionType, "const char *"));
186  << "A const char* thrown as an exception occurred during a call to the module ";
187  exceptionContext(md_, *cached_exception_) << "and cannot be repropagated.\n"
188  << "Previous information:\n const char* = " << c << "\n";
189  throw *cached_exception_;
190  }
191  catch(...) {
192  LogError("EndJob")
193  << "An unknown Exception occurred in\n" << description() << "\n";
194  state_ = Exception;
195  cached_exception_.reset(new edm::Exception(errors::Unknown, "repeated"));
197  << "An unknown occurred during a previous call to the module ";
198  exceptionContext(md_, *cached_exception_) << "and cannot be repropagated.\n";
199  throw *cached_exception_;
200  }
201 
202  }
ModuleDescription const & description() const
Definition: Worker.h:63
boost::shared_ptr< ActivityRegistry > actReg_
Definition: Worker.h:127
virtual std::string workerType() const =0
virtual void implEndJob()=0
ModuleDescription md_
Definition: Worker.h:123
boost::shared_ptr< edm::Exception > cached_exception_
Definition: Worker.h:125
string s
Definition: asciidump.py:422
State state_
Definition: Worker.h:121
virtual void edm::Worker::implBeginJob ( )
protectedpure virtual

Implemented in edm::WorkerT< T >, and edm::WorkerT< OutputModule >.

Referenced by beginJob().

virtual bool edm::Worker::implDoBegin ( EventPrincipal ,
EventSetup const &  c,
CurrentProcessingContext const *  cpc 
)
protectedpure virtual

Implemented in edm::WorkerT< T >, and edm::WorkerT< OutputModule >.

Referenced by doWork().

virtual bool edm::Worker::implDoBegin ( RunPrincipal rp,
EventSetup const &  c,
CurrentProcessingContext const *  cpc 
)
protectedpure virtual
virtual bool edm::Worker::implDoBegin ( LuminosityBlockPrincipal lbp,
EventSetup const &  c,
CurrentProcessingContext const *  cpc 
)
protectedpure virtual
virtual bool edm::Worker::implDoEnd ( EventPrincipal ,
EventSetup const &  c,
CurrentProcessingContext const *  cpc 
)
protectedpure virtual

Implemented in edm::WorkerT< T >, and edm::WorkerT< OutputModule >.

Referenced by doWork().

virtual bool edm::Worker::implDoEnd ( RunPrincipal rp,
EventSetup const &  c,
CurrentProcessingContext const *  cpc 
)
protectedpure virtual
virtual bool edm::Worker::implDoEnd ( LuminosityBlockPrincipal lbp,
EventSetup const &  c,
CurrentProcessingContext const *  cpc 
)
protectedpure virtual
virtual void edm::Worker::implEndJob ( )
protectedpure virtual

Implemented in edm::WorkerT< T >, and edm::WorkerT< OutputModule >.

Referenced by endJob().

virtual void edm::Worker::implPostForkReacquireResources ( unsigned int  iChildIndex,
unsigned int  iNumberOfChildren 
)
privatepure virtual
virtual void edm::Worker::implPreForkReleaseResources ( )
privatepure virtual
virtual void edm::Worker::implRespondToCloseInputFile ( FileBlock const &  fb)
privatepure virtual
virtual void edm::Worker::implRespondToCloseOutputFiles ( FileBlock const &  fb)
privatepure virtual
virtual void edm::Worker::implRespondToOpenInputFile ( FileBlock const &  fb)
privatepure virtual
virtual void edm::Worker::implRespondToOpenOutputFiles ( FileBlock const &  fb)
privatepure virtual
void edm::Worker::postForkReacquireResources ( unsigned int  iChildIndex,
unsigned int  iNumberOfChildren 
)
inline

Definition at line 59 of file Worker.h.

References implPostForkReacquireResources().

Referenced by edm::Schedule::postForkReacquireResources().

59 {implPostForkReacquireResources(iChildIndex, iNumberOfChildren);}
virtual void implPostForkReacquireResources(unsigned int iChildIndex, unsigned int iNumberOfChildren)=0
void edm::Worker::preForkReleaseResources ( )
inline

Definition at line 58 of file Worker.h.

References implPreForkReleaseResources().

Referenced by edm::Schedule::preForkReleaseResources().

virtual void implPreForkReleaseResources()=0
void edm::Worker::reset ( void  )
inline

Definition at line 61 of file Worker.h.

References Ready, and state_.

Referenced by edm::Schedule::resetAll().

61 { state_ = Ready; }
State state_
Definition: Worker.h:121
void edm::Worker::respondToCloseInputFile ( FileBlock const &  fb)
inline

Definition at line 54 of file Worker.h.

References implRespondToCloseInputFile().

Referenced by edm::Schedule::respondToCloseInputFile().

virtual void implRespondToCloseInputFile(FileBlock const &fb)=0
void edm::Worker::respondToCloseOutputFiles ( FileBlock const &  fb)
inline

Definition at line 56 of file Worker.h.

References implRespondToCloseOutputFiles().

Referenced by edm::Schedule::respondToCloseOutputFiles().

virtual void implRespondToCloseOutputFiles(FileBlock const &fb)=0
void edm::Worker::respondToOpenInputFile ( FileBlock const &  fb)
inline

Definition at line 53 of file Worker.h.

References implRespondToOpenInputFile().

Referenced by edm::Schedule::respondToOpenInputFile().

virtual void implRespondToOpenInputFile(FileBlock const &fb)=0
void edm::Worker::respondToOpenOutputFiles ( FileBlock const &  fb)
inline

Definition at line 55 of file Worker.h.

References implRespondToOpenOutputFiles().

Referenced by edm::Schedule::respondToOpenOutputFiles().

virtual void implRespondToOpenOutputFiles(FileBlock const &fb)=0
void edm::Worker::setActivityRegistry ( boost::shared_ptr< ActivityRegistry areg)

The signals are required to live longer than the last call to 'doWork' this was done to improve performance based on profiling

Definition at line 56 of file Worker.cc.

References actReg_.

56  {
57  actReg_ = areg;
58  }
boost::shared_ptr< ActivityRegistry > actReg_
Definition: Worker.h:127
State edm::Worker::state ( ) const
inline

Definition at line 84 of file Worker.h.

References state_.

84 { return state_; }
State state_
Definition: Worker.h:121
std::pair<double, double> edm::Worker::timeCpuReal ( ) const
inline

Definition at line 69 of file Worker.h.

References stopwatch_.

69  {
70  return std::pair<double, double>(stopwatch_->cpuTime(), stopwatch_->realTime());
71  }
RunStopwatch::StopwatchPointer stopwatch_
Definition: Worker.h:114
int edm::Worker::timesExcept ( ) const
inline

Definition at line 83 of file Worker.h.

References timesExcept_.

Referenced by edm::fillWorkerSummaryAux().

83 { return timesExcept_; }
int timesExcept_
Definition: Worker.h:120
int edm::Worker::timesFailed ( ) const
inline

Definition at line 82 of file Worker.h.

References timesFailed_.

Referenced by edm::fillWorkerSummaryAux().

82 { return timesFailed_; }
int timesFailed_
Definition: Worker.h:119
int edm::Worker::timesPass ( ) const
inline

Definition at line 86 of file Worker.h.

References timesPassed().

86 { return timesPassed(); } // for backward compatibility only - to be removed soon
int timesPassed() const
Definition: Worker.h:81
int edm::Worker::timesPassed ( ) const
inline

Definition at line 81 of file Worker.h.

References timesPassed_.

Referenced by edm::fillWorkerSummaryAux(), and timesPass().

81 { return timesPassed_; }
int timesPassed_
Definition: Worker.h:118
int edm::Worker::timesRun ( ) const
inline

Definition at line 79 of file Worker.h.

References timesRun_.

Referenced by edm::fillWorkerSummaryAux().

79 { return timesRun_; }
int timesRun_
Definition: Worker.h:116
int edm::Worker::timesVisited ( ) const
inline

Definition at line 80 of file Worker.h.

References timesVisited_.

Referenced by edm::fillWorkerSummaryAux().

80 { return timesVisited_; }
int timesVisited_
Definition: Worker.h:117
void edm::Worker::useStopwatch ( )

Definition at line 204 of file Worker.cc.

References stopwatch_.

Referenced by edm::Schedule::addToAllWorkers().

204  {
205  stopwatch_.reset(new RunStopwatch::StopwatchPointer::element_type);
206  }
RunStopwatch::StopwatchPointer stopwatch_
Definition: Worker.h:114
virtual std::string edm::Worker::workerType ( ) const
protectedpure virtual

Implemented in edm::WorkerT< T >, and edm::WorkerT< OutputModule >.

Referenced by beginJob(), and endJob().

Member Data Documentation

ActionTable const* edm::Worker::actions_
private

Definition at line 124 of file Worker.h.

Referenced by doWork().

boost::shared_ptr<ActivityRegistry> edm::Worker::actReg_
private

Definition at line 127 of file Worker.h.

Referenced by beginJob(), doWork(), endJob(), and setActivityRegistry().

boost::shared_ptr<edm::Exception> edm::Worker::cached_exception_
private

Definition at line 125 of file Worker.h.

Referenced by beginJob(), doWork(), and endJob().

ModuleDescription edm::Worker::md_
private

Definition at line 123 of file Worker.h.

Referenced by beginJob(), descPtr(), description(), doWork(), and endJob().

State edm::Worker::state_
private

Definition at line 121 of file Worker.h.

Referenced by beginJob(), doWork(), endJob(), reset(), and state().

RunStopwatch::StopwatchPointer edm::Worker::stopwatch_
private

Definition at line 114 of file Worker.h.

Referenced by doWork(), timeCpuReal(), and useStopwatch().

int edm::Worker::timesExcept_
private

Definition at line 120 of file Worker.h.

Referenced by clearCounters(), doWork(), and timesExcept().

int edm::Worker::timesFailed_
private

Definition at line 119 of file Worker.h.

Referenced by clearCounters(), doWork(), and timesFailed().

int edm::Worker::timesPassed_
private

Definition at line 118 of file Worker.h.

Referenced by clearCounters(), doWork(), and timesPassed().

int edm::Worker::timesRun_
private

Definition at line 116 of file Worker.h.

Referenced by clearCounters(), doWork(), and timesRun().

int edm::Worker::timesVisited_
private

Definition at line 117 of file Worker.h.

Referenced by clearCounters(), doWork(), and timesVisited().