1 #ifndef FWCore_Framework_Schedule_h 2 #define FWCore_Framework_Schedule_h 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 SubProcessParentageHelper;
112 class TriggerResultInserter;
113 class PathStatusInserter;
114 class EndPathStatusInserter;
133 std::shared_ptr<ActivityRegistry> areg,
134 std::shared_ptr<ProcessConfiguration> processConfiguration,
135 bool hasSubprocesses,
140 unsigned int iStreamID,
144 template <
typename T>
145 void processOneGlobal(
typename T::MyPrincipal&
principal,
147 bool cleaningUpAfterException =
false);
149 template <
typename T>
153 bool cleaningUpAfterException =
false);
155 template <
typename T>
156 void processOneStream(
unsigned int iStreamID,
159 bool cleaningUpAfterException =
false);
161 template <
typename T>
163 unsigned int iStreamID,
166 bool cleaningUpAfterException =
false);
171 void beginStream(
unsigned int);
172 void endStream(
unsigned int);
181 void closeOutputFiles();
193 bool shouldWeCloseOutput()
const;
201 std::vector<ModuleDescription const*> getAllModuleDescriptions()
const;
204 void availablePaths(std::vector<std::string>& oLabelsToFill)
const;
209 void triggerPaths(std::vector<std::string>& oLabelsToFill)
const;
212 void endPaths(std::vector<std::string>& oLabelsToFill)
const;
216 std::vector<std::string>& oLabelsToFill)
const;
220 void moduleDescriptionsInPath(
std::string const& iPathLabel,
221 std::vector<ModuleDescription const*>& descriptions,
222 unsigned int hint)
const;
226 void moduleDescriptionsInEndPath(
std::string const& iEndPathLabel,
227 std::vector<ModuleDescription const*>& descriptions,
228 unsigned int hint)
const;
230 void fillModuleAndConsumesInfo(std::vector<ModuleDescription const*>& allModuleDescriptions,
231 std::vector<std::pair<unsigned int, unsigned int> >& moduleIDToIndex,
232 std::vector<std::vector<ModuleDescription const*> >& modulesWhoseProductsAreConsumedBy,
238 int totalEvents()
const;
242 int totalEventsPassed()
const;
246 int totalEventsFailed()
const;
250 void enableEndPaths(
bool active);
254 bool endPathsEnabled()
const;
265 bool terminate()
const;
268 void clearCounters();
275 AllWorkers
const& allWorkers()
const;
312 template <
typename T>
314 typename T::MyPrincipal& ep,
316 bool cleaningUpAfterException) {
317 assert(iStreamID<streamSchedules_.size());
318 streamSchedules_[iStreamID]->processOneStream<
T>(ep,es,cleaningUpAfterException);
321 template <
typename T>
323 unsigned int iStreamID,
324 typename T::MyPrincipal& ep,
326 bool cleaningUpAfterException) {
327 assert(iStreamID<streamSchedules_.size());
328 streamSchedules_[iStreamID]->processOneStreamAsync<
T>(
std::move(iTaskHolder),ep,es,cleaningUpAfterException);
331 template <
typename T>
335 bool cleaningUpAfterException) {
336 globalSchedule_->processOneGlobal<
T>(ep,es,cleaningUpAfterException);
339 template <
typename T>
342 typename T::MyPrincipal& ep,
344 bool cleaningUpAfterException) {
345 globalSchedule_->processOneGlobalAsync<
T>(iTaskHolder,ep,es,cleaningUpAfterException);
void processOneGlobalAsync(WaitingTaskHolder iTask, typename T::MyPrincipal &principal, EventSetup const &eventSetup, bool cleaningUpAfterException=false)
std::vector< BranchIDList > BranchIDLists
roAction_t actions[nactions]
std::shared_ptr< ModuleRegistry const > moduleRegistry() const
std::vector< Worker * > AllWorkers
std::vector< std::string > const * pathNames_
edm::propagate_const< std::unique_ptr< SystemTimeKeeper > > summaryTimeKeeper_
edm::propagate_const< std::unique_ptr< GlobalSchedule > > globalSchedule_
std::shared_ptr< TriggerResultInserter > & resultsInserter()
std::vector< edm::propagate_const< std::shared_ptr< PathStatusInserter > > > pathStatusInserters_
edm::propagate_const< std::shared_ptr< TriggerResultInserter > > resultsInserter_
std::vector< std::string > vstring
std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
edm::propagate_const< std::shared_ptr< ModuleRegistry > > moduleRegistry_
std::vector< Worker * > Workers
void processOneGlobal(typename T::MyPrincipal &principal, EventSetup const &eventSetup, bool cleaningUpAfterException=false)
PreallocationConfiguration preallocConfig_
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
volatile bool endpathsAreActive_
std::shared_ptr< TriggerResultInserter const > resultsInserter() const
std::vector< edm::propagate_const< std::shared_ptr< EndPathStatusInserter > > > endPathStatusInserters_
AllOutputModuleCommunicators all_output_communicators_
std::vector< edm::propagate_const< std::shared_ptr< OutputModuleCommunicator > > > AllOutputModuleCommunicators
std::vector< std::string > const * endPathNames_
void processOneStream(unsigned int iStreamID, typename T::MyPrincipal &principal, EventSetup const &eventSetup, bool cleaningUpAfterException=false)
std::shared_ptr< ModuleRegistry > & moduleRegistry()
void processOneStreamAsync(WaitingTaskHolder iTask, unsigned int iStreamID, typename T::MyPrincipal &principal, EventSetup const &eventSetup, bool cleaningUpAfterException=false)
static std::string const triggerPaths