1 #ifndef FWCore_Framework_Schedule_h 2 #define FWCore_Framework_Schedule_h 95 class TriggerNamesService;
98 class BranchIDListHelper;
100 class ExceptionCollector;
101 class OutputModuleCommunicator;
102 class ProcessContext;
103 class ProductRegistry;
104 class PreallocationConfiguration;
105 class StreamSchedule;
106 class GlobalSchedule;
107 struct TriggerTimingReport;
108 class ModuleRegistry;
109 class ThinnedAssociationsHelper;
110 class SubProcessParentageHelper;
111 class TriggerResultInserter;
130 std::shared_ptr<ActivityRegistry> areg,
131 std::shared_ptr<ProcessConfiguration> processConfiguration,
132 bool hasSubprocesses,
137 unsigned int iStreamID,
141 template <
typename T>
142 void processOneGlobal(
typename T::MyPrincipal&
principal,
144 bool cleaningUpAfterException =
false);
146 template <
typename T>
150 bool cleaningUpAfterException =
false);
152 template <
typename T>
153 void processOneStream(
unsigned int iStreamID,
156 bool cleaningUpAfterException =
false);
158 template <
typename T>
160 unsigned int iStreamID,
163 bool cleaningUpAfterException =
false);
168 void beginStream(
unsigned int);
169 void endStream(
unsigned int);
178 void closeOutputFiles();
181 void openNewOutputFilesIfNeeded();
193 bool shouldWeCloseOutput()
const;
195 void preForkReleaseResources();
196 void postForkReacquireResources(
unsigned int iChildIndex,
unsigned int iNumberOfChildren);
204 std::vector<ModuleDescription const*> getAllModuleDescriptions()
const;
207 void availablePaths(std::vector<std::string>& oLabelsToFill)
const;
212 void triggerPaths(std::vector<std::string>& oLabelsToFill)
const;
215 void endPaths(std::vector<std::string>& oLabelsToFill)
const;
219 std::vector<std::string>& oLabelsToFill)
const;
223 void moduleDescriptionsInPath(
std::string const& iPathLabel,
224 std::vector<ModuleDescription const*>& descriptions,
225 unsigned int hint)
const;
229 void moduleDescriptionsInEndPath(
std::string const& iEndPathLabel,
230 std::vector<ModuleDescription const*>& descriptions,
231 unsigned int hint)
const;
233 void fillModuleAndConsumesInfo(std::vector<ModuleDescription const*>& allModuleDescriptions,
234 std::vector<std::pair<unsigned int, unsigned int> >& moduleIDToIndex,
235 std::vector<std::vector<ModuleDescription const*> >& modulesWhoseProductsAreConsumedBy,
241 int totalEvents()
const;
245 int totalEventsPassed()
const;
249 int totalEventsFailed()
const;
253 void enableEndPaths(
bool active);
257 bool endPathsEnabled()
const;
268 bool terminate()
const;
271 void clearCounters();
278 AllWorkers
const& allWorkers()
const;
311 template <
typename T>
313 typename T::MyPrincipal& ep,
315 bool cleaningUpAfterException) {
316 assert(iStreamID<streamSchedules_.size());
317 streamSchedules_[iStreamID]->processOneStream<
T>(ep,es,cleaningUpAfterException);
320 template <
typename T>
322 unsigned int iStreamID,
323 typename T::MyPrincipal& ep,
325 bool cleaningUpAfterException) {
326 assert(iStreamID<streamSchedules_.size());
327 streamSchedules_[iStreamID]->processOneStreamAsync<
T>(
std::move(iTaskHolder),ep,es,cleaningUpAfterException);
330 template <
typename T>
334 bool cleaningUpAfterException) {
335 globalSchedule_->processOneGlobal<
T>(ep,es,cleaningUpAfterException);
338 template <
typename T>
341 typename T::MyPrincipal& ep,
343 bool cleaningUpAfterException) {
344 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
edm::propagate_const< std::unique_ptr< SystemTimeKeeper > > summaryTimeKeeper_
edm::propagate_const< std::unique_ptr< GlobalSchedule > > globalSchedule_
std::shared_ptr< TriggerResultInserter > & resultsInserter()
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
AllOutputModuleCommunicators all_output_communicators_
std::vector< edm::propagate_const< std::shared_ptr< OutputModuleCommunicator > > > AllOutputModuleCommunicators
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