CMS 3D CMS Logo

Worker.cc
Go to the documentation of this file.
1 
2 /*----------------------------------------------------------------------
3 ----------------------------------------------------------------------*/
4 
10 
11 namespace edm {
12  namespace {
13  class ModuleBeginJobSignalSentry {
14  public:
15  ModuleBeginJobSignalSentry(ActivityRegistry* a, ModuleDescription const& md) : a_(a), md_(&md) {
16  if (a_)
17  a_->preModuleBeginJobSignal_(*md_);
18  }
19  ~ModuleBeginJobSignalSentry() {
20  if (a_)
21  a_->postModuleBeginJobSignal_(*md_);
22  }
23 
24  private:
25  ActivityRegistry* a_; // We do not use propagate_const because the registry itself is mutable.
26  ModuleDescription const* md_;
27  };
28 
29  class ModuleEndJobSignalSentry {
30  public:
31  ModuleEndJobSignalSentry(ActivityRegistry* a, ModuleDescription const& md) : a_(a), md_(&md) {
32  if (a_)
33  a_->preModuleEndJobSignal_(*md_);
34  }
35  ~ModuleEndJobSignalSentry() {
36  if (a_)
37  a_->postModuleEndJobSignal_(*md_);
38  }
39 
40  private:
41  ActivityRegistry* a_; // We do not use propagate_const because the registry itself is mutable.
42  ModuleDescription const* md_;
43  };
44 
45  class ModuleBeginStreamSignalSentry {
46  public:
47  ModuleBeginStreamSignalSentry(ActivityRegistry* a, StreamContext const& sc, ModuleCallingContext const& mcc)
48  : a_(a), sc_(sc), mcc_(mcc) {
49  if (a_)
50  a_->preModuleBeginStreamSignal_(sc_, mcc_);
51  }
52  ~ModuleBeginStreamSignalSentry() {
53  if (a_)
54  a_->postModuleBeginStreamSignal_(sc_, mcc_);
55  }
56 
57  private:
58  ActivityRegistry* a_; // We do not use propagate_const because the registry itself is mutable.
59  StreamContext const& sc_;
60  ModuleCallingContext const& mcc_;
61  };
62 
63  class ModuleEndStreamSignalSentry {
64  public:
65  ModuleEndStreamSignalSentry(ActivityRegistry* a, StreamContext const& sc, ModuleCallingContext const& mcc)
66  : a_(a), sc_(sc), mcc_(mcc) {
67  if (a_)
68  a_->preModuleEndStreamSignal_(sc_, mcc_);
69  }
70  ~ModuleEndStreamSignalSentry() {
71  if (a_)
72  a_->postModuleEndStreamSignal_(sc_, mcc_);
73  }
74 
75  private:
76  ActivityRegistry* a_; // We do not use propagate_const because the registry itself is mutable.
77  StreamContext const& sc_;
78  ModuleCallingContext const& mcc_;
79  };
80 
81  } // namespace
82 
84  : timesRun_(0),
85  timesVisited_(0),
86  timesPassed_(0),
87  timesFailed_(0),
88  timesExcept_(0),
89  state_(Ready),
90  numberOfPathsOn_(0),
91  numberOfPathsLeftToRun_(0),
92  moduleCallingContext_(&iMD),
93  actions_(iActions),
94  cached_exception_(),
95  actReg_(),
96  earlyDeleteHelper_(nullptr),
97  workStarted_(false),
98  ranAcquireWithoutException_(false) {}
99 
101 
102  void Worker::setActivityRegistry(std::shared_ptr<ActivityRegistry> areg) { actReg_ = areg; }
103 
105  ModuleCallingContext const* imcc = mcc;
106  while ((imcc->type() == ParentContext::Type::kModule) or (imcc->type() == ParentContext::Type::kInternal)) {
107  std::ostringstream iost;
109  iost << "Prefetching for module ";
110  } else {
111  iost << "Calling method for module ";
112  }
113  iost << imcc->moduleDescription()->moduleName() << "/'" << imcc->moduleDescription()->moduleLabel() << "'";
114 
115  if (imcc->type() == ParentContext::Type::kInternal) {
116  iost << " (probably inside some kind of mixing module)";
117  imcc = imcc->internalContext()->moduleCallingContext();
118  } else {
119  imcc = imcc->moduleCallingContext();
120  }
121  ex.addContext(iost.str());
122  }
123  std::ostringstream ost;
125  ost << "Prefetching for module ";
126  } else {
127  ost << "Calling method for module ";
128  }
129  ost << imcc->moduleDescription()->moduleName() << "/'" << imcc->moduleDescription()->moduleLabel() << "'";
130  ex.addContext(ost.str());
131 
132  if (imcc->type() == ParentContext::Type::kPlaceInPath) {
133  ost.str("");
134  ost << "Running path '";
135  ost << imcc->placeInPathContext()->pathContext()->pathName() << "'";
136  ex.addContext(ost.str());
137  auto streamContext = imcc->placeInPathContext()->pathContext()->streamContext();
138  if (streamContext) {
139  ost.str("");
140  edm::exceptionContext(ost, *streamContext);
141  ex.addContext(ost.str());
142  }
143  } else {
144  if (imcc->type() == ParentContext::Type::kStream) {
145  ost.str("");
146  edm::exceptionContext(ost, *(imcc->streamContext()));
147  ex.addContext(ost.str());
148  } else if (imcc->type() == ParentContext::Type::kGlobal) {
149  ost.str("");
150  edm::exceptionContext(ost, *(imcc->globalContext()));
151  ex.addContext(ost.str());
152  }
153  }
154  }
155 
156  bool Worker::shouldRethrowException(std::exception_ptr iPtr,
157  ParentContext const& parentContext,
158  bool isEvent,
159  TransitionIDValueBase const& iID) const {
160  // NOTE: the warning printed as a result of ignoring or failing
161  // a module will only be printed during the full true processing
162  // pass of this module
163 
164  // Get the action corresponding to this exception. However, if processing
165  // something other than an event (e.g. run, lumi) always rethrow.
166  if (not isEvent) {
167  return true;
168  }
169  try {
170  convertException::wrap([&]() { std::rethrow_exception(iPtr); });
171  } catch (cms::Exception& ex) {
173 
175  return true;
176  }
177 
178  ModuleCallingContext tempContext(&description(), ModuleCallingContext::State::kInvalid, parentContext, nullptr);
179 
180  // If we are processing an endpath and the module was scheduled, treat SkipEvent or FailPath
181  // as IgnoreCompletely, so any subsequent OutputModules are still run.
182  // For unscheduled modules only treat FailPath as IgnoreCompletely but still allow SkipEvent to throw
183  ModuleCallingContext const* top_mcc = tempContext.getTopModuleCallingContext();
184  if (top_mcc->type() == ParentContext::Type::kPlaceInPath &&
185  top_mcc->placeInPathContext()->pathContext()->isEndPath()) {
189  }
190  }
192  edm::printCmsExceptionWarning("IgnoreCompletely", ex);
193  return false;
194  }
195  }
196  return true;
197  }
198 
200  ServiceToken const& token,
201  ParentContext const& parentContext,
202  Principal const& iPrincipal) {
203  // Prefetch products the module declares it consumes (not including the products it maybe consumes)
204  std::vector<ProductResolverIndexAndSkipBit> const& items = itemsToGetFrom(iPrincipal.branchType());
205 
207 
208  if (iPrincipal.branchType() == InEvent) {
209  actReg_->preModuleEventPrefetchingSignal_.emit(*moduleCallingContext_.getStreamContext(), moduleCallingContext_);
210  }
211 
212  //Need to be sure the ref count isn't set to 0 immediately
213  iTask->increment_ref_count();
214  for (auto const& item : items) {
215  ProductResolverIndex productResolverIndex = item.productResolverIndex();
216  bool skipCurrentProcess = item.skipCurrentProcess();
217  if (productResolverIndex != ProductResolverIndexAmbiguous) {
218  iPrincipal.prefetchAsync(iTask, productResolverIndex, skipCurrentProcess, token, &moduleCallingContext_);
219  }
220  }
221 
222  if (iPrincipal.branchType() == InEvent) {
224  }
225 
226  if (0 == iTask->decrement_ref_count()) {
227  //if everything finishes before we leave this routine, we need to launch the task
228  tbb::task::spawn(*iTask);
229  }
230  }
231 
233  ServiceToken const& token,
234  StreamID id,
235  EventPrincipal const* iPrincipal) {
236  successTask->increment_ref_count();
237 
238  auto choiceTask = edm::make_waiting_task(
239  tbb::task::allocate_root(), [id, successTask, iPrincipal, this, token](std::exception_ptr const*) {
241  // There is no reasonable place to rethrow, and implDoPrePrefetchSelection() should not throw in the first place.
242  CMS_SA_ALLOW try {
243  if (not implDoPrePrefetchSelection(id, *iPrincipal, &moduleCallingContext_)) {
244  timesRun_.fetch_add(1, std::memory_order_relaxed);
245  setPassed<true>();
246  waitingTasks_.doneWaiting(nullptr);
247  //TBB requires that destroyed tasks have count 0
248  if (0 == successTask->decrement_ref_count()) {
249  tbb::task::destroy(*successTask);
250  }
251  return;
252  }
253  } catch (...) {
254  }
255  if (0 == successTask->decrement_ref_count()) {
256  tbb::task::spawn(*successTask);
257  }
258  });
259 
260  WaitingTaskHolder choiceHolder{choiceTask};
261 
262  std::vector<ProductResolverIndexAndSkipBit> items;
264 
265  for (auto const& item : items) {
266  ProductResolverIndex productResolverIndex = item.productResolverIndex();
267  bool skipCurrentProcess = item.skipCurrentProcess();
268  if (productResolverIndex != ProductResolverIndexAmbiguous) {
269  iPrincipal->prefetchAsync(choiceTask, productResolverIndex, skipCurrentProcess, token, &moduleCallingContext_);
270  }
271  }
272  choiceHolder.doneWaiting(std::exception_ptr{});
273  }
274 
276 
283  }
284 
286  try {
287  convertException::wrap([&]() {
288  ModuleBeginJobSignalSentry cpp(actReg_.get(), description());
289  implBeginJob();
290  });
291  } catch (cms::Exception& ex) {
292  state_ = Exception;
293  std::ostringstream ost;
294  ost << "Calling beginJob for module " << description().moduleName() << "/'" << description().moduleLabel() << "'";
295  ex.addContext(ost.str());
296  throw;
297  }
298  }
299 
300  void Worker::endJob() {
301  try {
302  convertException::wrap([&]() {
303  ModuleEndJobSignalSentry cpp(actReg_.get(), description());
304  implEndJob();
305  });
306  } catch (cms::Exception& ex) {
307  state_ = Exception;
308  std::ostringstream ost;
309  ost << "Calling endJob for module " << description().moduleName() << "/'" << description().moduleLabel() << "'";
310  ex.addContext(ost.str());
311  throw;
312  }
313  }
314 
315  void Worker::beginStream(StreamID id, StreamContext& streamContext) {
316  try {
317  convertException::wrap([&]() {
319  streamContext.setEventID(EventID(0, 0, 0));
320  streamContext.setRunIndex(RunIndex::invalidRunIndex());
322  streamContext.setTimestamp(Timestamp());
323  ParentContext parentContext(&streamContext);
324  ModuleContextSentry moduleContextSentry(&moduleCallingContext_, parentContext);
326  ModuleBeginStreamSignalSentry beginSentry(actReg_.get(), streamContext, moduleCallingContext_);
327  implBeginStream(id);
328  });
329  } catch (cms::Exception& ex) {
330  state_ = Exception;
331  std::ostringstream ost;
332  ost << "Calling beginStream for module " << description().moduleName() << "/'" << description().moduleLabel()
333  << "'";
334  ex.addContext(ost.str());
335  throw;
336  }
337  }
338 
339  void Worker::endStream(StreamID id, StreamContext& streamContext) {
340  try {
341  convertException::wrap([&]() {
343  streamContext.setEventID(EventID(0, 0, 0));
344  streamContext.setRunIndex(RunIndex::invalidRunIndex());
346  streamContext.setTimestamp(Timestamp());
347  ParentContext parentContext(&streamContext);
348  ModuleContextSentry moduleContextSentry(&moduleCallingContext_, parentContext);
350  ModuleEndStreamSignalSentry endSentry(actReg_.get(), streamContext, moduleCallingContext_);
351  implEndStream(id);
352  });
353  } catch (cms::Exception& ex) {
354  state_ = Exception;
355  std::ostringstream ost;
356  ost << "Calling endStream for module " << description().moduleName() << "/'" << description().moduleLabel()
357  << "'";
358  ex.addContext(ost.str());
359  throw;
360  }
361  }
362 
364  if (earlyDeleteHelper_) {
365  earlyDeleteHelper_->pathFinished(iEvent);
366  }
367  if (0 == --numberOfPathsLeftToRun_) {
369  }
370  }
371 
373  if (earlyDeleteHelper_) {
374  earlyDeleteHelper_->moduleRan(iEvent);
375  }
376  }
377 
379  EventSetupImpl const& es,
380  ParentContext const& parentContext,
381  WaitingTaskWithArenaHolder& holder) {
382  ModuleContextSentry moduleContextSentry(&moduleCallingContext_, parentContext);
383  try {
384  convertException::wrap([&]() { this->implDoAcquire(ep, es, &moduleCallingContext_, holder); });
385  } catch (cms::Exception& ex) {
388  if (shouldRethrowException(std::current_exception(), parentContext, true, idValue)) {
389  timesRun_.fetch_add(1, std::memory_order_relaxed);
390  throw;
391  }
392  }
393  }
394 
395  void Worker::runAcquireAfterAsyncPrefetch(std::exception_ptr const* iEPtr,
396  EventPrincipal const& ep,
397  EventSetupImpl const& es,
398  ParentContext const& parentContext,
401  std::exception_ptr exceptionPtr;
402  if (iEPtr) {
403  assert(*iEPtr);
405  if (shouldRethrowException(*iEPtr, parentContext, true, idValue)) {
406  exceptionPtr = *iEPtr;
407  }
409  } else {
410  // Caught exception is propagated via WaitingTaskWithArenaHolder
411  CMS_SA_ALLOW try {
412  runAcquire(ep, es, parentContext, holder);
414  } catch (...) {
415  exceptionPtr = std::current_exception();
416  }
417  }
418  // It is important this is after runAcquire completely finishes
419  holder.doneWaiting(exceptionPtr);
420  }
421 
422  std::exception_ptr Worker::handleExternalWorkException(std::exception_ptr const* iEPtr,
423  ParentContext const& parentContext) {
425  try {
426  convertException::wrap([iEPtr]() { std::rethrow_exception(*iEPtr); });
427  } catch (cms::Exception& ex) {
428  ModuleContextSentry moduleContextSentry(&moduleCallingContext_, parentContext);
430  return std::current_exception();
431  }
432  }
433  return *iEPtr;
434  }
435 
437  WaitingTask* runModuleTask,
438  ParentContext const& parentContext)
439  : m_worker(worker), m_runModuleTask(runModuleTask), m_parentContext(parentContext) {}
440 
442  auto excptr = exceptionPtr();
443  if (excptr) {
444  // increment the ref count so the holder will not spawn it
445  m_runModuleTask->set_ref_count(1);
446  WaitingTaskHolder holder(m_runModuleTask);
447  holder.doneWaiting(m_worker->handleExternalWorkException(excptr, m_parentContext));
448  }
449  m_runModuleTask->set_ref_count(0);
450  // Depend on TBB Scheduler Bypass to run the next task
451  return m_runModuleTask;
452  }
453 } // namespace edm
edm::Worker::HandleExternalWorkExceptionTask::execute
tbb::task * execute() override
Definition: Worker.cc:441
edm::ModuleCallingContext::state
State state() const
Definition: ModuleCallingContext.h:51
edm::StreamID
Definition: StreamID.h:30
edm::ModuleDescription::moduleLabel
std::string const & moduleLabel() const
Definition: ModuleDescription.h:43
edm::Worker::itemsToGetForSelection
virtual void itemsToGetForSelection(std::vector< ProductResolverIndexAndSkipBit > &) const =0
edm::Worker::HandleExternalWorkExceptionTask::HandleExternalWorkExceptionTask
HandleExternalWorkExceptionTask(Worker *worker, WaitingTask *runModuleTask, ParentContext const &parentContext)
Definition: Worker.cc:436
edm::InternalContext::moduleCallingContext
ModuleCallingContext const * moduleCallingContext() const
Definition: InternalContext.h:28
edm::exceptionContext
void exceptionContext(std::ostream &, GlobalContext const &)
Definition: GlobalContext.cc:59
edm::ProductResolverIndex
unsigned int ProductResolverIndex
Definition: ProductResolverIndex.h:8
edm::Worker::prefetchAsync
void prefetchAsync(WaitingTask *, ServiceToken const &, ParentContext const &parentContext, Principal const &)
Definition: Worker.cc:199
edm::ModuleCallingContext::State::kPrefetching
funct::false
false
Definition: Factorize.h:34
cms::Exception::addContext
void addContext(std::string const &context)
Definition: Exception.cc:165
edm::PathContext::streamContext
StreamContext const * streamContext() const
Definition: PathContext.h:31
edm::Worker::actReg_
std::shared_ptr< ActivityRegistry > actReg_
Definition: Worker.h:618
edm::Worker::implEndJob
virtual void implEndJob()=0
edm::StreamContext::setTransition
void setTransition(Transition v)
Definition: StreamContext.h:65
ActivityRegistry
edm::Worker::TransitionIDValue
Definition: Worker.h:326
edm::exception_actions::Rethrow
Definition: ExceptionActions.h:11
edm::ModuleContextSentry
Definition: ModuleContextSentry.h:11
edm::EventSetupImpl
Definition: EventSetupImpl.h:44
edm::Worker::runAcquire
void runAcquire(EventPrincipal const &ep, EventSetupImpl const &es, ParentContext const &parentContext, WaitingTaskWithArenaHolder &holder)
Definition: Worker.cc:378
WaitingTaskHolder.h
edm::ModuleCallingContext::placeInPathContext
PlaceInPathContext const * placeInPathContext() const
Definition: ModuleCallingContext.h:55
edm::ModuleCallingContext::globalContext
GlobalContext const * globalContext() const
Definition: ModuleCallingContext.h:57
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::Worker::beginJob
void beginJob()
Definition: Worker.cc:285
edm::Worker::preActionBeforeRunEventAsync
virtual void preActionBeforeRunEventAsync(WaitingTask *iTask, ModuleCallingContext const &moduleCallingContext, Principal const &iPrincipal) const =0
edm::printCmsExceptionWarning
void printCmsExceptionWarning(char const *behavior, cms::Exception const &e)
Definition: ExceptionMessages.cc:25
edm::Worker::Exception
Definition: Worker.h:85
edm::Worker::resetModuleDescription
void resetModuleDescription(ModuleDescription const *)
Definition: Worker.cc:277
edm::ModuleDescription::moduleName
std::string const & moduleName() const
Definition: ModuleDescription.h:42
edm::Worker::postDoEvent
void postDoEvent(EventPrincipal const &)
Definition: Worker.cc:372
edm::Worker::actions_
ExceptionToActionTable const * actions_
Definition: Worker.h:615
edm::StreamContext::setTimestamp
void setTimestamp(Timestamp const &v)
Definition: StreamContext.h:69
edm::ModuleCallingContext::streamContext
StreamContext const * streamContext() const
Definition: ModuleCallingContext.h:56
edm::Worker::implBeginJob
virtual void implBeginJob()=0
edm::PlaceInPathContext::pathContext
PathContext const * pathContext() const
Definition: PlaceInPathContext.h:24
edm::ModuleCallingContext::type
Type type() const
Definition: ModuleCallingContext.h:52
edm::StreamContext::setLuminosityBlockIndex
void setLuminosityBlockIndex(LuminosityBlockIndex const &v)
Definition: StreamContext.h:68
edm::ParentContext::Type::kStream
edm::Worker::Worker
Worker(ModuleDescription const &iMD, ExceptionToActionTable const *iActions)
Definition: Worker.cc:83
cms::cuda::assert
assert(be >=bs)
edm::Principal
Definition: Principal.h:57
edm::Worker::numberOfPathsLeftToRun_
std::atomic< int > numberOfPathsLeftToRun_
Definition: Worker.h:611
edm::ParentContext::Type::kGlobal
edm::ParentContext::Type::kPlaceInPath
edm::ModuleCallingContext::State::kInvalid
edm::ModuleCallingContext::moduleDescription
ModuleDescription const * moduleDescription() const
Definition: ModuleCallingContext.h:50
edm::WaitingTaskHolder::doneWaiting
void doneWaiting(std::exception_ptr iExcept)
Definition: WaitingTaskHolder.h:75
groupFilesInBlocks.temp
list temp
Definition: groupFilesInBlocks.py:142
CMS_SA_ALLOW
#define CMS_SA_ALLOW
Definition: thread_safety_macros.h:5
edm::Worker::implEndStream
virtual void implEndStream(StreamID)=0
edm::ModuleCallingContext::parent
ParentContext const & parent() const
Definition: ModuleCallingContext.h:53
edm::ModuleDescription
Definition: ModuleDescription.h:21
mps_monitormerge.items
list items
Definition: mps_monitormerge.py:29
edm::ModuleCallingContext::moduleCallingContext
ModuleCallingContext const * moduleCallingContext() const
Definition: ModuleCallingContext.h:54
edm::ServiceToken
Definition: ServiceToken.h:40
edm::WaitingTaskWithArenaHolder
Definition: WaitingTaskWithArenaHolder.h:31
edm::Worker::shouldRethrowException
bool shouldRethrowException(std::exception_ptr iPtr, ParentContext const &parentContext, bool isEvent, TransitionIDValueBase const &iID) const
Definition: Worker.cc:156
edm::Worker::implDoPrePrefetchSelection
virtual bool implDoPrePrefetchSelection(StreamID id, EventPrincipal const &ep, ModuleCallingContext const *mcc)=0
edm::EventPrincipal
Definition: EventPrincipal.h:46
edm::Worker::earlyDeleteHelper_
edm::propagate_const< EarlyDeleteHelper * > earlyDeleteHelper_
Definition: Worker.h:620
edm::Worker::setActivityRegistry
void setActivityRegistry(std::shared_ptr< ActivityRegistry > areg)
Definition: Worker.cc:102
edm::StreamContext
Definition: StreamContext.h:31
EarlyDeleteHelper.h
edm::Worker::timesRun_
std::atomic< int > timesRun_
Definition: Worker.h:604
edm::ModuleCallingContext::internalContext
InternalContext const * internalContext() const
Definition: ModuleCallingContext.h:58
edm::convertException::wrap
auto wrap(F iFunc) -> decltype(iFunc())
Definition: ConvertException.h:19
edm::StreamContext::Transition::kBeginStream
edm::ParentContext::Type::kInternal
TrackValidation_cff.task
task
Definition: TrackValidation_cff.py:252
edm::Worker::state_
std::atomic< State > state_
Definition: Worker.h:609
edm::Principal::branchType
BranchType const & branchType() const
Definition: Principal.h:179
edm::exception_actions::FailPath
Definition: ExceptionActions.h:11
edm::Worker::endJob
void endJob()
Definition: Worker.cc:300
edm::WaitingTaskList::doneWaiting
void doneWaiting(std::exception_ptr iPtr)
Signals that the resource is now available and tasks should be spawned.
Definition: WaitingTaskList.cc:169
edm::InEvent
Definition: BranchType.h:11
edm::Principal::prefetchAsync
void prefetchAsync(WaitingTask *waitTask, ProductResolverIndex index, bool skipCurrentProcess, ServiceToken const &token, ModuleCallingContext const *mcc) const
Definition: Principal.cc:604
edm::exception_actions::SkipEvent
Definition: ExceptionActions.h:11
edm::ParentContext::Type::kModule
edm::Worker
Definition: Worker.h:83
edm::make_waiting_task
FunctorWaitingTask< F > * make_waiting_task(ALLOC &&iAlloc, F f)
Definition: WaitingTask.h:87
edm::ParentContext
Definition: ParentContext.h:27
edm::PathContext::isEndPath
bool isEndPath() const
Definition: PathContext.h:35
edm::Worker::waitingTasks_
edm::WaitingTaskList waitingTasks_
Definition: Worker.h:622
a
double a
Definition: hdecay.h:119
edm::LuminosityBlockIndex::invalidLuminosityBlockIndex
static LuminosityBlockIndex invalidLuminosityBlockIndex()
Definition: LuminosityBlockIndex.cc:9
edm::WaitingTaskHolder
Definition: WaitingTaskHolder.h:30
edm::ModuleCallingContext::previousModuleOnThread
ModuleCallingContext const * previousModuleOnThread() const
Definition: ModuleCallingContext.h:75
Ready
Definition: hltDiff.cc:243
edm::ModuleCallingContext::getStreamContext
StreamContext const * getStreamContext() const
Definition: ModuleCallingContext.cc:32
edm::ModuleCallingContext::setState
void setState(State state)
Definition: ModuleCallingContext.h:48
edm::Worker::prePrefetchSelectionAsync
void prePrefetchSelectionAsync(WaitingTask *task, ServiceToken const &, StreamID stream, EventPrincipal const *)
Definition: Worker.cc:232
edm::ModuleCallingContext::setContext
void setContext(State state, ParentContext const &parent, ModuleCallingContext const *previousOnThread)
Definition: ModuleCallingContext.cc:24
iEvent
int iEvent
Definition: GenABIO.cc:224
edm::Worker::setEarlyDeleteHelper
void setEarlyDeleteHelper(EarlyDeleteHelper *iHelper)
Definition: Worker.cc:275
edm::Worker::ranAcquireWithoutException_
bool ranAcquireWithoutException_
Definition: Worker.h:624
edm::Worker::exceptionContext
static void exceptionContext(cms::Exception &ex, ModuleCallingContext const *mcc)
Definition: Worker.cc:104
edm::Worker::~Worker
virtual ~Worker()
Definition: Worker.cc:100
writedatasetfile.action
action
Definition: writedatasetfile.py:8
edm::StreamContext::setEventID
void setEventID(EventID const &v)
Definition: StreamContext.h:66
edm::Worker::moduleCallingContext_
ModuleCallingContext moduleCallingContext_
Definition: Worker.h:613
B2GTnPMonitor_cfi.item
item
Definition: B2GTnPMonitor_cfi.py:147
edm::ExceptionToActionTable
Definition: ExceptionActions.h:16
edm::Worker::description
ModuleDescription const & description() const
Definition: Worker.h:190
edm::Worker::cached_exception_
std::exception_ptr cached_exception_
Definition: Worker.h:616
edm::Worker::TransitionIDValueBase
Definition: Worker.h:319
edm::EarlyDeleteHelper
Definition: EarlyDeleteHelper.h:40
edm::RunIndex::invalidRunIndex
static RunIndex invalidRunIndex()
Definition: RunIndex.cc:9
edm::ModuleCallingContext::getTopModuleCallingContext
ModuleCallingContext const * getTopModuleCallingContext() const
Definition: ModuleCallingContext.cc:52
edm::PathContext::pathName
std::string const & pathName() const
Definition: PathContext.h:30
WaitingTask.h
edm::ProductResolverIndexAmbiguous
Definition: ProductResolverIndex.h:18
edm::Worker::itemsToGetFrom
virtual std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom(BranchType) const =0
edm::WaitingTask
Definition: WaitingTask.h:36
edm::StreamContext::setRunIndex
void setRunIndex(RunIndex const &v)
Definition: StreamContext.h:67
edm::Worker::skipOnPath
void skipOnPath(EventPrincipal const &iEvent)
Definition: Worker.cc:363
Worker.h
or
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
edm::Worker::implDoAcquire
virtual void implDoAcquire(EventPrincipal const &, EventSetupImpl const &c, ModuleCallingContext const *mcc, WaitingTaskWithArenaHolder &holder)=0
edm::Worker::handleExternalWorkException
std::exception_ptr handleExternalWorkException(std::exception_ptr const *iEPtr, ParentContext const &parentContext)
Definition: Worker.cc:422
edm::Worker::runAcquireAfterAsyncPrefetch
void runAcquireAfterAsyncPrefetch(std::exception_ptr const *iEPtr, EventPrincipal const &ep, EventSetupImpl const &es, ParentContext const &parentContext, WaitingTaskWithArenaHolder holder)
Definition: Worker.cc:395
edm::ExceptionToActionTable::find
exception_actions::ActionCodes find(const std::string &category) const
Definition: ExceptionActions.cc:85
edm::Worker::implBeginStream
virtual void implBeginStream(StreamID)=0
cms::Exception
Definition: Exception.h:70
StreamContext.h
edm::EventID
Definition: EventID.h:31
edm::exception_actions::IgnoreCompletely
Definition: ExceptionActions.h:11
cms::Exception::category
std::string const & category() const
Definition: Exception.cc:143
edm::ServiceRegistry::Operate
Definition: ServiceRegistry.h:40
SiStripBadComponentsDQMServiceTemplate_cfg.ep
ep
Definition: SiStripBadComponentsDQMServiceTemplate_cfg.py:86
edm::Worker::beginStream
void beginStream(StreamID id, StreamContext &streamContext)
Definition: Worker.cc:315
edm::Worker::endStream
void endStream(StreamID id, StreamContext &streamContext)
Definition: Worker.cc:339
edm::StreamContext::Transition::kEndStream
edm::exception_actions::ActionCodes
ActionCodes
Definition: ExceptionActions.h:11
edm::ModuleCallingContext::State::kRunning
edm::ModuleCallingContext
Definition: ModuleCallingContext.h:29
unpackBuffers-CaloStage2.token
token
Definition: unpackBuffers-CaloStage2.py:316
edm::WaitingTaskWithArenaHolder::doneWaiting
void doneWaiting(std::exception_ptr iExcept)
Definition: WaitingTaskWithArenaHolder.cc:62
edm::Timestamp
Definition: Timestamp.h:30