Public Member Functions | Private Attributes | List of all members
art::Schedule Class Reference

#include <Schedule.h>

Public Member Functions

 Schedule (ScheduleID sid, PathManager &pm, ActionTable const &actions, ActivityRegistry const &aReg, UpdateOutputCallbacks &outputCallbacks, std::unique_ptr< Worker > triggerResultsInserter, GlobalTaskGroup &task_group)
 
 Schedule (Schedule const &)=delete
 
 Schedule (Schedule &&)=delete
 
Scheduleoperator= (Schedule const &)=delete
 
Scheduleoperator= (Schedule &&)=delete
 
void process (Transition, Principal &)
 
void process_event_modifiers (hep::concurrency::WaitingTaskPtr endPathTask)
 
void process_event_observers (hep::concurrency::WaitingTaskPtr finalizeEventTask)
 
void beginJob (detail::SharedResources const &resources)
 
void endJob ()
 
void respondToOpenInputFile (FileBlock const &)
 
void respondToCloseInputFile (FileBlock const &)
 
void respondToOpenOutputFiles (FileBlock const &)
 
void respondToCloseOutputFiles (FileBlock const &)
 
bool outputsToOpen () const
 
bool outputsToClose () const
 
void recordOutputClosureRequests (Granularity const granularity)
 
bool someOutputsOpen () const
 
void closeAllOutputFiles ()
 
void openSomeOutputFiles (FileBlock const &fb)
 
void closeSomeOutputFiles ()
 
void writeEvent ()
 
void incrementInputFileNumber ()
 
void setOutputFileStatus (OutputFileStatus const ofs)
 
OutputFileStatus fileStatus () const
 
bool allAtLimit () const
 
void seedRunRangeSet (RangeSetHandler const &rsh)
 
void setRunAuxiliaryRangeSetID (RangeSet const &rs)
 
void writeRun (RunPrincipal &rp)
 
RangeSetHandler const & runRangeSetHandler ()
 
void seedSubRunRangeSet (RangeSetHandler const &rsh)
 
void setSubRunAuxiliaryRangeSetID (RangeSet const &rs)
 
void writeSubRun (SubRunPrincipal &srp)
 
RangeSetHandler const & subRunRangeSetHandler ()
 
void accept_principal (std::unique_ptr< EventPrincipal > principal)
 
EventPrincipalevent_principal ()
 

Private Attributes

ScheduleContext const context_
 
ActionTable const & actions_
 
ActivityRegistry const & actReg_
 
EndPathExecutor epExec_
 
TriggerPathsExecutor tpsExec_
 
std::unique_ptr< EventPrincipaleventPrincipal_ {nullptr}
 

Detailed Description

Definition at line 32 of file Schedule.h.

Constructor & Destructor Documentation

art::Schedule::Schedule ( ScheduleID  sid,
PathManager pm,
ActionTable const &  actions,
ActivityRegistry const &  aReg,
UpdateOutputCallbacks outputCallbacks,
std::unique_ptr< Worker triggerResultsInserter,
GlobalTaskGroup task_group 
)

Definition at line 21 of file Schedule.cc.

28  : context_{scheduleID}
29  , actions_{actions}
30  , actReg_{actReg}
31  , epExec_{scheduleID, pm, actions, actReg_, outputCallbacks, task_group}
32  , tpsExec_{scheduleID,
33  pm,
34  actions,
35  move(triggerResultsInserter),
36  task_group}
37  {
38  TDEBUG_FUNC_SI(5, scheduleID) << hex << this << dec;
39  }
EndPathExecutor epExec_
Definition: Schedule.h:204
ActivityRegistry const & actReg_
Definition: Schedule.h:203
QTextStream & hex(QTextStream &s)
ScheduleContext const context_
Definition: Schedule.h:198
TriggerPathsExecutor tpsExec_
Definition: Schedule.h:205
def move(depos, offset)
Definition: depos.py:107
#define TDEBUG_FUNC_SI(LEVEL, SI)
QTextStream & dec(QTextStream &s)
ActionTable const & actions_
Definition: Schedule.h:202
Namespace containing all the test actions.
art::Schedule::Schedule ( Schedule const &  )
delete
art::Schedule::Schedule ( Schedule &&  )
delete

