1 #ifndef FWCore_Framework_Schedule_h
2 #define FWCore_Framework_Schedule_h
83 #include "boost/shared_ptr.hpp"
96 class TriggerNamesService;
99 class BranchIDListHelper;
101 class ExceptionCollector;
102 class OutputModuleCommunicator;
103 class ProcessContext;
104 class ProductRegistry;
105 class PreallocationConfiguration;
106 class StreamSchedule;
107 class GlobalSchedule;
108 struct TriggerTimingReport;
109 class ModuleRegistry;
110 class ThinnedAssociationsHelper;
111 class TriggerResultInserter;
128 std::shared_ptr<ActivityRegistry>
areg,
134 template <
typename T>
138 bool cleaningUpAfterException =
false);
140 template <
typename T>
143 bool cleaningUpAfterException =
false);
145 template <
typename T>
149 bool cleaningUpAfterException =
false);
193 void availablePaths(std::vector<std::string>& oLabelsToFill)
const;
198 void triggerPaths(std::vector<std::string>& oLabelsToFill)
const;
201 void endPaths(std::vector<std::string>& oLabelsToFill)
const;
205 std::vector<std::string>& oLabelsToFill)
const;
210 std::vector<ModuleDescription const*>& descriptions,
211 unsigned int hint)
const;
216 std::vector<ModuleDescription const*>& descriptions,
217 unsigned int hint)
const;
220 std::vector<std::pair<unsigned int, unsigned int> >& moduleIDToIndex,
221 std::vector<std::vector<ModuleDescription const*> >& modulesWhoseProductsAreConsumedBy,
290 template <
typename T>
292 typename T::MyPrincipal& ep,
294 bool cleaningUpAfterException) {
299 template <
typename T>
301 typename T::MyPrincipal& ep,
303 bool cleaningUpAfterException) {
305 streamSchedules_[iStreamID]->processOneStream<
T>(ep,es,cleaningUpAfterException);
307 template <
typename T>
311 bool cleaningUpAfterException) {
void checkForCorrectness() const
Check that the schedule is actually runable.
std::vector< BranchIDList > BranchIDLists
void fillModuleAndConsumesInfo(std::vector< ModuleDescription const * > &allModuleDescriptions, std::vector< std::pair< unsigned int, unsigned int > > &moduleIDToIndex, std::vector< std::vector< ModuleDescription const * > > &modulesWhoseProductsAreConsumedBy, ProductRegistry const &preg) const
AllWorkers const & allWorkers() const
returns the collection of pointers to workers
void availablePaths(std::vector< std::string > &oLabelsToFill) const
adds to oLabelsToFill the labels for all paths in the process
bool endPathsEnabled() const
void respondToCloseInputFile(FileBlock const &fb)
std::vector< Worker * > AllWorkers
void writeRun(RunPrincipal const &rp, ProcessContext const *)
void endStream(unsigned int)
void processOneEvent(unsigned int iStreamID, typename T::MyPrincipal &principal, EventSetup const &eventSetup, bool cleaningUpAfterException=false)
void writeLumi(LuminosityBlockPrincipal const &lbp, ProcessContext const *)
std::shared_ptr< Worker > WorkerPtr
void enableEndPaths(bool active)
std::shared_ptr< ModuleRegistry > moduleRegistry_
void moduleDescriptionsInEndPath(std::string const &iEndPathLabel, std::vector< ModuleDescription const * > &descriptions, unsigned int hint) const
int totalEventsFailed() const
bool changeModule(std::string const &iLabel, ParameterSet const &iPSet, const ProductRegistry &iRegistry)
std::shared_ptr< TriggerResultInserter > resultsInserter_
int totalEventsPassed() const
void triggerPaths(std::vector< std::string > &oLabelsToFill) const
void limitOutput(ParameterSet const &proc_pset, BranchIDLists const &branchIDLists)
Schedule(ParameterSet &proc_pset, service::TriggerNamesService &tns, ProductRegistry &pregistry, BranchIDListHelper &branchIDListHelper, ThinnedAssociationsHelper &thinnedAssociationsHelper, ExceptionToActionTable const &actions, std::shared_ptr< ActivityRegistry > areg, std::shared_ptr< ProcessConfiguration > processConfiguration, const ParameterSet *subProcPSet, PreallocationConfiguration const &config, ProcessContext const *processContext)
void clearCounters()
Clear all the counters in the trigger report.
std::vector< std::shared_ptr< StreamSchedule > > streamSchedules_
std::vector< std::string > vstring
std::vector< std::shared_ptr< OutputModuleCommunicator > > AllOutputModuleCommunicators
bool terminate() const
Return whether each output module has reached its maximum count.
void respondToOpenInputFile(FileBlock const &fb)
std::vector< Worker * > Workers
void getTriggerReport(TriggerReport &rep) const
void processOneGlobal(typename T::MyPrincipal &principal, EventSetup const &eventSetup, bool cleaningUpAfterException=false)
PreallocationConfiguration preallocConfig_
volatile bool endpathsAreActive_
std::unique_ptr< SystemTimeKeeper > summaryTimeKeeper_
AllOutputModuleCommunicators all_output_communicators_
void modulesInPath(std::string const &iPathLabel, std::vector< std::string > &oLabelsToFill) const
adds to oLabelsToFill in execution order the labels of all modules in path iPathLabel ...
void beginStream(unsigned int)
void postForkReacquireResources(unsigned int iChildIndex, unsigned int iNumberOfChildren)
std::vector< ModuleDescription const * > getAllModuleDescriptions() const
std::unique_ptr< GlobalSchedule > globalSchedule_
void processOneStream(unsigned int iStreamID, typename T::MyPrincipal &principal, EventSetup const &eventSetup, bool cleaningUpAfterException=false)
void beginJob(ProductRegistry const &)
void openNewOutputFilesIfNeeded()
void preForkReleaseResources()
void openOutputFiles(FileBlock &fb)
void endJob(ExceptionCollector &collector)
void getTriggerTimingReport(TriggerTimingReport &rep) const
bool shouldWeCloseOutput() const
void endPaths(std::vector< std::string > &oLabelsToFill) const
adds to oLabelsToFill the labels for all end paths in the process
void moduleDescriptionsInPath(std::string const &iPathLabel, std::vector< ModuleDescription const * > &descriptions, unsigned int hint) const