Public Member Functions | Private Attributes | List of all members
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 1307 of file EventProcessor.cc.

Constructor & Destructor Documentation

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

Definition at line 1309 of file EventProcessor.cc.

1310  : evp_{evp}, sid_{sid}
1311  {}

Member Function Documentation

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

Definition at line 1314 of file EventProcessor.cc.

1315  {
1316  // Note: When we start our parent is the eventLoopTask.
1318  if (ex) {
1319  try {
1320  rethrow_exception(ex);
1321  }
1322  catch (cet::exception& e) {
1326  "EventProcessor: an exception occurred during current "
1327  "event processing",
1328  e);
1330  << "terminate event loop because of EXCEPTION";
1331  return;
1332  }
1333  mf::LogWarning(e.category())
1334  << "exception being ignored for current event:\n"
1335  << cet::trim_right_copy(e.what(), " \n");
1336  // WARNING: We continue processing after the catch blocks!!!
1337  }
1338  catch (...) {
1339  mf::LogError("PassingThrough")
1340  << "an exception occurred during current event processing\n";
1343  << "terminate event loop because of EXCEPTION";
1344  return;
1345  }
1346  }
1347 
1348  auto finalize_event_task =
1349  make_waiting_task<EndPathRunnerTask>(evp_, sid_);
1350  try {
1351  evp_->schedule(sid_).process_event_observers(finalize_event_task);
1352  }
1353  catch (cet::exception& e) {
1354  if (evp_->error_action(e) != actions::IgnoreCompletely) {
1355  evp_->sharedException_.store<Exception>(
1357  "EventProcessor: an exception occurred during current event "
1358  "processing",
1359  e);
1361  << "terminate event loop because of EXCEPTION";
1362  return;
1363  }
1364  mf::LogWarning(e.category())
1365  << "exception being ignored for current event:\n"
1366  << cet::trim_right_copy(e.what(), " \n");
1367  // WARNING: We continue processing after the catch blocks!!!
1368  }
1369  catch (...) {
1370  mf::LogError("PassingThrough")
1371  << "an exception occurred during current event processing\n";
1372  evp_->sharedException_.store_current();
1374  << "terminate event loop because of EXCEPTION";
1375  return;
1376  }
1377 
1378  // Once the end path processing is done, exit this task, which
1379  // does not end event-processing because of the continuation
1380  // task.
1382  }
#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)
std::string trim_right_copy(std::string source, std::string const &t=" ")
Definition: trim.h:54
const double e
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
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33

Member Data Documentation

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

Definition at line 1385 of file EventProcessor.cc.

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

Definition at line 1386 of file EventProcessor.cc.


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