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>
147 void processOneStream(
unsigned int iStreamID,
150 bool cleaningUpAfterException =
false);
152 template <
typename T>
154 unsigned int iStreamID,
157 bool cleaningUpAfterException =
false);
162 void beginStream(
unsigned int);
163 void endStream(
unsigned int);
172 void closeOutputFiles();
175 void openNewOutputFilesIfNeeded();
187 bool shouldWeCloseOutput()
const;
189 void preForkReleaseResources();
190 void postForkReacquireResources(
unsigned int iChildIndex,
unsigned int iNumberOfChildren);
198 std::vector<ModuleDescription const*> getAllModuleDescriptions()
const;
201 void availablePaths(std::vector<std::string>& oLabelsToFill)
const;
206 void triggerPaths(std::vector<std::string>& oLabelsToFill)
const;
209 void endPaths(std::vector<std::string>& oLabelsToFill)
const;
213 std::vector<std::string>& oLabelsToFill)
const;
217 void moduleDescriptionsInPath(
std::string const& iPathLabel,
218 std::vector<ModuleDescription const*>& descriptions,
219 unsigned int hint)
const;
223 void moduleDescriptionsInEndPath(
std::string const& iEndPathLabel,
224 std::vector<ModuleDescription const*>& descriptions,
225 unsigned int hint)
const;
227 void fillModuleAndConsumesInfo(std::vector<ModuleDescription const*>& allModuleDescriptions,
228 std::vector<std::pair<unsigned int, unsigned int> >& moduleIDToIndex,
229 std::vector<std::vector<ModuleDescription const*> >& modulesWhoseProductsAreConsumedBy,
235 int totalEvents()
const;
239 int totalEventsPassed()
const;
243 int totalEventsFailed()
const;
247 void enableEndPaths(
bool active);
251 bool endPathsEnabled()
const;
262 bool terminate()
const;
265 void clearCounters();
272 AllWorkers
const& allWorkers()
const;
302 template <
typename T>
304 typename T::MyPrincipal& ep,
306 bool cleaningUpAfterException) {
307 assert(iStreamID<streamSchedules_.size());
308 streamSchedules_[iStreamID]->processOneStream<
T>(ep,es,cleaningUpAfterException);
311 template <
typename T>
313 unsigned int iStreamID,
314 typename T::MyPrincipal& ep,
316 bool cleaningUpAfterException) {
317 assert(iStreamID<streamSchedules_.size());
318 streamSchedules_[iStreamID]->processOneStreamAsync<
T>(
std::move(iTaskHolder),ep,es,cleaningUpAfterException);
321 template <
typename T>
325 bool cleaningUpAfterException) {
326 globalSchedule_->processOneGlobal<
T>(ep,es,cleaningUpAfterException);
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