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 43 of file Worker.cc.

44  :
45  stopwatch_(),
46  timesRun_(),
47  timesVisited_(),
48  timesPassed_(),
49  timesFailed_(),
50  timesExcept_(),
51  state_(Ready),
52  md_(iMD),
53  actions_(iWP.actions_),
55  actReg_()
56  {
57  }
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 59 of file Worker.cc.

59  {
60  }

Member Function Documentation

void edm::Worker::beginJob ( void  )

Definition at line 66 of file Worker.cc.

References actReg_, edm::errors::BadAlloc, edm::errors::BadExceptionType, trackerHits::c, cached_exception_, description(), 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().

66  {
67 
68  try {
69  ModuleBeginJobSignalSentry cpp(actReg_.get(), md_);
70  implBeginJob();
71  }
72  catch(cms::Exception& e) {
73  LogError("BeginJob")
74  << "A cms::Exception is going through " << workerType() << ":\n";
75  state_ = Exception;
76  e << "A cms::Exception is going through " << workerType() << ":\n";
77  exceptionContext(md_, e);
78  throw;
79  }
80  catch(std::bad_alloc& bda) {
81  LogError("BeginJob")
82  << "A std::bad_alloc is going through " << workerType() << ":\n"
83  << description() << "\n";
84  state_ = Exception;
87  << "A std::bad_alloc exception occurred during a call to the module ";
88  exceptionContext(md_, *cached_exception_)
89  << "The job has probably exhausted the virtual memory available to the process.\n";
90  throw *cached_exception_;
91  }
92  catch(std::exception& e) {
93  LogError("BeginJob")
94  << "A std::exception is going through " << workerType() << ":\n"
95  << description() << "\n";
96  state_ = Exception;
99  << "A std::exception occurred during a call to the module ";
100  exceptionContext(md_, *cached_exception_) << "and cannot be repropagated.\n"
101  << "Previous information:\n" << e.what();
102  throw *cached_exception_;
103  }
104  catch(std::string& s) {
105  LogError("BeginJob")
106  << "module caught a std::string during endJob\n";
107  state_ = Exception;
108  cached_exception_.reset(new edm::Exception(errors::BadExceptionType, "std::string"));
110  << "A std::string thrown as an exception occurred during a call to the module ";
111  exceptionContext(md_, *cached_exception_) << "and cannot be repropagated.\n"
112  << "Previous information:\n string = " << s;
113  throw *cached_exception_;
114  }
115  catch(char const* c) {
116  LogError("BeginJob")
117  << "module caught a const char* during endJob\n";
118  state_ = Exception;
119  cached_exception_.reset(new edm::Exception(errors::BadExceptionType, "const char *"));
121  << "A const char* thrown as an exception occurred during a call to the module ";
122  exceptionContext(md_, *cached_exception_) << "and cannot be repropagated.\n"
123  << "Previous information:\n const char* = " << c << "\n";
124  throw *cached_exception_;
125  }
126  catch(...) {
127  LogError("BeginJob")
128  << "An unknown Exception occurred in\n" << description() << "\n";
129  state_ = Exception;
130  cached_exception_.reset(new edm::Exception(errors::Unknown, "repeated"));
132  << "An unknown occurred during a previous call to the module ";
133  exceptionContext(md_, *cached_exception_) << "and cannot be repropagated.\n";
134  throw *cached_exception_;
135  }
136  }
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 156 of file Worker.h.

References alignmentValidation::action, actions_, actReg_, edm::errors::BadAlloc, edm::errors::BadExceptionType, trackerHits::c, cached_exception_, 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().

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

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

138  {
139  try {
140  ModuleEndJobSignalSentry cpp(actReg_.get(), md_);
141  implEndJob();
142  }
143  catch(cms::Exception& e) {
144  LogError("EndJob")
145  << "A cms::Exception is going through " << workerType() << ":\n";
146  state_ = Exception;
147  e << "A cms::Exception is going through " << workerType() << ":\n";
148  exceptionContext(md_, e);
149  throw;
150  }
151  catch(std::bad_alloc& bda) {
152  LogError("EndJob")
153  << "A std::bad_alloc is going through " << workerType() << ":\n"
154  << description() << "\n";
155  state_ = Exception;
158  << "A std::bad_alloc exception occurred during a call to the module ";
159  exceptionContext(md_, *cached_exception_)
160  << "The job has probably exhausted the virtual memory available to the process.\n";
161  throw *cached_exception_;
162  }
163  catch(std::exception& e) {
164  LogError("EndJob")
165  << "A std::exception is going through " << workerType() << ":\n"
166  << description() << "\n";
167  state_ = Exception;
170  << "A std::exception occurred during a call to the module ";
171  exceptionContext(md_, *cached_exception_) << "and cannot be repropagated.\n"
172  << "Previous information:\n" << e.what();
173  throw *cached_exception_;
174  }
175  catch(std::string& s) {
176  LogError("EndJob")
177  << "module caught a std::string during endJob\n";
178  state_ = Exception;
179  cached_exception_.reset(new edm::Exception(errors::BadExceptionType, "std::string"));
181  << "A std::string thrown as an exception occurred during a call to the module ";
182  exceptionContext(md_, *cached_exception_) << "and cannot be repropagated.\n"
183  << "Previous information:\n string = " << s;
184  throw *cached_exception_;
185  }
186  catch(char const* c) {
187  LogError("EndJob")
188  << "module caught a const char* during endJob\n";
189  state_ = Exception;
190  cached_exception_.reset(new edm::Exception(errors::BadExceptionType, "const char *"));
192  << "A const char* thrown as an exception occurred during a call to the module ";
193  exceptionContext(md_, *cached_exception_) << "and cannot be repropagated.\n"
194  << "Previous information:\n const char* = " << c << "\n";
195  throw *cached_exception_;
196  }
197  catch(...) {
198  LogError("EndJob")
199  << "An unknown Exception occurred in\n" << description() << "\n";
200  state_ = Exception;
201  cached_exception_.reset(new edm::Exception(errors::Unknown, "repeated"));
203  << "An unknown occurred during a previous call to the module ";
204  exceptionContext(md_, *cached_exception_) << "and cannot be repropagated.\n";
205  throw *cached_exception_;
206  }
207 
208  }
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 62 of file Worker.cc.

References actReg_.

62  {
63  actReg_ = areg;
64  }
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 210 of file Worker.cc.

References stopwatch_.

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

210  {
211  stopwatch_.reset(new RunStopwatch::StopwatchPointer::element_type);
212  }
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().