Member Function Documentation

void art::Schedule::accept_principal ( std::unique_ptr< EventPrincipal principal)
inline

Definition at line 185 of file Schedule.h.

186  {
187  assert(principal);
188  eventPrincipal_ = std::move(principal);
189  }
std::unique_ptr< EventPrincipal > eventPrincipal_
Definition: Schedule.h:206
def move(depos, offset)
Definition: depos.py:107
bool art::Schedule::allAtLimit ( ) const
inline

Definition at line 131 of file Schedule.h.

132  {
133  return epExec_.allAtLimit();
134  }
EndPathExecutor epExec_
Definition: Schedule.h:204
bool allAtLimit() const
void art::Schedule::beginJob ( detail::SharedResources const &  resources)

Definition at line 42 of file Schedule.cc.

43  {
44  tpsExec_.beginJob(resources);
45  epExec_.beginJob(resources);
46  }
EndPathExecutor epExec_
Definition: Schedule.h:204
TriggerPathsExecutor tpsExec_
Definition: Schedule.h:205
void beginJob(detail::SharedResources const &resources)
void beginJob(detail::SharedResources const &resources)
void art::Schedule::closeAllOutputFiles ( )
inline

Definition at line 86 of file Schedule.h.

87  {
89  }
EndPathExecutor epExec_
Definition: Schedule.h:204
void art::Schedule::closeSomeOutputFiles ( )
inline

Definition at line 98 of file Schedule.h.

99  {
101  }
EndPathExecutor epExec_
Definition: Schedule.h:204
void art::Schedule::endJob ( )

Definition at line 49 of file Schedule.cc.

50  {
51  tpsExec_.endJob();
52  epExec_.endJob();
53  }
EndPathExecutor epExec_
Definition: Schedule.h:204
TriggerPathsExecutor tpsExec_
Definition: Schedule.h:205
EventPrincipal& art::Schedule::event_principal ( )
inline

Definition at line 192 of file Schedule.h.

193  {
194  assert(eventPrincipal_);
195  return *eventPrincipal_;
196  }
std::unique_ptr< EventPrincipal > eventPrincipal_
Definition: Schedule.h:206
OutputFileStatus art::Schedule::fileStatus ( ) const
inline

Definition at line 125 of file Schedule.h.

126  {
127  return epExec_.fileStatus_.load();
128  }
EndPathExecutor epExec_
Definition: Schedule.h:204
std::atomic< OutputFileStatus > fileStatus_
void art::Schedule::incrementInputFileNumber ( )
inline

Definition at line 113 of file Schedule.h.

114  {
116  }
EndPathExecutor epExec_
Definition: Schedule.h:204
void art::Schedule::openSomeOutputFiles ( FileBlock const &  fb)
inline

Definition at line 92 of file Schedule.h.

93  {
95  }
EndPathExecutor epExec_
Definition: Schedule.h:204
void openSomeOutputFiles(FileBlock const &fb)
Schedule& art::Schedule::operator= ( Schedule const &  )
delete
Schedule& art::Schedule::operator= ( Schedule &&  )
delete
bool art::Schedule::outputsToClose ( ) const
inline

Definition at line 68 of file Schedule.h.

69  {
70  return epExec_.outputsToClose();
71  }
bool outputsToClose() const
EndPathExecutor epExec_
Definition: Schedule.h:204
bool art::Schedule::outputsToOpen ( ) const
inline

Definition at line 62 of file Schedule.h.

63  {
64  return epExec_.outputsToOpen();
65  }
EndPathExecutor epExec_
Definition: Schedule.h:204
bool outputsToOpen() const
void art::Schedule::process ( Transition  trans,
Principal principal 
)

