12 class ModuleBeginJobSignalSentry {
14 ModuleBeginJobSignalSentry(
ActivityRegistry*
a, ModuleDescription
const& md):a_(a), md_(&md) {
15 if(a_) a_->preModuleBeginJobSignal_(*md_);
17 ~ModuleBeginJobSignalSentry() {
18 if(a_) a_->postModuleBeginJobSignal_(*md_);
22 ModuleDescription
const* md_;
25 class ModuleEndJobSignalSentry {
27 ModuleEndJobSignalSentry(
ActivityRegistry* a, ModuleDescription
const& md):a_(a), md_(&md) {
28 if(a_) a_->preModuleEndJobSignal_(*md_);
30 ~ModuleEndJobSignalSentry() {
31 if(a_) a_->postModuleEndJobSignal_(*md_);
35 ModuleDescription
const* md_;
38 class ModuleBeginStreamSignalSentry {
41 StreamContext
const&
sc,
42 ModuleCallingContext
const& mcc) : a_(a), sc_(sc), mcc_(mcc) {
43 if(a_) a_->preModuleBeginStreamSignal_(sc_, mcc_);
45 ~ModuleBeginStreamSignalSentry() {
46 if(a_) a_->postModuleBeginStreamSignal_(sc_, mcc_);
50 StreamContext
const& sc_;
51 ModuleCallingContext
const& mcc_;
54 class ModuleEndStreamSignalSentry {
57 StreamContext
const& sc,
58 ModuleCallingContext
const& mcc) : a_(a), sc_(sc), mcc_(mcc) {
59 if(a_) a_->preModuleEndStreamSignal_(sc_, mcc_);
61 ~ModuleEndStreamSignalSentry() {
62 if(a_) a_->postModuleEndStreamSignal_(sc_, mcc_);
66 StreamContext
const& sc_;
67 ModuleCallingContext
const& mcc_;
81 numberOfPathsLeftToRun_(0),
82 moduleCallingContext_(&iMD),
106 std::ostringstream iost;
108 iost <<
"Prefetching for module ";
110 iost <<
"Calling method for module ";
116 iost <<
" (probably inside some kind of mixing module)";
123 std::ostringstream ost;
125 ost <<
"Prefetching for module ";
127 ost <<
"Calling method for module ";
135 ost <<
"Running path '";
173 std::rethrow_exception(iPtr);
214 iTask->increment_ref_count();
215 for(
auto const& item : items) {
217 bool skipCurrentProcess = item.skipCurrentProcess();
225 if(0 == iTask->decrement_ref_count()) {
227 tbb::task::spawn(*iTask);
250 std::ostringstream ost;
266 std::ostringstream ost;
290 std::ostringstream ost;
314 std::ostringstream ost;
std::string const & pathName() const
GlobalContext const * globalContext() const
void resetModuleDescription(ModuleDescription const *)
void setTimestamp(Timestamp const &v)
ModuleDescription const & description() const
void setState(State state)
std::atomic< int > numberOfPathsLeftToRun_
unsigned int ProductResolverIndex
StreamContext const * getStreamContext() const
ModuleCallingContext const * moduleCallingContext() const
void setEarlyDeleteHelper(EarlyDeleteHelper *iHelper)
ModuleCallingContext const * getTopModuleCallingContext() const
static void exceptionContext(cms::Exception &ex, ModuleCallingContext const *mcc)
InternalContext const * internalContext() const
virtual std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFromEvent() const =0
std::shared_ptr< ActivityRegistry > actReg_
std::string const & moduleName() const
std::string const & category() const
exception_actions::ActionCodes find(const std::string &category) const
ModuleCallingContext const * moduleCallingContext() const
void beginStream(StreamID id, StreamContext &streamContext)
void exceptionContext(std::ostream &, GlobalContext const &)
ExceptionToActionTable const * actions_
std::string const & moduleLabel() const
void setContext(State state, ParentContext const &parent, ModuleCallingContext const *previousOnThread)
void setActivityRegistry(std::shared_ptr< ActivityRegistry > areg)
ParentContext const & parent() const
ModuleCallingContext moduleCallingContext_
void setTransition(Transition v)
std::exception_ptr cached_exception_
static RunIndex invalidRunIndex()
void doneWaiting(std::exception_ptr iPtr)
Signals that the resource is now available and tasks should be spawned.
bool shouldRethrowException(std::exception_ptr iPtr, ParentContext const &parentContext, bool isEvent, TransitionIDValueBase const &iID) const
edm::WaitingTaskList waitingTasks_
void setLuminosityBlockIndex(LuminosityBlockIndex const &v)
PathContext const * pathContext() const
void prefetchAsync(WaitingTask *waitTask, ProductResolverIndex index, bool skipCurrentProcess, ModuleCallingContext const *mcc) const
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
ModuleDescription const * moduleDescription() const
Worker(ModuleDescription const &iMD, ExceptionToActionTable const *iActions)
std::atomic< State > state_
virtual void implEndJob()=0
StreamContext const * streamContext() const
static LuminosityBlockIndex invalidLuminosityBlockIndex()
virtual void implBeginJob()=0
void prefetchAsync(WaitingTask *, ParentContext const &parentContext, Principal const &)
void addContext(std::string const &context)
virtual void implBeginStream(StreamID)=0
virtual void implEndStream(StreamID)=0
StreamContext const * streamContext() const
void setEventID(EventID const &v)
ModuleCallingContext const * previousModuleOnThread() const
void endStream(StreamID id, StreamContext &streamContext)
void postDoEvent(EventPrincipal const &)
auto wrap(F iFunc) -> decltype(iFunc())
edm::propagate_const< EarlyDeleteHelper * > earlyDeleteHelper_
virtual void preActionBeforeRunEventAsync(WaitingTask *iTask, ModuleCallingContext const &moduleCallingContext, Principal const &iPrincipal) const =0
PlaceInPathContext const * placeInPathContext() const
void setRunIndex(RunIndex const &v)
void printCmsExceptionWarning(char const *behavior, cms::Exception const &e)