|
|
#include <Path.h>
|
int | bitPosition () const |
|
void | clearCounters () |
|
Worker const * | getWorker (size_type i) const |
|
std::string const & | name () const |
|
Path & | operator= (Path const &)=delete |
|
| Path (int bitpos, std::string const &path_name, WorkersInPath const &workers, TrigResPtr trptr, ExceptionToActionTable const &actions, std::shared_ptr< ActivityRegistry > reg, StreamContext const *streamContext, std::atomic< bool > *stopProcessEvent, PathContext::PathType pathType) |
|
| Path (Path const &) |
|
void | processOneOccurrenceAsync (WaitingTask *, EventTransitionInfo const &, ServiceToken const &, StreamID const &, StreamContext const *) |
|
template<typename T > |
void | runAllModulesAsync (WaitingTask *, typename T::TransitionInfoType const &, ServiceToken const &, StreamID const &, typename T::Context const *) |
|
void | setEarlyDeleteHelpers (std::map< const Worker *, EarlyDeleteHelper * > const &) |
|
void | setPathStatusInserter (PathStatusInserter *pathStatusInserter, Worker *pathStatusInserterWorker) |
|
size_type | size () const |
|
int | timesExcept () const |
|
int | timesExcept (size_type i) const |
|
int | timesFailed () const |
|
int | timesFailed (size_type i) const |
|
int | timesPassed () const |
|
int | timesPassed (size_type i) const |
|
int | timesRun () const |
|
int | timesVisited (size_type i) const |
|
|
void | finished (std::exception_ptr, StreamContext const *, EventTransitionInfo const &, StreamID const &) |
|
bool | handleWorkerFailure (cms::Exception &e, int nwrwue, bool isEvent, bool begin, BranchType branchType, ModuleDescription const &, std::string const &id) const |
|
void | recordStatus (int nwrwue, hlt::HLTState state) |
|
void | runNextWorkerAsync (unsigned int iNextModuleIndex, EventTransitionInfo const &, ServiceToken const &, StreamID const &, StreamContext const *) |
|
void | threadsafe_setFailedModuleInfo (int nwrwue, std::exception_ptr) |
|
void | updateCounters (hlt::HLTState state) |
|
void | workerFinished (std::exception_ptr const *, unsigned int iModuleIndex, EventTransitionInfo const &, ServiceToken const &, StreamID const &, StreamContext const *) |
|
Definition at line 41 of file Path.h.
◆ size_type
◆ State
◆ TrigResPtr
◆ WorkersInPath
◆ Path() [1/2]
◆ Path() [2/2]
edm::Path::Path |
( |
Path const & |
r | ) |
|
◆ bitPosition()
int edm::Path::bitPosition |
( |
| ) |
const |
|
inline |
◆ clearCounters()
void edm::Path::clearCounters |
( |
| ) |
|
◆ exceptionContext()
◆ finished()
Definition at line 317 of file Path.cc.
330 std::exception_ptr jException =
332 iInfo, streamID, ParentContext(iContext), iContext);
333 if (jException && not iException) {
334 iException = jException;
338 if (not iException) {
339 iException = std::current_exception();
References actReg_, CMS_SA_ALLOW, edm::WaitingTaskList::doneWaiting(), failedModuleIndex_, pathContext_, pathStatusInserter_, pathStatusInserterWorker_, recordStatus(), edm::Worker::runModuleDirectly(), edm::PathStatusInserter::setPathStatus(), state_, mps_update::status, updateCounters(), and waitingTasks_.
Referenced by processOneOccurrenceAsync(), and workerFinished().
◆ getWorker()
◆ handleWorkerFailure()
Definition at line 70 of file Path.cc.
77 if (
e.context().empty()) {
80 bool should_continue =
true;
89 should_continue =
false;
103 if (
e.category() == pNF) {
104 std::ostringstream ost;
105 ost <<
"If you wish to continue processing events after a " << pNF <<
" exception,\n"
106 <<
"add \"SkipEvent = cms.untracked.vstring('ProductNotFound')\" to the \"options\" PSet in the "
108 e.addAdditionalInfo(ost.str());
116 return should_continue;
References act_table_, writedatasetfile::action, edm::Exception::codeToString(), submitPVResolutionJobs::desc, MillePedeFileConverter_cfg::e, exceptionContext(), edm::exception_actions::FailPath, edm::ExceptionToActionTable::find(), pathContext_, edm::printCmsExceptionWarning(), edm::errors::ProductNotFound, edm::exception_actions::Rethrow, edm::exception_actions::SkipEvent, stopProcessingEvent_, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by workerFinished().
◆ name()
std::string const& edm::Path::name |
( |
void |
| ) |
const |
|
inline |
◆ operator=()
Path& edm::Path::operator= |
( |
Path const & |
| ) |
|
|
delete |
◆ processOneOccurrenceAsync()
Definition at line 218 of file Path.cc.
237 finished(std::exception_ptr(), iStreamContext, iInfo, iStreamID);
References actReg_, edm::WaitingTaskList::add(), failedModuleIndex_, finished(), modulesToRun_, edm::hlt::Pass, pathContext_, edm::WaitingTaskList::reset(), runNextWorkerAsync(), state_, timesRun_, waitingTasks_, and workers_.
◆ recordStatus()
◆ runAllModulesAsync()
template<typename T >
void edm::Path::runAllModulesAsync |
( |
WaitingTask * |
task, |
|
|
typename T::TransitionInfoType const & |
info, |
|
|
ServiceToken const & |
token, |
|
|
StreamID const & |
streamID, |
|
|
typename T::Context const * |
context |
|
) |
| |
◆ runNextWorkerAsync()
Definition at line 345 of file Path.cc.
351 const int firstModuleIndex = iNextModuleIndex;
352 int lastModuleIndex = firstModuleIndex;
353 while (lastModuleIndex + 1 != static_cast<int>(
workers_.size()) and
workers_[lastModuleIndex].runConcurrently()) {
356 for (; lastModuleIndex >= firstModuleIndex; --lastModuleIndex) {
358 tbb::task::allocate_root(),
359 [
this, lastModuleIndex,
info = iInfo, iID, iContext,
token = iToken](std::exception_ptr
const* iException) {
362 workers_[lastModuleIndex].runWorkerAsync<OccurrenceTraits<EventPrincipal, BranchActionStreamBegin>>(
363 nextTask, iInfo, iToken, iID, iContext);
References info(), edm::make_waiting_task(), unpackBuffers-CaloStage2::token, workerFinished(), and workers_.
Referenced by processOneOccurrenceAsync(), and workerFinished().
◆ setEarlyDeleteHelpers()
◆ setPathStatusInserter()
◆ size()
◆ threadsafe_setFailedModuleInfo()
void edm::Path::threadsafe_setFailedModuleInfo |
( |
int |
nwrwue, |
|
|
std::exception_ptr |
iExcept |
|
) |
| |
|
private |
◆ timesExcept() [1/2]
int edm::Path::timesExcept |
( |
| ) |
const |
|
inline |
◆ timesExcept() [2/2]
int edm::Path::timesExcept |
( |
size_type |
i | ) |
const |
|
inline |
◆ timesFailed() [1/2]
int edm::Path::timesFailed |
( |
| ) |
const |
|
inline |
◆ timesFailed() [2/2]
int edm::Path::timesFailed |
( |
size_type |
i | ) |
const |
|
inline |
◆ timesPassed() [1/2]
int edm::Path::timesPassed |
( |
| ) |
const |
|
inline |
◆ timesPassed() [2/2]
int edm::Path::timesPassed |
( |
size_type |
i | ) |
const |
|
inline |
◆ timesRun()
int edm::Path::timesRun |
( |
| ) |
const |
|
inline |
◆ timesVisited()
int edm::Path::timesVisited |
( |
size_type |
i | ) |
const |
|
inline |
◆ updateCounters()
◆ workerFinished()
Definition at line 244 of file Path.cc.
250 EventPrincipal
const& iEP = iInfo.principal();
255 auto& worker =
workers_[iModuleIndex];
256 bool shouldContinue = worker.checkResultsOfRunWorker(
true);
257 std::exception_ptr finalException;
259 std::unique_ptr<cms::Exception> pEx;
261 std::rethrow_exception(*iException);
263 pEx = std::unique_ptr<cms::Exception>(oldEx.
clone());
267 std::ostringstream ost;
274 worker.getWorker()->description(),
277 worker.skipWorker(iEP);
278 finalException = std::exception_ptr();
280 shouldContinue =
false;
281 finalException = std::current_exception();
290 shouldContinue =
false;
292 auto const nextIndex = iModuleIndex + 1;
293 if (shouldContinue and nextIndex <
workers_.size()) {
294 if (not worker.runConcurrently()) {
301 if (not shouldContinue) {
304 if (not shouldContinue and not worker.runConcurrently()) {
306 for (
auto it =
workers_.begin() + nextIndex, itEnd =
workers_.end(); it != itEnd; ++it) {
313 finished(finalException, iContext, iInfo, iID);
References cms::Exception::clone(), CMS_SA_ALLOW, finished(), handleWorkerFailure(), edm::EventPrincipal::id(), edm::InEvent, modulesToRun_, edm::WaitingTaskList::presetTaskAsFailed(), edm::EventTransitionInfo::principal(), runNextWorkerAsync(), stopProcessingEvent_, threadsafe_setFailedModuleInfo(), waitingTasks_, and workers_.
Referenced by runNextWorkerAsync().
◆ act_table_
◆ actReg_
◆ bitpos_
const int edm::Path::bitpos_ |
|
private |
◆ failedModuleIndex_
int edm::Path::failedModuleIndex_ |
|
private |
◆ modulesToRun_
std::atomic<unsigned int> edm::Path::modulesToRun_ |
|
private |
◆ pathContext_
◆ pathStatusInserter_
◆ pathStatusInserterWorker_
Worker* edm::Path::pathStatusInserterWorker_ |
|
private |
◆ state_
◆ stateLock_
std::atomic<bool> edm::Path::stateLock_ = false |
|
private |
◆ stopProcessingEvent_
std::atomic<bool>* const edm::Path::stopProcessingEvent_ |
|
private |
◆ timesExcept_
int edm::Path::timesExcept_ |
|
private |
◆ timesFailed_
int edm::Path::timesFailed_ |
|
private |
◆ timesPassed_
int edm::Path::timesPassed_ |
|
private |
◆ timesRun_
◆ trptr_
◆ waitingTasks_
◆ workers_
Definition at line 113 of file Path.h.
Referenced by clearCounters(), getWorker(), Path(), processOneOccurrenceAsync(), runAllModulesAsync(), runNextWorkerAsync(), size(), timesExcept(), timesFailed(), timesPassed(), timesVisited(), and workerFinished().
Worker * pathStatusInserterWorker_
PathStatusInserter * pathStatusInserter_
Worker const * getWorker(size_type i) const
void addContext(std::string const &context)
std::atomic< bool > stateLock_
void threadsafe_setFailedModuleInfo(int nwrwue, std::exception_ptr)
WaitingTaskList waitingTasks_
std::atomic< unsigned int > modulesToRun_
std::exception_ptr runModuleDirectly(typename T::TransitionInfoType const &, StreamID, ParentContext const &, typename T::Context const *)
void printCmsExceptionWarning(char const *behavior, cms::Exception const &e)
void add(WaitingTask *)
Adds task to the waiting list.
void reset()
Resets access to the resource so that added tasks will wait.
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
void presetTaskAsFailed(std::exception_ptr iExcept)
std::atomic< bool > *const stopProcessingEvent_
void updateCounters(hlt::HLTState state)
void doneWaiting(std::exception_ptr iPtr)
Signals that the resource is now available and tasks should be spawned.
FunctorWaitingTask< F > * make_waiting_task(ALLOC &&iAlloc, F f)
void setPathStatus(StreamID const &, HLTPathStatus const &)
void finished(std::exception_ptr, StreamContext const *, EventTransitionInfo const &, StreamID const &)
ExceptionToActionTable const *const act_table_
static void exceptionContext(cms::Exception &ex, bool isEvent, bool begin, BranchType branchType, ModuleDescription const &, std::string const &id, PathContext const &)
const std::shared_ptr< ActivityRegistry > actReg_
void runNextWorkerAsync(unsigned int iNextModuleIndex, EventTransitionInfo const &, ServiceToken const &, StreamID const &, StreamContext const *)
std::string const & pathName() const
static const std::string & codeToString(Code)
-----------— implementation details ---------------—
void workerFinished(std::exception_ptr const *, unsigned int iModuleIndex, EventTransitionInfo const &, ServiceToken const &, StreamID const &, StreamContext const *)
virtual Exception * clone() const
exception_actions::ActionCodes find(const std::string &category) const
roAction_t actions[nactions]
bool handleWorkerFailure(cms::Exception &e, int nwrwue, bool isEvent, bool begin, BranchType branchType, ModuleDescription const &, std::string const &id) const
void recordStatus(int nwrwue, hlt::HLTState state)