|
|
#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 (WaitingTaskHolder, EventTransitionInfo const &, ServiceToken const &, StreamID const &, StreamContext const *) |
|
template<typename T > |
void | runAllModulesAsync (WaitingTaskHolder, 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 *, tbb::task_group &iGroup) |
|
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 *, tbb::task_group &iGroup) |
|
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 320 of file Path.cc.
333 std::exception_ptr jException =
335 iInfo, streamID, ParentContext(iContext), iContext);
336 if (jException && not iException) {
337 iException = jException;
341 if (not iException) {
342 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(), edm::WaitingTaskHolder::group(), modulesToRun_, edm::hlt::Pass, pathContext_, edm::WaitingTaskList::reset(), runNextWorkerAsync(), state_, timesRun_, waitingTasks_, and workers_.
◆ recordStatus()
◆ runAllModulesAsync()
template<typename T >
void edm::Path::runAllModulesAsync |
( |
WaitingTaskHolder |
task, |
|
|
typename T::TransitionInfoType const & |
info, |
|
|
ServiceToken const & |
token, |
|
|
StreamID const & |
streamID, |
|
|
typename T::Context const * |
context |
|
) |
| |
◆ runNextWorkerAsync()
Definition at line 348 of file Path.cc.
355 const int firstModuleIndex = iNextModuleIndex;
356 int lastModuleIndex = firstModuleIndex;
357 while (lastModuleIndex + 1 != static_cast<int>(
workers_.size()) and
workers_[lastModuleIndex].runConcurrently()) {
360 for (; lastModuleIndex >= firstModuleIndex; --lastModuleIndex) {
361 ServiceWeakToken weakToken = iToken;
362 auto nextTask =
make_waiting_task([
this, lastModuleIndex,
info = iInfo, iID, iContext, weakToken, &iGroup](
363 std::exception_ptr
const* iException) {
364 this->
workerFinished(iException, lastModuleIndex,
info, weakToken.lock(), iID, iContext, iGroup);
366 workers_[lastModuleIndex].runWorkerAsync<OccurrenceTraits<EventPrincipal, BranchActionStreamBegin>>(
References info(), edm::ServiceWeakToken::lock(), edm::make_waiting_task(), 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.
251 EventPrincipal
const& iEP = iInfo.principal();
256 auto& worker =
workers_[iModuleIndex];
257 bool shouldContinue = worker.checkResultsOfRunWorker(
true);
258 std::exception_ptr finalException;
260 std::unique_ptr<cms::Exception> pEx;
262 std::rethrow_exception(*iException);
264 pEx = std::unique_ptr<cms::Exception>(oldEx.
clone());
268 std::ostringstream ost;
270 ModuleDescription
const*
desc = worker.getWorker()->description();
280 worker.skipWorker(iEP);
281 finalException = std::exception_ptr();
283 shouldContinue =
false;
284 finalException = std::current_exception();
293 shouldContinue =
false;
295 auto const nextIndex = iModuleIndex + 1;
296 if (shouldContinue and nextIndex <
workers_.size()) {
297 if (not worker.runConcurrently()) {
304 if (not shouldContinue) {
307 if (not shouldContinue and not worker.runConcurrently()) {
309 for (
auto it =
workers_.begin() + nextIndex, itEnd =
workers_.end(); it != itEnd; ++it) {
316 finished(finalException, iContext, iInfo, iID);
References cms::cuda::assert(), cms::Exception::clone(), CMS_SA_ALLOW, submitPVResolutionJobs::desc, 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 workerFinished(std::exception_ptr const *, unsigned int iModuleIndex, EventTransitionInfo const &, ServiceToken const &, StreamID const &, StreamContext const *, tbb::task_group &iGroup)
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.
void setPathStatus(StreamID const &, HLTPathStatus const &)
void finished(std::exception_ptr, StreamContext const *, EventTransitionInfo const &, StreamID const &)
FunctorWaitingTask< F > * make_waiting_task(F f)
void runNextWorkerAsync(unsigned int iNextModuleIndex, EventTransitionInfo const &, ServiceToken const &, StreamID const &, StreamContext const *, tbb::task_group &iGroup)
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_
std::string const & pathName() const
void add(tbb::task_group *, WaitingTask *)
Adds task to the waiting list.
static const std::string & codeToString(Code)
-----------— implementation details ---------------—
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)