CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Worker.h
Go to the documentation of this file.
1 #ifndef FWCore_Framework_Worker_h
2 #define FWCore_Framework_Worker_h
3 
4 /*----------------------------------------------------------------------
5 
6 Worker: this is a basic scheduling unit - an abstract base class to
7 something that is really a producer or filter.
8 
9 A worker will not actually call through to the module unless it is
10 in a Ready state. After a module is actually run, the state will not
11 be Ready. The Ready state can only be reestablished by doing a reset().
12 
13 Pre/post module signals are posted only in the Ready state.
14 
15 Execution statistics are kept here.
16 
17 If a module has thrown an exception during execution, that exception
18 will be rethrown if the worker is entered again and the state is not Ready.
19 In other words, execution results (status) are cached and reused until
20 the worker is reset().
21 
22 ----------------------------------------------------------------------*/
23 
44 
46 
47 #include <map>
48 #include <memory>
49 #include <sstream>
50 #include <string>
51 #include <vector>
52 
53 namespace edm {
54  class EventPrincipal;
55  class EarlyDeleteHelper;
56  class ProductHolderIndexHelper;
57  class ProductHolderIndexAndSkipBit;
58  class StreamID;
59  class StreamContext;
60  class ProductRegistry;
61  class ThinnedAssociationsHelper;
62 
63  namespace workerhelper {
64  template< typename O> class CallImpl;
65  }
66 
67  class Worker {
68  public:
69  enum State { Ready, Pass, Fail, Exception };
71 
72  Worker(ModuleDescription const& iMD, ExceptionToActionTable const* iActions);
73  virtual ~Worker();
74 
75  Worker(Worker const&) = delete; // Disallow copying and moving
76  Worker& operator=(Worker const&) = delete; // Disallow copying and moving
77 
78  template <typename T>
79  bool doWork(typename T::MyPrincipal&, EventSetup const& c,
80  StreamID stream,
81  ParentContext const& parentContext,
82  typename T::Context const* context);
83  void beginJob() ;
84  void endJob();
85  void beginStream(StreamID id, StreamContext& streamContext);
86  void endStream(StreamID id, StreamContext& streamContext);
89 
91  void postForkReacquireResources(unsigned int iChildIndex, unsigned int iNumberOfChildren) {implPostForkReacquireResources(iChildIndex, iNumberOfChildren);}
93 
94  void reset() { state_ = Ready; }
95 
98 
103  void setActivityRegistry(std::shared_ptr<ActivityRegistry> areg);
104 
106 
107  //Used to make EDGetToken work
108  virtual void updateLookup(BranchType iBranchType,
109  ProductHolderIndexHelper const&) = 0;
110 
111  virtual void modulesDependentUpon(std::vector<const char*>& oModuleLabels) const = 0;
112 
113  virtual void modulesWhoseProductsAreConsumed(std::vector<ModuleDescription const*>& modules,
114  ProductRegistry const& preg,
115  std::map<std::string, ModuleDescription const*> const& labelsToDesc) const = 0;
116 
117  virtual std::vector<ConsumesInfo> consumesInfo() const = 0;
118 
119  virtual Types moduleType() const =0;
120 
121  void clearCounters() {
123  }
124 
125  int timesRun() const { return timesRun_; }
126  int timesVisited() const { return timesVisited_; }
127  int timesPassed() const { return timesPassed_; }
128  int timesFailed() const { return timesFailed_; }
129  int timesExcept() const { return timesExcept_; }
130  State state() const { return state_; }
131 
132  int timesPass() const { return timesPassed(); } // for backward compatibility only - to be removed soon
133 
134  protected:
135  template<typename O> friend class workerhelper::CallImpl;
136  virtual std::string workerType() const = 0;
137  virtual bool implDo(EventPrincipal&, EventSetup const& c,
138  ModuleCallingContext const* mcc) = 0;
139  virtual bool implDoPrePrefetchSelection(StreamID id,
140  EventPrincipal& ep,
141  ModuleCallingContext const* mcc) = 0;
142  virtual bool implDoBegin(RunPrincipal& rp, EventSetup const& c,
143  ModuleCallingContext const* mcc) = 0;
144  virtual bool implDoStreamBegin(StreamID id, RunPrincipal& rp, EventSetup const& c,
145  ModuleCallingContext const* mcc) = 0;
146  virtual bool implDoStreamEnd(StreamID id, RunPrincipal& rp, EventSetup const& c,
147  ModuleCallingContext const* mcc) = 0;
148  virtual bool implDoEnd(RunPrincipal& rp, EventSetup const& c,
149  ModuleCallingContext const* mcc) = 0;
150  virtual bool implDoBegin(LuminosityBlockPrincipal& lbp, EventSetup const& c,
151  ModuleCallingContext const* mcc) = 0;
152  virtual bool implDoStreamBegin(StreamID id, LuminosityBlockPrincipal& lbp, EventSetup const& c,
153  ModuleCallingContext const* mcc) = 0;
154  virtual bool implDoStreamEnd(StreamID id, LuminosityBlockPrincipal& lbp, EventSetup const& c,
155  ModuleCallingContext const* mcc) = 0;
156  virtual bool implDoEnd(LuminosityBlockPrincipal& lbp, EventSetup const& c,
157  ModuleCallingContext const* mcc) = 0;
158  virtual void implBeginJob() = 0;
159  virtual void implEndJob() = 0;
160  virtual void implBeginStream(StreamID) = 0;
161  virtual void implEndStream(StreamID) = 0;
162 
164 
166 
167  private:
168 
169  virtual void itemsToGet(BranchType, std::vector<ProductHolderIndexAndSkipBit>&) const = 0;
170  virtual void itemsMayGet(BranchType, std::vector<ProductHolderIndexAndSkipBit>&) const = 0;
171 
172  virtual std::vector<ProductHolderIndexAndSkipBit> const& itemsToGetFromEvent() const = 0;
173 
174  virtual void implRespondToOpenInputFile(FileBlock const& fb) = 0;
175  virtual void implRespondToCloseInputFile(FileBlock const& fb) = 0;
176 
177  virtual void implPreForkReleaseResources() = 0;
178  virtual void implPostForkReacquireResources(unsigned int iChildIndex,
179  unsigned int iNumberOfChildren) = 0;
181 
188 
190 
191  ExceptionToActionTable const* actions_; // memory assumed to be managed elsewhere
192  std::shared_ptr<cms::Exception> cached_exception_; // if state is 'exception'
193 
194  std::shared_ptr<ActivityRegistry> actReg_;
195 
197  };
198 
199  namespace {
200  template <typename T>
201  class ModuleSignalSentry {
202  public:
203  ModuleSignalSentry(ActivityRegistry *a,
204  typename T::Context const* context,
205  ModuleCallingContext const* moduleCallingContext) :
206  a_(a), context_(context), moduleCallingContext_(moduleCallingContext) {
207 
208  if(a_) T::preModuleSignal(a_, context, moduleCallingContext_);
209  }
210 
211  ~ModuleSignalSentry() {
212  if(a_) T::postModuleSignal(a_, context_, moduleCallingContext_);
213  }
214 
215  private:
216  ActivityRegistry* a_;
217  typename T::Context const* context_;
218  ModuleCallingContext const* moduleCallingContext_;
219  };
220 
221  template <typename T>
222  void exceptionContext(typename T::MyPrincipal const& principal,
223  cms::Exception& ex,
224  ModuleCallingContext const* mcc) {
225 
226  ModuleCallingContext const* imcc = mcc;
227  while(imcc->type() == ParentContext::Type::kModule) {
228  std::ostringstream iost;
229  iost << "Calling method for unscheduled module "
230  << imcc->moduleDescription()->moduleName() << "/'"
231  << imcc->moduleDescription()->moduleLabel() << "'";
232  ex.addContext(iost.str());
233  imcc = imcc->moduleCallingContext();
234  }
235  if(imcc->type() == ParentContext::Type::kInternal) {
236  std::ostringstream iost;
237  iost << "Calling method for unscheduled module "
238  << imcc->moduleDescription()->moduleName() << "/'"
239  << imcc->moduleDescription()->moduleLabel() << "' (probably inside some kind of mixing module)";
240  ex.addContext(iost.str());
241  imcc = imcc->internalContext()->moduleCallingContext();
242  }
243  while(imcc->type() == ParentContext::Type::kModule) {
244  std::ostringstream iost;
245  iost << "Calling method for unscheduled module "
246  << imcc->moduleDescription()->moduleName() << "/'"
247  << imcc->moduleDescription()->moduleLabel() << "'";
248  ex.addContext(iost.str());
249  imcc = imcc->moduleCallingContext();
250  }
251  std::ostringstream ost;
252  if (T::isEvent_) {
253  ost << "Calling event method";
254  }
255  else {
256  // It should be impossible to get here, because
257  // this function only gets called when the IgnoreCompletely
258  // exception behavior is active, which can only be true
259  // for events.
260  ost << "Calling unknown function";
261  }
262  ost << " for module " << imcc->moduleDescription()->moduleName() << "/'" << imcc->moduleDescription()->moduleLabel() << "'";
263  ex.addContext(ost.str());
264 
265  if (imcc->type() == ParentContext::Type::kPlaceInPath) {
266  ost.str("");
267  ost << "Running path '";
268  ost << imcc->placeInPathContext()->pathContext()->pathName() << "'";
269  ex.addContext(ost.str());
270  }
271  ost.str("");
272  ost << "Processing ";
273  ost << principal.id();
274  ex.addContext(ost.str());
275  }
276  }
277 
278  namespace workerhelper {
279  template<>
281  public:
283  static bool call(Worker* iWorker, StreamID,
284  EventPrincipal& ep, EventSetup const& es,
285  ActivityRegistry* /* actReg */,
286  ModuleCallingContext const* mcc,
287  Arg::Context const* /* context*/) {
288  //Signal sentry is handled by the module
289  return iWorker->implDo(ep,es, mcc);
290  }
291  static bool prePrefetchSelection(Worker* iWorker,StreamID id,
292  typename Arg::MyPrincipal & ep,
293  ModuleCallingContext const* mcc) {
294  return iWorker->implDoPrePrefetchSelection(id,ep,mcc);
295  }
296  };
297 
298  template<>
300  public:
302  static bool call(Worker* iWorker,StreamID,
303  RunPrincipal& ep, EventSetup const& es,
304  ActivityRegistry* actReg,
305  ModuleCallingContext const* mcc,
306  Arg::Context const* context) {
307  ModuleSignalSentry<Arg> cpp(actReg, context, mcc);
308  return iWorker->implDoBegin(ep,es, mcc);
309  }
310  static bool prePrefetchSelection(Worker* iWorker,StreamID id,
311  typename Arg::MyPrincipal & ep,
312  ModuleCallingContext const* mcc) {
313  return true;
314  }
315  };
316  template<>
318  public:
320  static bool call(Worker* iWorker,StreamID id,
321  RunPrincipal& ep, EventSetup const& es,
322  ActivityRegistry* actReg,
323  ModuleCallingContext const* mcc,
324  Arg::Context const* context) {
325  ModuleSignalSentry<Arg> cpp(actReg, context, mcc);
326  return iWorker->implDoStreamBegin(id,ep,es, mcc);
327  }
328  static bool prePrefetchSelection(Worker* iWorker,StreamID id,
329  typename Arg::MyPrincipal & ep,
330  ModuleCallingContext const* mcc) {
331  return true;
332  }
333  };
334  template<>
336  public:
338  static bool call(Worker* iWorker,StreamID,
339  RunPrincipal& ep, EventSetup const& es,
340  ActivityRegistry* actReg,
341  ModuleCallingContext const* mcc,
342  Arg::Context const* context) {
343  ModuleSignalSentry<Arg> cpp(actReg, context, mcc);
344  return iWorker->implDoEnd(ep,es, mcc);
345  }
346  static bool prePrefetchSelection(Worker* iWorker,StreamID id,
347  typename Arg::MyPrincipal & ep,
348  ModuleCallingContext const* mcc) {
349  return true;
350  }
351  };
352  template<>
354  public:
356  static bool call(Worker* iWorker,StreamID id,
357  RunPrincipal& ep, EventSetup const& es,
358  ActivityRegistry* actReg,
359  ModuleCallingContext const* mcc,
360  Arg::Context const* context) {
361  ModuleSignalSentry<Arg> cpp(actReg, context, mcc);
362  return iWorker->implDoStreamEnd(id,ep,es, mcc);
363  }
364  static bool prePrefetchSelection(Worker* iWorker,StreamID id,
365  typename Arg::MyPrincipal & ep,
366  ModuleCallingContext const* mcc) {
367  return true;
368  }
369  };
370 
371  template<>
373  public:
375  static bool call(Worker* iWorker,StreamID,
376  LuminosityBlockPrincipal& ep, EventSetup const& es,
377  ActivityRegistry* actReg,
378  ModuleCallingContext const* mcc,
379  Arg::Context const* context) {
380  ModuleSignalSentry<Arg> cpp(actReg, context, mcc);
381  return iWorker->implDoBegin(ep,es, mcc);
382  }
383 
384  static bool prePrefetchSelection(Worker* iWorker,StreamID id,
385  typename Arg::MyPrincipal & ep,
386  ModuleCallingContext const* mcc) {
387  return true;
388  }
389  };
390  template<>
392  public:
394  static bool call(Worker* iWorker,StreamID id,
395  LuminosityBlockPrincipal& ep, EventSetup const& es,
396  ActivityRegistry* actReg,
397  ModuleCallingContext const* mcc,
398  Arg::Context const* context) {
399  ModuleSignalSentry<Arg> cpp(actReg, context, mcc);
400  return iWorker->implDoStreamBegin(id,ep,es, mcc);
401  }
402 
403  static bool prePrefetchSelection(Worker* iWorker,StreamID id,
404  typename Arg::MyPrincipal & ep,
405  ModuleCallingContext const* mcc) {
406  return true;
407  }
408 };
409 
410  template<>
412  public:
414  static bool call(Worker* iWorker,StreamID,
415  LuminosityBlockPrincipal& ep, EventSetup const& es,
416  ActivityRegistry* actReg,
417  ModuleCallingContext const* mcc,
418  Arg::Context const* context) {
419  ModuleSignalSentry<Arg> cpp(actReg, context, mcc);
420  return iWorker->implDoEnd(ep,es, mcc);
421  }
422  static bool prePrefetchSelection(Worker* iWorker,StreamID id,
423  typename Arg::MyPrincipal & ep,
424  ModuleCallingContext const* mcc) {
425  return true;
426  }
427 
428  };
429  template<>
431  public:
433  static bool call(Worker* iWorker,StreamID id,
434  LuminosityBlockPrincipal& ep, EventSetup const& es,
435  ActivityRegistry* actReg,
436  ModuleCallingContext const* mcc,
437  Arg::Context const* context) {
438  ModuleSignalSentry<Arg> cpp(actReg, context, mcc);
439  return iWorker->implDoStreamEnd(id,ep,es, mcc);
440  }
441 
442  static bool prePrefetchSelection(Worker* iWorker,StreamID id,
443  typename Arg::MyPrincipal & ep,
444  ModuleCallingContext const* mcc) {
445  return true;
446  }
447  };
448  }
449 
450  template <typename T>
451  bool Worker::doWork(typename T::MyPrincipal& ep,
452  EventSetup const& es,
453  StreamID streamID,
454  ParentContext const& parentContext,
455  typename T::Context const* context) {
456 
457  if (T::isEvent_) {
458  ++timesVisited_;
459  }
460  bool rc = false;
461 
462  switch(state_) {
463  case Ready: break;
464  case Pass: return true;
465  case Fail: return false;
466  case Exception: {
467  cached_exception_->raise();
468  }
469  }
470 
471  ModuleContextSentry moduleContextSentry(&moduleCallingContext_, parentContext);
472 
473  try {
474  convertException::wrap([&]() {
475 
476  if (T::isEvent_) {
477  ++timesRun_;
478 
479  //if have TriggerResults based selection we want to reject the event before doing prefetching
481  state_ = Pass;
482  ++timesPassed_;
483  rc = true;
484  return;
485  }
486  // Prefetch products the module declares it consumes (not including the products it maybe consumes)
487  std::vector<ProductHolderIndexAndSkipBit> const& items = itemsToGetFromEvent();
488  for(auto const& item : items) {
489  ProductHolderIndex productHolderIndex = item.productHolderIndex();
490  bool skipCurrentProcess = item.skipCurrentProcess();
491  if(productHolderIndex != ProductHolderIndexAmbiguous) {
492  ep.prefetch(productHolderIndex, skipCurrentProcess, &moduleCallingContext_);
493  }
494  }
495  }
496 
498  rc = workerhelper::CallImpl<T>::call(this,streamID,ep,es, actReg_.get(), &moduleCallingContext_, context);
499 
500  if (rc) {
501  state_ = Pass;
502  if (T::isEvent_) ++timesPassed_;
503  } else {
504  state_ = Fail;
505  if (T::isEvent_) ++timesFailed_;
506  }
507  });
508  }
509  catch(cms::Exception& ex) {
510 
511  // NOTE: the warning printed as a result of ignoring or failing
512  // a module will only be printed during the full true processing
513  // pass of this module
514 
515  // Get the action corresponding to this exception. However, if processing
516  // something other than an event (e.g. run, lumi) always rethrow.
518 
519  // If we are processing an endpath and the module was scheduled, treat SkipEvent or FailPath
520  // as IgnoreCompletely, so any subsequent OutputModules are still run.
521  // For unscheduled modules only treat FailPath as IgnoreCompletely but still allow SkipEvent to throw
523  if(top_mcc->type() == ParentContext::Type::kPlaceInPath &&
524  top_mcc->placeInPathContext()->pathContext()->isEndPath()) {
525 
528  }
529  switch(action) {
531  rc = true;
532  ++timesPassed_;
533  state_ = Pass;
534  exceptionContext<T>(ep, ex, &moduleCallingContext_);
535  edm::printCmsExceptionWarning("IgnoreCompletely", ex);
536  break;
537  default:
538  if (T::isEvent_) ++timesExcept_;
539  state_ = Exception;
540  cached_exception_.reset(ex.clone());
541  cached_exception_->raise();
542  }
543  }
544  return rc;
545  }
546 }
547 #endif
static bool call(Worker *iWorker, StreamID, LuminosityBlockPrincipal &ep, EventSetup const &es, ActivityRegistry *actReg, ModuleCallingContext const *mcc, Arg::Context const *context)
Definition: Worker.h:414
bool doWork(typename T::MyPrincipal &, EventSetup const &c, StreamID stream, ParentContext const &parentContext, typename T::Context const *context)
Definition: Worker.h:451
void pathFinished(EventPrincipal &)
Definition: Worker.cc:184
void resetModuleDescription(ModuleDescription const *)
Definition: Worker.cc:98
ModuleDescription const & description() const
Definition: Worker.h:99
void setEarlyDeleteHelper(EarlyDeleteHelper *iHelper)
Definition: Worker.cc:94
virtual void modulesWhoseProductsAreConsumed(std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc) const =0
ModuleCallingContext const * getTopModuleCallingContext() const
virtual void implPostForkReacquireResources(unsigned int iChildIndex, unsigned int iNumberOfChildren)=0
virtual ~Worker()
Definition: Worker.cc:87
void endJob()
Definition: Worker.cc:120
OccurrenceTraits< LuminosityBlockPrincipal, BranchActionStreamBegin > Arg
Definition: Worker.h:393
static bool prePrefetchSelection(Worker *iWorker, StreamID id, typename Arg::MyPrincipal &ep, ModuleCallingContext const *mcc)
Definition: Worker.h:384
static bool call(Worker *iWorker, StreamID id, LuminosityBlockPrincipal &ep, EventSetup const &es, ActivityRegistry *actReg, ModuleCallingContext const *mcc, Arg::Context const *context)
Definition: Worker.h:433
OccurrenceTraits< RunPrincipal, BranchActionGlobalEnd > Arg
Definition: Worker.h:337
int timesPassed() const
Definition: Worker.h:127
virtual void implRespondToCloseInputFile(FileBlock const &fb)=0
std::shared_ptr< ActivityRegistry > actReg_
Definition: Worker.h:194
State state() const
Definition: Worker.h:130
void clearCounters()
Definition: Worker.h:121
std::string const & moduleName() const
static bool prePrefetchSelection(Worker *iWorker, StreamID id, typename Arg::MyPrincipal &ep, ModuleCallingContext const *mcc)
Definition: Worker.h:442
std::string const & category() const
Definition: Exception.cc:183
static bool prePrefetchSelection(Worker *iWorker, StreamID id, typename Arg::MyPrincipal &ep, ModuleCallingContext const *mcc)
Definition: Worker.h:346
exception_actions::ActionCodes find(const std::string &category) const
unsigned int ProductHolderIndex
ActivityRegistry * activityRegistry()
Definition: Worker.h:165
void beginStream(StreamID id, StreamContext &streamContext)
Definition: Worker.cc:136
virtual bool implDoStreamBegin(StreamID id, RunPrincipal &rp, EventSetup const &c, ModuleCallingContext const *mcc)=0
virtual void implPreForkReleaseResources()=0
virtual std::string workerType() const =0
virtual void itemsToGet(BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const =0
ExceptionToActionTable const * actions_
Definition: Worker.h:191
void setActivityRegistry(std::shared_ptr< ActivityRegistry > areg)
Definition: Worker.cc:90
EarlyDeleteHelper * earlyDeleteHelper_
Definition: Worker.h:196
ModuleCallingContext moduleCallingContext_
Definition: Worker.h:189
BranchType
Definition: BranchType.h:11
static bool call(Worker *iWorker, StreamID id, RunPrincipal &ep, EventSetup const &es, ActivityRegistry *actReg, ModuleCallingContext const *mcc, Arg::Context const *context)
Definition: Worker.h:356
virtual bool implDoPrePrefetchSelection(StreamID id, EventPrincipal &ep, ModuleCallingContext const *mcc)=0
bool isEndPath() const
Definition: PathContext.h:42
int timesExcept() const
Definition: Worker.h:129
int timesExcept_
Definition: Worker.h:186
virtual bool implDoBegin(RunPrincipal &rp, EventSetup const &c, ModuleCallingContext const *mcc)=0
virtual void updateLookup(BranchType iBranchType, ProductHolderIndexHelper const &)=0
Worker & operator=(Worker const &)=delete
void reset()
Definition: Worker.h:94
virtual void implRegisterThinnedAssociations(ProductRegistry const &, ThinnedAssociationsHelper &)=0
virtual bool implDo(EventPrincipal &, EventSetup const &c, ModuleCallingContext const *mcc)=0
int timesVisited() const
Definition: Worker.h:126
PathContext const * pathContext() const
int timesPassed_
Definition: Worker.h:184
OccurrenceTraits< RunPrincipal, BranchActionGlobalBegin > Arg
Definition: Worker.h:301
ModuleDescription const * descPtr() const
Definition: Worker.h:100
static bool prePrefetchSelection(Worker *iWorker, StreamID id, typename Arg::MyPrincipal &ep, ModuleCallingContext const *mcc)
Definition: Worker.h:328
static bool prePrefetchSelection(Worker *iWorker, StreamID id, typename Arg::MyPrincipal &ep, ModuleCallingContext const *mcc)
Definition: Worker.h:403
ModuleDescription const * moduleDescription() const
virtual std::vector< ConsumesInfo > consumesInfo() const =0
void registerThinnedAssociations(ProductRegistry const &registry, ThinnedAssociationsHelper &helper)
Definition: Worker.h:92
void printCmsExceptionWarning(char const *behavior, cms::Exception const &e, edm::JobReport *jobRep=0, int rc=-1)
OccurrenceTraits< LuminosityBlockPrincipal, BranchActionGlobalEnd > Arg
Definition: Worker.h:413
Worker(ModuleDescription const &iMD, ExceptionToActionTable const *iActions)
Definition: Worker.cc:71
int timesRun() const
Definition: Worker.h:125
OccurrenceTraits< LuminosityBlockPrincipal, BranchActionStreamEnd > Arg
Definition: Worker.h:432
static bool call(Worker *iWorker, StreamID, LuminosityBlockPrincipal &ep, EventSetup const &es, ActivityRegistry *actReg, ModuleCallingContext const *mcc, Arg::Context const *context)
Definition: Worker.h:375
static bool call(Worker *iWorker, StreamID id, RunPrincipal &ep, EventSetup const &es, ActivityRegistry *actReg, ModuleCallingContext const *mcc, Arg::Context const *context)
Definition: Worker.h:320
virtual void implEndJob()=0
virtual std::vector< ProductHolderIndexAndSkipBit > const & itemsToGetFromEvent() const =0
virtual void modulesDependentUpon(std::vector< const char * > &oModuleLabels) const =0
areg
Definition: Schedule.cc:370
static bool prePrefetchSelection(Worker *iWorker, StreamID id, typename Arg::MyPrincipal &ep, ModuleCallingContext const *mcc)
Definition: Worker.h:310
void postForkReacquireResources(unsigned int iChildIndex, unsigned int iNumberOfChildren)
Definition: Worker.h:91
virtual Types moduleType() const =0
OccurrenceTraits< EventPrincipal, BranchActionStreamBegin > Arg
Definition: Worker.h:282
void postDoEvent(EventPrincipal &)
Definition: Worker.cc:189
OccurrenceTraits< RunPrincipal, BranchActionStreamBegin > Arg
Definition: Worker.h:319
virtual void implBeginJob()=0
static bool prePrefetchSelection(Worker *iWorker, StreamID id, typename Arg::MyPrincipal &ep, ModuleCallingContext const *mcc)
Definition: Worker.h:291
void respondToOpenInputFile(FileBlock const &fb)
Definition: Worker.h:87
virtual void itemsMayGet(BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const =0
int timesRun_
Definition: Worker.h:182
int timesPass() const
Definition: Worker.h:132
static bool call(Worker *iWorker, StreamID, EventPrincipal &ep, EventSetup const &es, ActivityRegistry *, ModuleCallingContext const *mcc, Arg::Context const *)
Definition: Worker.h:283
void addContext(std::string const &context)
Definition: Exception.cc:227
virtual void implBeginStream(StreamID)=0
virtual void implEndStream(StreamID)=0
int timesFailed() const
Definition: Worker.h:128
void respondToCloseInputFile(FileBlock const &fb)
Definition: Worker.h:88
void preForkReleaseResources()
Definition: Worker.h:90
double a
Definition: hdecay.h:121
std::shared_ptr< cms::Exception > cached_exception_
Definition: Worker.h:192
void beginJob()
Definition: Worker.cc:104
void endStream(StreamID id, StreamContext &streamContext)
Definition: Worker.cc:160
int timesFailed_
Definition: Worker.h:185
auto wrap(F iFunc) -> decltype(iFunc())
static Interceptor::Registry registry("Interceptor")
virtual bool implDoEnd(RunPrincipal &rp, EventSetup const &c, ModuleCallingContext const *mcc)=0
static bool prePrefetchSelection(Worker *iWorker, StreamID id, typename Arg::MyPrincipal &ep, ModuleCallingContext const *mcc)
Definition: Worker.h:422
OccurrenceTraits< LuminosityBlockPrincipal, BranchActionGlobalBegin > Arg
Definition: Worker.h:374
preg
Definition: Schedule.cc:370
static bool prePrefetchSelection(Worker *iWorker, StreamID id, typename Arg::MyPrincipal &ep, ModuleCallingContext const *mcc)
Definition: Worker.h:364
virtual void implRespondToOpenInputFile(FileBlock const &fb)=0
static bool call(Worker *iWorker, StreamID id, LuminosityBlockPrincipal &ep, EventSetup const &es, ActivityRegistry *actReg, ModuleCallingContext const *mcc, Arg::Context const *context)
Definition: Worker.h:394
PlaceInPathContext const * placeInPathContext() const
OccurrenceTraits< RunPrincipal, BranchActionStreamEnd > Arg
Definition: Worker.h:355
virtual bool implDoStreamEnd(StreamID id, RunPrincipal &rp, EventSetup const &c, ModuleCallingContext const *mcc)=0
State state_
Definition: Worker.h:187
int timesVisited_
Definition: Worker.h:183
static bool call(Worker *iWorker, StreamID, RunPrincipal &ep, EventSetup const &es, ActivityRegistry *actReg, ModuleCallingContext const *mcc, Arg::Context const *context)
Definition: Worker.h:302
static bool call(Worker *iWorker, StreamID, RunPrincipal &ep, EventSetup const &es, ActivityRegistry *actReg, ModuleCallingContext const *mcc, Arg::Context const *context)
Definition: Worker.h:338