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;
109 class TriggerNamesService;
113 template <
typename T>
114 class StreamScheduleSignalSentry {
116 StreamScheduleSignalSentry(
ActivityRegistry*
a,
typename T::Context
const* context) :
117 a_(a), context_(context), allowThrow_(
false) {
118 if (a_) T::preScheduleSignal(a_, context_);
122 if (a_) { T::postScheduleSignal(a_, context_); }
124 if(allowThrow_) {
throw;}
135 typename T::Context
const* context_;
155 std::shared_ptr<ModuleRegistry>,
162 std::shared_ptr<ActivityRegistry>
areg,
164 bool allowEarlyDelete,
172 bool cleaningUpAfterException =
false);
174 template <
typename T>
177 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;
208 std::vector<ModuleDescription const*>& descriptions,
209 unsigned int hint)
const;
212 std::vector<ModuleDescription const*>& descriptions,
213 unsigned int hint)
const;
292 template <
typename T>
295 template <
typename T>
311 vstring* labelsOnTriggerPaths);
324 bool allowEarlyDelete);
372 reportSvc->reportSkippedEvent(ep.
id().
run(), ep.
id().
event());
375 template <
typename T>
378 bool cleaningUpAfterException) {
404 terminationSentry.completedSuccessfully();
410 template <
typename T>
414 p.processOneOccurrence<
T>(ep, es,
streamID_, context);
419 template <
typename T>
425 p.processOneOccurrence<
T>(ep, es,
streamID_, context);
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 *)
unsigned int number_of_unscheduled_modules_
WorkerManager workerManager_
std::shared_ptr< ActivityRegistry > actReg_
void processOneEvent(EventPrincipal &principal, EventSetup const &eventSetup, bool cleaningUpAfterException=false)
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
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)
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
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