17 #include "cetlib/trim.h" 18 #include "hep_concurrency/WaitingTask.h" 20 #include "range/v3/view.hpp" 34 views::filter([](
auto const& worker) {
return worker.isUnique(); });
40 TriggerPathsExecutor::TriggerPathsExecutor(
60 worker.beginJob(resources);
77 error <<
"cet::exception caught in TriggerPathsExecutor::endJob\n" 82 error <<
"Standard library exception caught in " 83 "TriggerPathsExecutor::endJob\n" 88 error <<
"Unknown exception caught in TriggerPathsExecutor::endJob\n";
98 error <<
"cet::exception caught in TriggerPathsExecutor::endJob\n" 103 error <<
"Standard library exception caught in " 104 "TriggerPathsExecutor::endJob\n" 109 error <<
"Unknown exception caught in TriggerPathsExecutor::endJob\n";
119 worker.respondToOpenInputFile(fb);
130 worker.respondToCloseInputFile(fb);
141 worker.respondToOpenOutputFiles(fb);
152 worker.respondToCloseOutputFiles(fb);
164 path.process(trans, principal);
171 WaitingTaskPtr
const endPathTask,
174 : schedule_{schedule}
175 , endPathTask_{endPathTask}
176 , principal_{principal}
183 auto const scheduleID = schedule_->sc_.id();
189 <<
"trigger path processing terminate because of EXCEPTION";
194 schedule_->process_event_paths_done(principal_);
220 auto const scheduleID =
sc_.
id();
229 auto pathsDoneTask = make_waiting_task<PathsDoneTask>(
230 this, endPathTask, event_principal,
taskGroup_);
235 auto pathsDoneTask = std::make_shared<WaitingTask>(
245 path.process(pathsDoneTask, event_principal);
259 auto const scheduleID =
sc_.
id();
270 {resultsInserterDesc.moduleLabel()}};
285 <<
"An exception occurred inserting the TriggerResults object:\n" 286 << cet::trim_right_copy(e.what(),
" \n");
#define TDEBUG_BEGIN_TASK_SI(LEVEL, SI)
ScheduleContext const sc_
std::unique_ptr< Worker > results_inserter_
HLTGlobalStatus & pathResults()
std::vector< Path > & paths()
Event makeEvent(ModuleContext const &mc)
actions::ActionCodes find(std::string const &category) const
#define TDEBUG_END_TASK_SI(LEVEL, SI)
EventPrincipal & principal_
PathsDoneTask(TriggerPathsExecutor *const schedule, WaitingTaskPtr const endPathTask, EventPrincipal &principal, GlobalTaskGroup &group)
void process(Transition, Principal &)
GlobalTaskGroup & taskGroup_
void respondToOpenOutputFiles(FileBlock const &)
ActivityRegistry const & actReg_
std::map< std::string, std::shared_ptr< Worker > > & workers()
ActionTable const & actionTable_
WaitingTaskPtr const endPathTask_
TriggerPathsExecutor *const schedule_
decltype(auto) values(Coll &&coll)
Range-for loop helper iterating across the values of the specified collection.
void respondToOpenInputFile(FileBlock const &)
#define TDEBUG_FUNC_SI(LEVEL, SI)
void process_event_paths_done(EventPrincipal &)
GlobalSignal< detail::SignalResponseType::FIFO, void(Event const &, ScheduleContext)> sPreProcessEvent
void respondToCloseInputFile(FileBlock const &)
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
#define TDEBUG_END_FUNC_SI(LEVEL, SI)
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
void may_run(hep::concurrency::WaitingTaskPtr task, std::exception_ptr ex_ptr={})
void incrementPassedEventCount()
#define TDEBUG_BEGIN_FUNC_SI(LEVEL, SI)
void process_event(hep::concurrency::WaitingTaskPtr endPathTask, EventPrincipal &)
PathsInfo & triggerPathsInfo_
static auto art_path_spec()
void operator()(exception_ptr const ex)
GlobalTaskGroup & taskGroup_
void respondToCloseOutputFiles(FileBlock const &)
static ModuleContext invalid()
void beginJob(detail::SharedResources const &resources)
void incrementTotalEventCount()
cet::coded_exception< error, detail::translate > exception