LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
art::EventProcessor::EndPathTask Class Reference

Public Member Functions

 EndPathTask (EventProcessor *evp, ScheduleID const sid)
 
void operator() (exception_ptr const ex)
 

Private Attributes

EventProcessorevp_
 
ScheduleID const sid_
 

Detailed Description

Definition at line 1268 of file EventProcessor.cc.

Constructor & Destructor Documentation

art::EventProcessor::EndPathTask::EndPathTask ( EventProcessor evp,
ScheduleID const  sid 
)
inline

Definition at line 1270 of file EventProcessor.cc.

1271  : evp_{evp}, sid_{sid}
1272  {}

Member Function Documentation

void art::EventProcessor::EndPathTask::operator() ( exception_ptr const  ex)
inline

Definition at line 1275 of file EventProcessor.cc.

References e, art::errors::EventProcessorFailure, art::actions::FailModule, art::actions::FailPath, art::actions::IgnoreCompletely, art::actions::SkipEvent, TDEBUG_BEGIN_TASK_SI, and TDEBUG_END_TASK_SI.

1276  {
1277  // Note: When we start our parent is the eventLoopTask.
1279  if (ex) {
1280  try {
1281  rethrow_exception(ex);
1282  }
1283  catch (cet::exception& e) {
1284  auto const action = evp_->error_action(e);
1285  if (action != actions::IgnoreCompletely) {
1286  assert(action != actions::FailModule);
1287  assert(action != actions::FailPath);
1288  if (action == actions::SkipEvent) {
1289  mf::LogWarning(e.category())
1290  << "Skipping event due to the following exception:\n"
1291  << cet::trim_right_copy(e.what(), " \n");
1293  << "skipping event because of EXCEPTION";
1294  return;
1295  }
1298  "EventProcessor: an exception occurred during current "
1299  "event processing",
1300  e);
1302  << "terminate event loop because of EXCEPTION";
1303  return;
1304  }
1305  mf::LogWarning(e.category())
1306  << "exception being ignored for current event:\n"
1307  << cet::trim_right_copy(e.what(), " \n");
1308  // WARNING: We continue processing after the catch blocks!!!
1309  }
1310  catch (...) {
1311  mf::LogError("PassingThrough")
1312  << "an exception occurred during current event processing";
1315  << "terminate event loop because of EXCEPTION";
1316  return;
1317  }
1318  }
1319 
1320  auto finalize_event_task =
1321  make_waiting_task<EndPathRunnerTask>(evp_, sid_);
1322  try {
1323  evp_->schedule(sid_).process_event_observers(finalize_event_task);
1324  }
1325  catch (cet::exception& e) {
1326  if (evp_->error_action(e) != actions::IgnoreCompletely) {
1327  evp_->sharedException_.store<Exception>(
1329  "EventProcessor: an exception occurred during current event "
1330  "processing",
1331  e);
1333  << "terminate event loop because of EXCEPTION";
1334  return;
1335  }
1336  mf::LogWarning(e.category())
1337  << "exception being ignored for current event:\n"
1338  << cet::trim_right_copy(e.what(), " \n");
1339  // WARNING: We continue processing after the catch blocks!!!
1340  }
1341  catch (...) {
1342  mf::LogError("PassingThrough")
1343  << "an exception occurred during current event processing";
1344  evp_->sharedException_.store_current();
1346  << "terminate event loop because of EXCEPTION";
1347  return;
1348  }
1349 
1350  // Once the end path processing is done, exit this task, which
1351  // does not end event-processing because of the continuation
1352  // task.
1354  }
#define TDEBUG_BEGIN_TASK_SI(LEVEL, SI)
#define TDEBUG_END_TASK_SI(LEVEL, SI)
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
void store(std::exception_ptr ex_ptr)
actions::ActionCodes error_action(cet::exception &e) const
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
SharedException sharedException_
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
Float_t e
Definition: plot.C:35
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33

Member Data Documentation

EventProcessor* art::EventProcessor::EndPathTask::evp_
private

Definition at line 1357 of file EventProcessor.cc.

ScheduleID const art::EventProcessor::EndPathTask::sid_
private

Definition at line 1358 of file EventProcessor.cc.


The documentation for this class was generated from the following file: