LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
art::Schedule Class Reference

#include "Schedule.h"

Public Member Functions

 Schedule (ScheduleID sid, PathManager &pm, ActionTable const &actions, ActivityRegistry const &aReg, UpdateOutputCallbacks &outputCallbacks, 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
 
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_
 
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,
GlobalTaskGroup task_group 
)

Definition at line 18 of file Schedule.cc.

References actions_, epExec_, TDEBUG_FUNC_SI, and tpsExec_.

24  : context_{scheduleID}
25  , actions_{actions}
26  , epExec_{scheduleID, pm, actions, outputCallbacks, task_group}
27  , tpsExec_{scheduleID, pm, actions, actReg, task_group}
28  {
29  TDEBUG_FUNC_SI(5, scheduleID) << hex << this << dec;
30  }
EndPathExecutor epExec_
Definition: Schedule.h:196
ScheduleContext const context_
Definition: Schedule.h:191
TriggerPathsExecutor tpsExec_
Definition: Schedule.h:197
#define TDEBUG_FUNC_SI(LEVEL, SI)
ActionTable const & actions_
Definition: Schedule.h:195
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 178 of file Schedule.h.

Referenced by art::EventProcessor::readAndProcessAsync().

179  {
180  assert(principal);
181  eventPrincipal_ = std::move(principal);
182  }
std::unique_ptr< EventPrincipal > eventPrincipal_
Definition: Schedule.h:198
void art::Schedule::beginJob ( detail::SharedResources const &  resources)

Definition at line 33 of file Schedule.cc.

References art::EndPathExecutor::beginJob(), art::TriggerPathsExecutor::beginJob(), epExec_, and tpsExec_.

Referenced by art::EventProcessor::beginJob().

34  {
35  tpsExec_.beginJob(resources);
36  epExec_.beginJob(resources);
37  }
EndPathExecutor epExec_
Definition: Schedule.h:196
TriggerPathsExecutor tpsExec_
Definition: Schedule.h:197
void beginJob(detail::SharedResources const &resources)
void beginJob(detail::SharedResources const &resources)
void art::Schedule::closeAllOutputFiles ( )
inline

Definition at line 85 of file Schedule.h.

Referenced by art::EventProcessor::closeAllOutputFiles().

86  {
88  }
EndPathExecutor epExec_
Definition: Schedule.h:196
void art::Schedule::closeSomeOutputFiles ( )
inline

Definition at line 97 of file Schedule.h.

Referenced by art::EventProcessor::closeSomeOutputFiles(), and art::EventProcessor::process().

98  {
100  }
EndPathExecutor epExec_
Definition: Schedule.h:196
void art::Schedule::endJob ( )

Definition at line 40 of file Schedule.cc.

References art::EndPathExecutor::endJob(), art::TriggerPathsExecutor::endJob(), epExec_, and tpsExec_.

Referenced by art::EventProcessor::endJobAllSchedules().

41  {
42  tpsExec_.endJob();
43  epExec_.endJob();
44  }
EndPathExecutor epExec_
Definition: Schedule.h:196
TriggerPathsExecutor tpsExec_
Definition: Schedule.h:197
EventPrincipal& art::Schedule::event_principal ( )
inline

Definition at line 185 of file Schedule.h.

Referenced by art::EventProcessor::finishEventAsync().

186  {
187  assert(eventPrincipal_);
188  return *eventPrincipal_;
189  }
std::unique_ptr< EventPrincipal > eventPrincipal_
Definition: Schedule.h:198
OutputFileStatus art::Schedule::fileStatus ( ) const
inline

Definition at line 124 of file Schedule.h.

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

Definition at line 112 of file Schedule.h.

Referenced by art::EventProcessor::closeInputFile().

113  {
115  }
EndPathExecutor epExec_
Definition: Schedule.h:196
void art::Schedule::openSomeOutputFiles ( FileBlock const &  fb)
inline

Definition at line 91 of file Schedule.h.

Referenced by art::EventProcessor::openSomeOutputFiles().

92  {
94  }
EndPathExecutor epExec_
Definition: Schedule.h:196
void openSomeOutputFiles(FileBlock const &fb)
TFile fb("Li6.root")
Schedule& art::Schedule::operator= ( Schedule const &  )
delete
Schedule& art::Schedule::operator= ( Schedule &&  )
delete
bool art::Schedule::outputsToClose ( ) const
inline

Definition at line 67 of file Schedule.h.

Referenced by art::EventProcessor::levelsToProcess().

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

Definition at line 61 of file Schedule.h.

Referenced by art::EventProcessor::outputsToOpen().

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

Definition at line 75 of file Schedule.cc.

References epExec_, art::TriggerPathsExecutor::process(), art::EndPathExecutor::process(), and tpsExec_.

Referenced by art::EventProcessor::beginRun(), art::EventProcessor::beginSubRun(), art::EventProcessor::endRun(), and art::EventProcessor::endSubRun().

76  {
77  tpsExec_.process(trans, principal);
78  epExec_.process(trans, principal);
79  }
EndPathExecutor epExec_
Definition: Schedule.h:196
void process(Transition, Principal &)
TriggerPathsExecutor tpsExec_
Definition: Schedule.h:197
void process(Transition, Principal &)
void art::Schedule::process_event_modifiers ( hep::concurrency::WaitingTaskPtr  endPathTask)

Definition at line 82 of file Schedule.cc.

References eventPrincipal_, art::TriggerPathsExecutor::process_event(), and tpsExec_.

Referenced by art::EventProcessor::processEventAsync().

83  {
84  tpsExec_.process_event(endPathTask, *eventPrincipal_);
85  }
std::unique_ptr< EventPrincipal > eventPrincipal_
Definition: Schedule.h:198
TriggerPathsExecutor tpsExec_
Definition: Schedule.h:197
void process_event(hep::concurrency::WaitingTaskPtr endPathTask, EventPrincipal &)
void art::Schedule::process_event_observers ( hep::concurrency::WaitingTaskPtr  finalizeEventTask)

Definition at line 88 of file Schedule.cc.

References epExec_, eventPrincipal_, and art::EndPathExecutor::process_event().

89  {
90  epExec_.process_event(finalizeEventTask, *eventPrincipal_);
91  }
EndPathExecutor epExec_
Definition: Schedule.h:196
std::unique_ptr< EventPrincipal > eventPrincipal_
Definition: Schedule.h:198
void process_event(hep::concurrency::WaitingTaskPtr finalizeEventTask, EventPrincipal &)
void art::Schedule::respondToCloseInputFile ( FileBlock const &  fb)

Definition at line 54 of file Schedule.cc.

References epExec_, art::EndPathExecutor::respondToCloseInputFile(), art::TriggerPathsExecutor::respondToCloseInputFile(), and tpsExec_.

Referenced by art::EventProcessor::respondToCloseInputFile().

55  {
58  }
EndPathExecutor epExec_
Definition: Schedule.h:196
TriggerPathsExecutor tpsExec_
Definition: Schedule.h:197
TFile fb("Li6.root")
void respondToCloseInputFile(FileBlock const &)
void respondToCloseInputFile(FileBlock const &fb)
void art::Schedule::respondToCloseOutputFiles ( FileBlock const &  fb)

Definition at line 68 of file Schedule.cc.

References epExec_, art::EndPathExecutor::respondToCloseOutputFiles(), art::TriggerPathsExecutor::respondToCloseOutputFiles(), and tpsExec_.

Referenced by art::EventProcessor::respondToCloseOutputFiles().

69  {
72  }
EndPathExecutor epExec_
Definition: Schedule.h:196
TriggerPathsExecutor tpsExec_
Definition: Schedule.h:197
void respondToCloseOutputFiles(FileBlock const &fb)
TFile fb("Li6.root")
void respondToCloseOutputFiles(FileBlock const &)
void art::Schedule::respondToOpenInputFile ( FileBlock const &  fb)

Definition at line 47 of file Schedule.cc.

References epExec_, art::EndPathExecutor::respondToOpenInputFile(), art::TriggerPathsExecutor::respondToOpenInputFile(), and tpsExec_.

Referenced by art::EventProcessor::respondToOpenInputFile().

48  {
51  }
EndPathExecutor epExec_
Definition: Schedule.h:196
void respondToOpenInputFile(FileBlock const &fb)
TriggerPathsExecutor tpsExec_
Definition: Schedule.h:197
void respondToOpenInputFile(FileBlock const &)
TFile fb("Li6.root")
void art::Schedule::respondToOpenOutputFiles ( FileBlock const &  fb)

Definition at line 61 of file Schedule.cc.

References epExec_, art::EndPathExecutor::respondToOpenOutputFiles(), art::TriggerPathsExecutor::respondToOpenOutputFiles(), and tpsExec_.

Referenced by art::EventProcessor::respondToOpenOutputFiles().

62  {
65  }
EndPathExecutor epExec_
Definition: Schedule.h:196
void respondToOpenOutputFiles(FileBlock const &)
void respondToOpenOutputFiles(FileBlock const &fb)
TriggerPathsExecutor tpsExec_
Definition: Schedule.h:197
TFile fb("Li6.root")
RangeSetHandler const& art::Schedule::runRangeSetHandler ( )
inline

Definition at line 149 of file Schedule.h.

Referenced by art::EventProcessor::setRunAuxiliaryRangeSetID(), and art::EventProcessor::setSubRunAuxiliaryRangeSetID().

150  {
151  return *epExec_.runRangeSetHandler_.get();
152  }
EndPathExecutor epExec_
Definition: Schedule.h:196
std::unique_ptr< RangeSetHandler > runRangeSetHandler_
void art::Schedule::seedRunRangeSet ( RangeSetHandler const &  rsh)
inline

Definition at line 131 of file Schedule.h.

Referenced by art::EventProcessor::readRun(), and art::EventProcessor::setSubRunAuxiliaryRangeSetID().

132  {
134  }
EndPathExecutor epExec_
Definition: Schedule.h:196
void seedRunRangeSet(RangeSetHandler const &)
void art::Schedule::seedSubRunRangeSet ( RangeSetHandler const &  rsh)
inline

Definition at line 156 of file Schedule.h.

Referenced by art::EventProcessor::readSubRun(), and art::EventProcessor::setSubRunAuxiliaryRangeSetID().

157  {
159  }
EndPathExecutor epExec_
Definition: Schedule.h:196
void seedSubRunRangeSet(RangeSetHandler const &)
void art::Schedule::setOutputFileStatus ( OutputFileStatus const  ofs)
inline

Definition at line 118 of file Schedule.h.

Referenced by art::EventProcessor::setOutputFileStatus().

119  {
121  }
EndPathExecutor epExec_
Definition: Schedule.h:196
void setOutputFileStatus(OutputFileStatus)
void art::Schedule::setRunAuxiliaryRangeSetID ( RangeSet const &  rs)
inline

Definition at line 137 of file Schedule.h.

Referenced by art::EventProcessor::setRunAuxiliaryRangeSetID().

138  {
140  }
EndPathExecutor epExec_
Definition: Schedule.h:196
void setRunAuxiliaryRangeSetID(RangeSet const &rs)
void art::Schedule::setSubRunAuxiliaryRangeSetID ( RangeSet const &  rs)
inline

Definition at line 161 of file Schedule.h.

Referenced by art::EventProcessor::setSubRunAuxiliaryRangeSetID().

162  {
164  }
EndPathExecutor epExec_
Definition: Schedule.h:196
void setSubRunAuxiliaryRangeSetID(RangeSet const &rs)
bool art::Schedule::someOutputsOpen ( ) const
inline

Definition at line 79 of file Schedule.h.

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

Definition at line 172 of file Schedule.h.

Referenced by art::EventProcessor::setSubRunAuxiliaryRangeSetID().

173  {
174  return *epExec_.subRunRangeSetHandler_.get();
175  }
EndPathExecutor epExec_
Definition: Schedule.h:196
std::unique_ptr< RangeSetHandler > subRunRangeSetHandler_
void art::Schedule::writeEvent ( )
inline

Definition at line 103 of file Schedule.h.

Referenced by art::EventProcessor::finishEventAsync().

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

Definition at line 143 of file Schedule.h.

Referenced by art::EventProcessor::writeRun().

144  {
145  epExec_.writeRun(rp);
146  }
EndPathExecutor epExec_
Definition: Schedule.h:196
void writeRun(RunPrincipal &rp)
void art::Schedule::writeSubRun ( SubRunPrincipal srp)
inline

Definition at line 166 of file Schedule.h.

Referenced by art::EventProcessor::writeSubRun().

167  {
168  epExec_.writeSubRun(srp);
169  }
EndPathExecutor epExec_
Definition: Schedule.h:196
void writeSubRun(SubRunPrincipal &srp)

Member Data Documentation

ActionTable const& art::Schedule::actions_
private

Definition at line 195 of file Schedule.h.

Referenced by Schedule().

ScheduleContext const art::Schedule::context_
private

Definition at line 191 of file Schedule.h.

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

Definition at line 198 of file Schedule.h.

Referenced by process_event_modifiers(), and process_event_observers().


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