Definition at line 84 of file Schedule.cc.

85  {
86  tpsExec_.process(trans, principal);
87  epExec_.process(trans, principal);
88  }
EndPathExecutor epExec_
Definition: Schedule.h:204
void process(Transition, Principal &)
TriggerPathsExecutor tpsExec_
Definition: Schedule.h:205
void process(Transition, Principal &)
void art::Schedule::process_event_modifiers ( hep::concurrency::WaitingTaskPtr  endPathTask)

Definition at line 91 of file Schedule.cc.

92  {
93  // We get here as part of the readAndProcessEvent task.
96  tpsExec_.process_event(endPathTask, *eventPrincipal_);
97  }
ActivityRegistry const & actReg_
Definition: Schedule.h:203
ScheduleContext const context_
Definition: Schedule.h:198
std::unique_ptr< EventPrincipal > eventPrincipal_
Definition: Schedule.h:206
TriggerPathsExecutor tpsExec_
Definition: Schedule.h:205
GlobalSignal< detail::SignalResponseType::FIFO, void(Event const &, ScheduleContext)> sPreProcessEvent
void process_event(hep::concurrency::WaitingTaskPtr endPathTask, EventPrincipal &)
static ModuleContext invalid()
Definition: ModuleContext.h:22
void art::Schedule::process_event_observers ( hep::concurrency::WaitingTaskPtr  finalizeEventTask)

Definition at line 100 of file Schedule.cc.

101  {
102  epExec_.process_event(finalizeEventTask, *eventPrincipal_);
103  }
EndPathExecutor epExec_
Definition: Schedule.h:204
std::unique_ptr< EventPrincipal > eventPrincipal_
Definition: Schedule.h:206
void process_event(hep::concurrency::WaitingTaskPtr finalizeEventTask, EventPrincipal &)
void art::Schedule::recordOutputClosureRequests ( Granularity const  granularity)
inline

Definition at line 74 of file Schedule.h.

75  {
76  return epExec_.recordOutputClosureRequests(granularity);
77  }
EndPathExecutor epExec_
Definition: Schedule.h:204
void recordOutputClosureRequests(Granularity)
void art::Schedule::respondToCloseInputFile ( FileBlock const &  fb)

Definition at line 63 of file Schedule.cc.

64  {
67  }
EndPathExecutor epExec_
Definition: Schedule.h:204
TriggerPathsExecutor tpsExec_
Definition: Schedule.h:205
void respondToCloseInputFile(FileBlock const &)
void respondToCloseInputFile(FileBlock const &fb)
void art::Schedule::respondToCloseOutputFiles ( FileBlock const &  fb)

Definition at line 77 of file Schedule.cc.

78  {
81  }
EndPathExecutor epExec_
Definition: Schedule.h:204
TriggerPathsExecutor tpsExec_
Definition: Schedule.h:205
void respondToCloseOutputFiles(FileBlock const &fb)
void respondToCloseOutputFiles(FileBlock const &)
void art::Schedule::respondToOpenInputFile ( FileBlock const &  fb)

Definition at line 56 of file Schedule.cc.

57  {
60  }
EndPathExecutor epExec_
Definition: Schedule.h:204
void respondToOpenInputFile(FileBlock const &fb)
TriggerPathsExecutor tpsExec_
Definition: Schedule.h:205
void respondToOpenInputFile(FileBlock const &)
void art::Schedule::respondToOpenOutputFiles ( FileBlock const &  fb)

Definition at line 70 of file Schedule.cc.

71  {
74  }
EndPathExecutor epExec_
Definition: Schedule.h:204
void respondToOpenOutputFiles(FileBlock const &)
void respondToOpenOutputFiles(FileBlock const &fb)
TriggerPathsExecutor tpsExec_
Definition: Schedule.h:205
RangeSetHandler const& art::Schedule::runRangeSetHandler ( )
inline

Definition at line 156 of file Schedule.h.

