1 #ifndef FWCore_Framework_StreamSchedule_h
2 #define FWCore_Framework_StreamSchedule_h
97 class BranchIDListHelper;
99 class ExceptionCollector;
100 class OutputModuleCommunicator;
101 class ProcessContext;
104 class ModuleRegistry;
105 class TriggerResultInserter;
106 class PreallocationConfiguration;
110 class TriggerNamesService;
114 template <
typename T>
115 class StreamScheduleSignalSentry {
117 StreamScheduleSignalSentry(
ActivityRegistry*
a,
typename T::Context
const* context) :
118 a_(a), context_(context), allowThrow_(
false) {
119 if (a_) T::preScheduleSignal(a_, context_);
123 if (a_) { T::postScheduleSignal(a_, context_); }
125 if(allowThrow_) {
throw;}
136 typename T::Context
const* context_;
156 std::shared_ptr<ModuleRegistry>,
163 std::shared_ptr<ActivityRegistry>
areg,
165 bool allowEarlyDelete,
175 template <
typename T>
178 bool cleaningUpAfterException =
false);
194 void availablePaths(std::vector<std::string>& oLabelsToFill)
const;
199 void triggerPaths(std::vector<std::string>& oLabelsToFill)
const;
202 void endPaths(std::vector<std::string>& oLabelsToFill)
const;
206 std::vector<std::string>& oLabelsToFill)
const;
209 std::vector<ModuleDescription const*>& descriptions,
210 unsigned int hint)
const;
213 std::vector<ModuleDescription const*>& descriptions,
214 unsigned int hint)
const;
298 template <
typename T>
301 template <
typename T>
317 vstring* labelsOnTriggerPaths);
330 bool allowEarlyDelete);
378 reportSvc->reportSkippedEvent(ep.
id().
run(), ep.
id().
event());
381 template <
typename T>
384 bool cleaningUpAfterException) {
410 terminationSentry.completedSuccessfully();
416 template <
typename T>
425 template <
typename T>
void triggerPaths(std::vector< std::string > &oLabelsToFill) const
void moduleDescriptionsInEndPath(std::string const &iEndPathLabel, std::vector< ModuleDescription const * > &descriptions, unsigned int hint) const
EventNumber_t event() const
StreamContext const * context_
AllWorkers const & allWorkers() const
returns the collection of pointers to workers
std::shared_ptr< HLTGlobalStatus const > TrigResConstPtr
std::vector< Worker * > Workers
std::vector< int > empty_trig_paths_
void moduleDescriptionsInPath(std::string const &iPathLabel, std::vector< ModuleDescription const * > &descriptions, unsigned int hint) const
void fillEndPath(ParameterSet &proc_pset, ProductRegistry &preg, PreallocationConfiguration const *prealloc, std::shared_ptr< ProcessConfiguration const > processConfiguration, int bitpos, std::string const &name)
int totalEventsFailed() const
unsigned int numberOfUnscheduledModules() const
std::vector< Path > NonTrigPaths
void initializeEarlyDelete(ModuleRegistry &modReg, edm::ParameterSet const &opts, edm::ProductRegistry const &preg, bool allowEarlyDelete)
std::shared_ptr< HLTGlobalStatus > TrigResPtr
std::vector< ModuleDescription const * > getAllModuleDescriptions() const
void processOneOccurrence(typename T::MyPrincipal &principal, EventSetup const &eventSetup, StreamID streamID, typename T::Context const *topContext, U const *context, bool cleaningUpAfterException=false)
volatile bool endpathsAreActive_
std::vector< BranchToCount > earlyDeleteBranchToCount_
EventID const & id() const
void addContextAndPrintException(char const *context, cms::Exception &ex, bool disablePrint)
void addToAllWorkers(Worker *w)
vstring end_path_name_list_
void reportSkipped(EventPrincipal const &ep) const
edm::propagate_const< WorkerPtr > results_inserter_
ExceptionToActionTable const & actionTable() const
returns the action table
std::shared_ptr< Worker > WorkerPtr
void runEndPaths(typename T::MyPrincipal const &, EventSetup const &, typename T::Context const *)
void processOneEventAsync(WaitingTaskHolder iTask, EventPrincipal &ep, EventSetup const &es)
unsigned int number_of_unscheduled_modules_
WorkerManager workerManager_
std::shared_ptr< ActivityRegistry > actReg_
std::vector< WorkerInPath > PathWorkers
int totalEventsPassed() const
void getTriggerReport(TriggerReport &rep) const
StreamID streamID() const
PreStreamEarlyTermination preStreamEarlyTerminationSignal_
StreamSchedule(std::shared_ptr< TriggerResultInserter > inserter, std::shared_ptr< ModuleRegistry >, ParameterSet &proc_pset, service::TriggerNamesService &tns, PreallocationConfiguration const &prealloc, ProductRegistry &pregistry, BranchIDListHelper &branchIDListHelper, ExceptionToActionTable const &actions, std::shared_ptr< ActivityRegistry > areg, std::shared_ptr< ProcessConfiguration > processConfiguration, bool allowEarlyDelete, StreamID streamID, ProcessContext const *processContext)
SendTerminationSignalIfException(edm::ActivityRegistry *iReg, edm::StreamContext const *iContext)
void fillWorkers(ParameterSet &proc_pset, ProductRegistry &preg, PreallocationConfiguration const *prealloc, std::shared_ptr< ProcessConfiguration const > processConfiguration, std::string const &name, bool ignoreFilters, PathWorkers &out, vstring *labelsOnPaths)
StreamContext streamContext_
std::vector< std::string > vstring
std::list< std::string > const & context() const
std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
std::vector< Worker * > AllWorkers
std::exception_ptr finishProcessOneEvent(std::exception_ptr)
vstring empty_trig_path_names_
void clearCounters()
Clear all the counters in the trigger report.
AllWorkers const & allWorkers() const
std::vector< unsigned int > earlyDeleteHelperToBranchIndicies_
edm::propagate_const< TrigResPtr > results_
~SendTerminationSignalIfException()
bool endPathsEnabled() const
std::atomic< bool > skippingEvent_
void fillTrigPath(ParameterSet &proc_pset, ProductRegistry &preg, PreallocationConfiguration const *prealloc, std::shared_ptr< ProcessConfiguration const > processConfiguration, int bitpos, std::string const &name, TrigResPtr, vstring *labelsOnTriggerPaths)
StreamContext const & context() const
void replaceModule(maker::ModuleHolder *iMod, std::string const &iLabel)
clone the type of module with label iLabel but configure with iPSet.
void enableEndPaths(bool active)
auto wrap(F iFunc) -> decltype(iFunc())
volatile std::atomic< bool > shutdown_flag false
void finishedPaths(std::exception_ptr, WaitingTaskHolder, EventPrincipal &ep, EventSetup const &es)
bool runTriggerPaths(typename T::MyPrincipal const &, EventSetup const &, typename T::Context const *)
edm::ActivityRegistry * reg_
TrigResConstPtr results() const
std::vector< Path > TrigPaths
std::vector< std::string > vstring
void processOneStream(typename T::MyPrincipal &principal, EventSetup const &eventSetup, bool cleaningUpAfterException=false)
ExceptionToActionTable const & actionTable() const
void availablePaths(std::vector< std::string > &oLabelsToFill) const
adds to oLabelsToFill the labels for all paths in the process
std::vector< EarlyDeleteHelper > earlyDeleteHelpers_
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 completedSuccessfully()
void endPaths(std::vector< std::string > &oLabelsToFill) const
adds to oLabelsToFill the labels for all end paths in the process