LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
PathManager.h
Go to the documentation of this file.
1 #ifndef art_Framework_Core_PathManager_h
2 #define art_Framework_Core_PathManager_h
3 // PathManager.
5 //
6 // Class to handle the processing of the configuration of modules in
7 // art, including the creation of paths and construction of modules as
8 // appropriate.
9 //
10 // Intended to be constructed early, prior to services, since
11 // TriggerNamesService will need some of the information herein at
12 // construction time.
14 
23 #include "fhiclcpp/ParameterSet.h"
24 
25 #include <iosfwd>
26 #include <memory>
27 #include <set>
28 #include <string>
29 #include <vector>
30 
31 namespace art {
32  class MasterProductRegistry;
33  class PathManager;
34 }
35 
37 public:
38  PathManager(PathManager const&) = delete;
39  PathManager& operator=(PathManager const&) = delete;
40 
41  using Workers = std::vector<Worker*>;
42  using vstring = std::vector<std::string>;
43 
44  PathManager(fhicl::ParameterSet const& procPS,
46  ProductDescriptions& productsToProduce,
47  ActionTable& exceptActions,
48  ActivityRegistry& areg);
49 
50  vstring const& triggerPathNames() const;
51 
52  // These methods may trigger module construction.
55 
56  void resetAll(); // Reset trigger results ready for next event.
57 
58 private:
60 
63  // Returns true if path is an end path.
64  bool processOnePathConfig_(std::string const& path_name,
65  vstring const& path_seq,
66  vstring& trigger_path_names,
67  std::ostream& error_stream);
68 
74 
75  // Cached parameters.
76 
77  // Backwards compatibility cached parameters.
78  std::unique_ptr<std::set<std::string>> trigger_paths_config_;
79  std::unique_ptr<std::set<std::string>> end_paths_config_;
80 
83  std::map<std::string, ModInfos> protoTrigPathMap_{};
87  std::map<ScheduleID, PathsInfo> triggerPathsInfo_{}; // Per-schedule.
88 };
89 
90 inline art::PathManager::vstring const&
92 {
93  return triggerPathNames_;
94 }
95 
96 #endif /* art_Framework_Core_PathManager_h */
97 
98 // Local Variables:
99 // mode: c++
100 // End:
detail::ModuleConfigInfoMap allModules_
Definition: PathManager.h:82
std::unique_ptr< std::set< std::string > > end_paths_config_
Definition: PathManager.h:79
ProductDescriptions & productsToProduce_
Definition: PathManager.h:71
vstring triggerPathNames_
Definition: PathManager.h:85
detail::ModuleConfigInfoMap fillAllModules_()
Definition: PathManager.cc:169
vstring processPathConfigs_()
Definition: PathManager.cc:213
std::vector< BranchDescription > ProductDescriptions
PathManager & operator=(PathManager const &)=delete
std::vector< Worker * > Workers
Definition: PathManager.h:41
ActivityRegistry & areg_
Definition: PathManager.h:73
std::map< ScheduleID, PathsInfo > triggerPathsInfo_
Definition: PathManager.h:87
detail::ModuleFactory fact_
Definition: PathManager.h:81
std::vector< detail::ModuleInPathInfo > ModInfos
Definition: PathsInfo.h:26
std::unique_ptr< std::set< std::string > > trigger_paths_config_
Definition: PathManager.h:78
vstring const & triggerPathNames() const
Definition: PathManager.h:91
std::vector< std::string > vstring
Definition: PathManager.h:42
ActionTable & exceptActions_
Definition: PathManager.h:72
PathsInfo endPathInfo_
Definition: PathManager.h:86
std::map< std::string, ModInfos > protoTrigPathMap_
Definition: PathManager.h:83
MasterProductRegistry & preg_
Definition: PathManager.h:70
PathsInfo & endPathInfo()
Definition: PathManager.cc:132
PathsInfo & triggerPathsInfo(ScheduleID sID)
Definition: PathManager.cc:143
bool processOnePathConfig_(std::string const &path_name, vstring const &path_seq, vstring &trigger_path_names, std::ostream &error_stream)
Definition: PathManager.cc:302
PathManager(PathManager const &)=delete
HLT enums.
ModInfos protoEndPathInfo_
Definition: PathManager.h:84
fhicl::ParameterSet procPS_
Definition: PathManager.h:69
PathsInfo::ModInfos ModInfos
Definition: PathManager.h:59
std::map< std::string, ModuleConfigInfo > ModuleConfigInfoMap