#include <Worker.h>
Public Types | |
enum | State { Ready, Pass, Fail, Working, ExceptionThrown } |
Public Member Functions | |
virtual | ~Worker ()=default |
Worker (ModuleDescription const &, WorkerParams const &) | |
void | beginJob (detail::SharedResources const &) |
void | endJob () |
void | respondToOpenInputFile (FileBlock const &fb) |
void | respondToCloseInputFile (FileBlock const &fb) |
void | respondToOpenOutputFiles (FileBlock const &fb) |
void | respondToCloseOutputFiles (FileBlock const &fb) |
bool | doWork (Transition, Principal &, ModuleContext const &) |
void | doWork_event (hep::concurrency::WaitingTaskPtr workerInPathDoneTask, EventPrincipal &, ModuleContext const &) |
void | doWork_event (EventPrincipal &, ModuleContext const &) |
ScheduleID | scheduleID () const |
ModuleDescription const & | description () const |
std::string const & | label () const |
bool | returnCode () const |
hep::concurrency::SerialTaskQueueChain * | serialTaskQueueChain () const |
void | reset () |
std::size_t | timesVisited () const |
std::size_t | timesRun () const |
std::size_t | timesPassed () const |
std::size_t | timesFailed () const |
std::size_t | timesExcept () const |
void | runWorker (EventPrincipal &, ModuleContext const &) |
Protected Member Functions | |
virtual std::string | workerType () const =0 |
virtual hep::concurrency::SerialTaskQueueChain * | implSerialTaskQueueChain () const =0 |
virtual void | implBeginJob (detail::SharedResources const &resources)=0 |
virtual void | implEndJob ()=0 |
virtual bool | implDoBegin (RunPrincipal &rp, ModuleContext const &mc)=0 |
virtual bool | implDoEnd (RunPrincipal &rp, ModuleContext const &mc)=0 |
virtual bool | implDoBegin (SubRunPrincipal &srp, ModuleContext const &mc)=0 |
virtual bool | implDoEnd (SubRunPrincipal &srp, ModuleContext const &mc)=0 |
virtual bool | implDoProcess (EventPrincipal &, ModuleContext const &)=0 |
Protected Attributes | |
std::atomic< std::size_t > | counts_visited_ {} |
std::atomic< std::size_t > | counts_run_ {} |
std::atomic< std::size_t > | counts_passed_ {} |
std::atomic< std::size_t > | counts_failed_ {} |
std::atomic< std::size_t > | counts_thrown_ {} |
Private Member Functions | |
virtual void | implRespondToOpenInputFile (FileBlock const &fb)=0 |
virtual void | implRespondToCloseInputFile (FileBlock const &fb)=0 |
virtual void | implRespondToOpenOutputFiles (FileBlock const &fb)=0 |
virtual void | implRespondToCloseOutputFiles (FileBlock const &fb)=0 |
Private Attributes | |
ScheduleID const | scheduleID_ |
ModuleDescription const | md_ |
ActionTable const & | actions_ |
ActivityRegistry const & | actReg_ |
std::atomic< int > | state_ {Ready} |
std::exception_ptr | cached_exception_ {} |
std::atomic< bool > | workStarted_ {false} |
std::atomic< bool > | returnCode_ {false} |
hep::concurrency::WaitingTaskList | waitingTasks_ |
Friends | |
class | RunWorkerFunctor |
enum art::Worker::State |
Enumerator | |
---|---|
Ready | |
Pass | |
Fail | |
Working | |
ExceptionThrown |
Definition at line 54 of file Worker.h.
|
virtualdefault |
art::Worker::Worker | ( | ModuleDescription const & | md, |
WorkerParams const & | wp | ||
) |
void art::Worker::beginJob | ( | detail::SharedResources const & | resources | ) |
Definition at line 193 of file Worker.cc.
ModuleDescription const & art::Worker::description | ( | ) | const |
bool art::Worker::doWork | ( | Transition | trans, |
Principal & | principal, | ||
ModuleContext const & | mc | ||
) |
Definition at line 245 of file Worker.cc.
void art::Worker::doWork_event | ( | hep::concurrency::WaitingTaskPtr | workerInPathDoneTask, |
EventPrincipal & | , | ||
ModuleContext const & | |||
) |
void art::Worker::doWork_event | ( | EventPrincipal & | p, |
ModuleContext const & | mc | ||
) |
Definition at line 363 of file Worker.cc.
void art::Worker::endJob | ( | ) |
Definition at line 203 of file Worker.cc.
|
protectedpure virtual |
Implemented in art::WorkerT< T >, and art::WorkerT< OutputModule >.
|
protectedpure virtual |
Implemented in art::WorkerT< T >, and art::WorkerT< OutputModule >.
|
protectedpure virtual |
Implemented in art::WorkerT< T >, and art::WorkerT< OutputModule >.
|
protectedpure virtual |
Implemented in art::WorkerT< T >, and art::WorkerT< OutputModule >.
|
protectedpure virtual |
Implemented in art::WorkerT< T >, and art::WorkerT< OutputModule >.
|
protectedpure virtual |
Implemented in art::WorkerT< T >, and art::WorkerT< OutputModule >.
|
protectedpure virtual |
Implemented in art::WorkerT< T >, and art::WorkerT< OutputModule >.
|
privatepure virtual |
Implemented in art::WorkerT< T >, and art::WorkerT< OutputModule >.
|
privatepure virtual |
Implemented in art::WorkerT< T >, and art::WorkerT< OutputModule >.
|
privatepure virtual |
Implemented in art::WorkerT< T >, and art::WorkerT< OutputModule >.
|
privatepure virtual |
Implemented in art::WorkerT< T >, and art::WorkerT< OutputModule >.
|
protectedpure virtual |
Implemented in art::WorkerT< T >, and art::WorkerT< OutputModule >.
string const & art::Worker::label | ( | ) | const |
Definition at line 124 of file Worker.cc.
void art::Worker::reset | ( | ) |
Definition at line 146 of file Worker.cc.
void art::Worker::respondToCloseInputFile | ( | FileBlock const & | fb | ) |
Definition at line 221 of file Worker.cc.
void art::Worker::respondToCloseOutputFiles | ( | FileBlock const & | fb | ) |
Definition at line 237 of file Worker.cc.
void art::Worker::respondToOpenInputFile | ( | FileBlock const & | fb | ) |
Definition at line 213 of file Worker.cc.
void art::Worker::respondToOpenOutputFiles | ( | FileBlock const & | fb | ) |
Definition at line 229 of file Worker.cc.
void art::Worker::runWorker | ( | EventPrincipal & | p, |
ModuleContext const & | mc | ||
) |
Definition at line 462 of file Worker.cc.
|
inline |
SerialTaskQueueChain * art::Worker::serialTaskQueueChain | ( | ) | const |
|
protectedpure virtual |
Implemented in art::WorkerT< T >, and art::WorkerT< OutputModule >.
|
private |
|
private |
|
private |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
private |
|
private |
|
private |
|
private |