157  {
158  return *epExec_.runRangeSetHandler_.get();
159  }
EndPathExecutor epExec_
Definition: Schedule.h:204
std::unique_ptr< RangeSetHandler > runRangeSetHandler_
void art::Schedule::seedRunRangeSet ( RangeSetHandler const &  rsh)
inline

Definition at line 138 of file Schedule.h.

139  {
141  }
EndPathExecutor epExec_
Definition: Schedule.h:204
void seedRunRangeSet(RangeSetHandler const &)
void art::Schedule::seedSubRunRangeSet ( RangeSetHandler const &  rsh)
inline

Definition at line 163 of file Schedule.h.

164  {
166  }
EndPathExecutor epExec_
Definition: Schedule.h:204
void seedSubRunRangeSet(RangeSetHandler const &)
void art::Schedule::setOutputFileStatus ( OutputFileStatus const  ofs)
inline

Definition at line 119 of file Schedule.h.

120  {
122  }
EndPathExecutor epExec_
Definition: Schedule.h:204
void setOutputFileStatus(OutputFileStatus)
void art::Schedule::setRunAuxiliaryRangeSetID ( RangeSet const &  rs)
inline

Definition at line 144 of file Schedule.h.

145  {
147  }
EndPathExecutor epExec_
Definition: Schedule.h:204
void setRunAuxiliaryRangeSetID(RangeSet const &rs)
void art::Schedule::setSubRunAuxiliaryRangeSetID ( RangeSet const &  rs)
inline

Definition at line 168 of file Schedule.h.

169  {
171  }
EndPathExecutor epExec_
Definition: Schedule.h:204
void setSubRunAuxiliaryRangeSetID(RangeSet const &rs)
bool art::Schedule::someOutputsOpen ( ) const
inline

Definition at line 80 of file Schedule.h.

81  {
82  return epExec_.someOutputsOpen();
83  }
EndPathExecutor epExec_
Definition: Schedule.h:204
bool someOutputsOpen() const
RangeSetHandler const& art::Schedule::subRunRangeSetHandler ( )
inline

Definition at line 179 of file Schedule.h.

180  {
181  return *epExec_.subRunRangeSetHandler_.get();
182  }
EndPathExecutor epExec_
Definition: Schedule.h:204
std::unique_ptr< RangeSetHandler > subRunRangeSetHandler_
void art::Schedule::writeEvent ( )
inline

Definition at line 104 of file Schedule.h.

105  {
106  assert(eventPrincipal_);
108  // Delete principal
109  eventPrincipal_.reset();
110  }
EndPathExecutor epExec_
Definition: Schedule.h:204
std::unique_ptr< EventPrincipal > eventPrincipal_
Definition: Schedule.h:206
void writeEvent(EventPrincipal &)
void art::Schedule::writeRun ( RunPrincipal rp)
inline

Definition at line 150 of file Schedule.h.

151  {
152  epExec_.writeRun(rp);
153  }
EndPathExecutor epExec_
Definition: Schedule.h:204
void writeRun(RunPrincipal &rp)
void art::Schedule::writeSubRun ( SubRunPrincipal srp)
inline

Definition at line 173 of file Schedule.h.

174  {
175  epExec_.writeSubRun(srp);
176  }
EndPathExecutor epExec_
Definition: Schedule.h:204
void writeSubRun(SubRunPrincipal &srp)

Member Data Documentation

ActionTable const& art::Schedule::actions_
private

Definition at line 202 of file Schedule.h.

ActivityRegistry const& art::Schedule::actReg_
private

Definition at line 203 of file Schedule.h.

ScheduleContext const art::Schedule::context_
private

Definition at line 198 of file Schedule.h.

EndPathExecutor art::Schedule::epExec_
private

Definition at line 204 of file Schedule.h.

std::unique_ptr<EventPrincipal> art::Schedule::eventPrincipal_ {nullptr}
private

Definition at line 206 of file Schedule.h.

TriggerPathsExecutor art::Schedule::tpsExec_
private

Definition at line 205 of file Schedule.h.


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