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 SharedResources;
57 void respondToCloseInputFile(
FileBlock const& fb);
58 void respondToOpenOutputFiles(
FileBlock const& fb);
59 void respondToCloseOutputFiles(
FileBlock const& fb);
62 void doWork_event(hep::concurrency::WaitingTaskPtr workerInPathDoneTask,
75 bool returnCode()
const;
78 hep::concurrency::SerialTaskQueueChain* serialTaskQueueChain()
const;
86 std::size_t timesVisited()
const;
87 std::size_t timesRun()
const;
88 std::size_t timesPassed()
const;
89 std::size_t timesFailed()
const;
90 std::size_t timesExcept()
const;
93 bool isUnique()
const;
96 std::string
const& label()
const;
98 std::atomic<std::size_t> counts_visited_{};
99 std::atomic<std::size_t> counts_run_{};
100 std::atomic<std::size_t> counts_passed_{};
101 std::atomic<std::size_t> counts_failed_{};
102 std::atomic<std::size_t> counts_thrown_{};
105 virtual hep::concurrency::SerialTaskQueueChain* doSerialTaskQueueChain()
108 virtual void doEndJob() = 0;
115 virtual void doRespondToOpenInputFile(
FileBlock const& fb) = 0;
116 virtual void doRespondToCloseInputFile(
FileBlock const& fb) = 0;
117 virtual void doRespondToOpenOutputFiles(
FileBlock const& fb) = 0;
118 virtual void doRespondToCloseOutputFiles(
FileBlock const& fb) = 0;
134 std::exception_ptr cached_exception_{};
136 std::atomic<bool> workStarted_{
false};
137 std::atomic<bool> returnCode_{
false};
ActionTable const & actions_
ScheduleID scheduleID() const
ActivityRegistry const & actReg_
ModuleDescription const md_
ScheduleID const scheduleID_
hep::concurrency::WaitingTaskList waitingTasks_