1 #ifndef art_Framework_Principal_Worker_h 2 #define art_Framework_Principal_Worker_h 28 #include "hep_concurrency/WaitingTaskList.h" 36 class SerialTaskQueueChain;
40 class ActivityRegistry;
44 class SubRunPrincipal;
47 class SharedResources;
51 friend class RunWorkerFunctor;
56 virtual ~
Worker() =
default;
61 void respondToOpenInputFile(
FileBlock const& fb);
62 void respondToCloseInputFile(
FileBlock const& fb);
63 void respondToOpenOutputFiles(
FileBlock const& fb);
64 void respondToCloseOutputFiles(
FileBlock const& fb);
67 void doWork_event(hep::concurrency::WaitingTaskPtr workerInPathDoneTask,
83 bool returnCode()
const;
85 hep::concurrency::SerialTaskQueueChain* serialTaskQueueChain()
const;
93 std::size_t timesVisited()
const;
94 std::size_t timesRun()
const;
95 std::size_t timesPassed()
const;
96 std::size_t timesFailed()
const;
97 std::size_t timesExcept()
const;
103 virtual hep::concurrency::SerialTaskQueueChain* implSerialTaskQueueChain()
106 virtual void implEndJob() = 0;
115 virtual void implRespondToOpenInputFile(
FileBlock const& fb) = 0;
116 virtual void implRespondToCloseInputFile(
FileBlock const& fb) = 0;
117 virtual void implRespondToOpenOutputFiles(
FileBlock const& fb) = 0;
118 virtual void implRespondToCloseOutputFiles(
FileBlock const& fb) = 0;
134 std::exception_ptr cached_exception_{};
136 std::atomic<bool> workStarted_{
false};
137 std::atomic<bool> returnCode_{
false};
146 std::atomic<std::size_t> counts_visited_{};
147 std::atomic<std::size_t> counts_run_{};
148 std::atomic<std::size_t> counts_passed_{};
149 std::atomic<std::size_t> counts_failed_{};
150 std::atomic<std::size_t> counts_thrown_{};
ActionTable const & actions_
QTextStream & reset(QTextStream &s)
ScheduleID scheduleID() const
ActivityRegistry const & actReg_
ModuleDescription const md_
ScheduleID const scheduleID_
hep::concurrency::WaitingTaskList waitingTasks_