4848 The order of the paths from the input configuration is
4949 preserved in the main paths list.
5050
51- ------------------------
52-
53- The StreamSchedule uses the TriggerNamesService to get the names of the
54- trigger paths and end paths. When a TriggerResults object is created
55- the results are stored in the same order as the trigger names from
56- TriggerNamesService.
5751
5852*/
5953
6458#include " FWCore/Framework/interface/ExceptionHelpers.h"
6559#include " FWCore/Framework/interface/Frameworkfwd.h"
6660#include " FWCore/Framework/interface/OccurrenceTraits.h"
67- #include " FWCore/Framework/interface/UnscheduledCallProducer.h"
6861#include " FWCore/Framework/interface/WorkerManager.h"
6962#include " FWCore/Framework/interface/Path.h"
7063#include " FWCore/Framework/interface/TransitionInfoTypes.h"
64+ #include " FWCore/Framework/interface/ModuleInPath.h"
7165#include " FWCore/Framework/interface/maker/Worker.h"
7266#include " FWCore/Framework/interface/EarlyDeleteHelper.h"
7367#include " FWCore/MessageLogger/interface/ExceptionMessages.h"
@@ -109,42 +103,52 @@ namespace edm {
109103 class ExceptionCollector ;
110104 class ExceptionToActionTable ;
111105 class OutputModuleCommunicator ;
112- class UnscheduledCallProducer ;
113106 class WorkerInPath ;
114107 class ModuleRegistry ;
115108 class TriggerResultInserter ;
116109 class PathStatusInserter ;
117110 class EndPathStatusInserter ;
118- class PreallocationConfiguration ;
119- class ConditionalTaskHelper ;
120111
121- namespace service {
122- class TriggerNamesService ;
112+ namespace maker {
113+ class ModuleHolder ;
123114 }
124115
125116 class StreamSchedule {
126117 public:
127- typedef std::vector<std::string> vstring;
128- typedef std::vector<Path> TrigPaths;
129- typedef std::shared_ptr<HLTGlobalStatus> TrigResPtr;
130- typedef std::shared_ptr<HLTGlobalStatus const > TrigResConstPtr;
131- typedef std::vector<Worker*> AllWorkers;
132-
133- typedef std::vector<Worker*> Workers;
134-
135- typedef std::vector<WorkerInPath> PathWorkers;
118+ using vstring = std::vector<std::string>;
119+ using TrigPaths = std::vector<Path>;
120+ using TrigResPtr = std::shared_ptr<HLTGlobalStatus>;
121+ using TrigResConstPtr = std::shared_ptr<HLTGlobalStatus const >;
122+ using AllWorkers = std::vector<Worker*>;
123+
124+ using Workers = std::vector<Worker*>;
125+
126+ using PathWorkers = std::vector<WorkerInPath>;
127+
128+ struct PathInfo {
129+ PathInfo (std::string name, std::vector<edm::ModuleInPath> modules, std::shared_ptr<PathStatusInserter> inserter)
130+ : name_(std::move(name)), modules_(std::move(modules)), inserter_(std::move(inserter)) {}
131+ std::string name_;
132+ std::vector<edm::ModuleInPath> modules_;
133+ std::shared_ptr<PathStatusInserter> inserter_;
134+ };
135+ struct EndPathInfo {
136+ EndPathInfo (std::string name,
137+ std::vector<edm::ModuleInPath> modules,
138+ std::shared_ptr<EndPathStatusInserter> inserter)
139+ : name_(std::move(name)), modules_(std::move(modules)), inserter_(std::move(inserter)) {}
140+ std::string name_;
141+ std::vector<edm::ModuleInPath> modules_;
142+ std::shared_ptr<EndPathStatusInserter> inserter_;
143+ };
136144
137- StreamSchedule (std::shared_ptr<TriggerResultInserter> inserter,
138- std::vector<edm::propagate_const<std::shared_ptr<PathStatusInserter>>>& pathStatusInserters,
139- std::vector<edm::propagate_const<std::shared_ptr<EndPathStatusInserter>>>& endPathStatusInserters,
145+ StreamSchedule (std::vector<PathInfo> const & paths,
146+ std::vector<EndPathInfo> const & endPaths,
147+ std::vector<ModuleDescription const *> const & unscheduledModules,
148+ std::shared_ptr<TriggerResultInserter> inserter,
140149 std::shared_ptr<ModuleRegistry>,
141- ParameterSet& proc_pset,
142- service::TriggerNamesService const & tns,
143- PreallocationConfiguration const & prealloc,
144- SignallingProductRegistryFiller& pregistry,
145150 ExceptionToActionTable const & actions,
146151 std::shared_ptr<ActivityRegistry> areg,
147- std::shared_ptr<ProcessConfiguration const > processConfiguration,
148152 StreamID streamID,
149153 ProcessContext const * processContext);
150154
@@ -232,13 +236,6 @@ namespace edm {
232236
233237 StreamContext const & context () const { return streamContext_; }
234238
235- struct AliasInfo {
236- std::string friendlyClassName;
237- std::string instanceLabel;
238- std::string originalInstanceLabel;
239- std::string originalModuleLabel;
240- };
241-
242239 private:
243240 // / returns the action table
244241 ExceptionToActionTable const & actionTable () const { return workerManagerLumisAndEvents_.actionTable (); }
@@ -251,56 +248,15 @@ namespace edm {
251248
252249 void reportSkipped (EventPrincipal const & ep) const ;
253250
254- std::vector<Worker*> tryToPlaceConditionalModules (
255- Worker*,
256- std::unordered_set<std::string>& conditionalModules,
257- std::unordered_multimap<std::string, edm::ProductDescription const *> const & conditionalModuleBranches,
258- std::unordered_multimap<std::string, AliasInfo> const & aliasMap,
259- ParameterSet& proc_pset,
260- SignallingProductRegistryFiller& preg,
261- PreallocationConfiguration const * prealloc,
262- std::shared_ptr<ProcessConfiguration const > processConfiguration);
263- PathWorkers fillWorkers (ParameterSet& proc_pset,
264- SignallingProductRegistryFiller& preg,
265- PreallocationConfiguration const * prealloc,
266- std::shared_ptr<ProcessConfiguration const > processConfiguration,
267- std::string const & name,
268- bool ignoreFilters,
269- std::vector<std::string> const & endPathNames,
270- ConditionalTaskHelper const & conditionalTaskHelper,
271- std::unordered_set<std::string>& allConditionalModules);
272- void fillTrigPath (ParameterSet& proc_pset,
273- SignallingProductRegistryFiller& preg,
274- PreallocationConfiguration const * prealloc,
275- std::shared_ptr<ProcessConfiguration const > processConfiguration,
276- int bitpos,
277- std::string const & name,
278- TrigResPtr,
279- std::vector<std::string> const & endPathNames,
280- ConditionalTaskHelper const & conditionalTaskHelper,
281- std::unordered_set<std::string>& allConditionalModules);
282- void fillEndPath (ParameterSet& proc_pset,
283- SignallingProductRegistryFiller& preg,
284- PreallocationConfiguration const * prealloc,
285- std::shared_ptr<ProcessConfiguration const > processConfiguration,
286- int bitpos,
287- std::string const & name,
288- std::vector<std::string> const & endPathNames,
289- ConditionalTaskHelper const & conditionalTaskHelper,
290- std::unordered_set<std::string>& allConditionalModules);
291-
292- void addToAllWorkers (Worker* w);
251+ PathWorkers fillWorkers (std::vector<ModuleInPath> const &);
252+ void fillTrigPath (PathInfo const &, int bitpos, TrigResPtr);
253+ void fillEndPath (EndPathInfo const &, int bitpos);
293254
294255 void resetEarlyDelete ();
295256
296257 TrigResConstPtr results () const { return get_underlying_safe (results_); }
297258 TrigResPtr& results () { return get_underlying_safe (results_); }
298259
299- void makePathStatusInserters (
300- std::vector<edm::propagate_const<std::shared_ptr<PathStatusInserter>>>& pathStatusInserters,
301- std::vector<edm::propagate_const<std::shared_ptr<EndPathStatusInserter>>>& endPathStatusInserters,
302- ExceptionToActionTable const & actions);
303-
304260 template <typename T>
305261 void preScheduleSignal (StreamContext const *) const ;
306262
0 commit comments