PathManager.h
Go to the documentation of this file.
1 #ifndef art_Framework_Core_PathManager_h
2 #define art_Framework_Core_PathManager_h
3 ////////////////////////////////////////////////////////////////////////
4 // 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.
13 ////////////////////////////////////////////////////////////////////////
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  bool const parentageEnabled,
50  bool const rangesEnabled,
51  bool const dbEnabled);
52 
53  vstring const& triggerPathNames() const;
54 
55  // These methods may trigger module construction.
58 
59  void resetAll(); // Reset trigger results ready for next event.
60 
61 private:
63 
66  // Returns true if path is an end path.
67  bool processOnePathConfig_(std::string const& path_name,
68  vstring const& path_seq,
69  vstring& trigger_path_names,
70  std::ostream& error_stream);
71 
77  bool const parentageEnabled_{true};
78  bool const rangesEnabled_{true};
79  bool const dbEnabled_{true};
80 
81  // Cached parameters.
82 
83  // Backwards compatibility cached parameters.
84  std::unique_ptr<std::set<std::string>> trigger_paths_config_;
85  std::unique_ptr<std::set<std::string>> end_paths_config_;
86 
89  std::map<std::string, ModInfos> protoTrigPathMap_{};
93  std::map<ScheduleID, PathsInfo> triggerPathsInfo_{}; // Per-schedule.
94 };
95 
96 inline art::PathManager::vstring const&
98 {
99  return triggerPathNames_;
100 }
101 
102 #endif /* art_Framework_Core_PathManager_h */
103 
104 // Local Variables:
105 // mode: c++
106 // End:
detail::ModuleConfigInfoMap allModules_
Definition: PathManager.h:88
PathsInfo & triggerPathsInfo(ScheduleID sID)
std::unique_ptr< std::set< std::string > > end_paths_config_
Definition: PathManager.h:85
ProductDescriptions & productsToProduce_
Definition: PathManager.h:74
vstring triggerPathNames_
Definition: PathManager.h:91
bool const rangesEnabled_
Definition: PathManager.h:78
std::vector< BranchDescription > ProductDescriptions
detail::ModuleConfigInfoMap fillAllModules_()
PathManager & operator=(PathManager const &)=delete
std::vector< Worker * > Workers
Definition: PathManager.h:41
ActivityRegistry & areg_
Definition: PathManager.h:76
std::map< ScheduleID, PathsInfo > triggerPathsInfo_
Definition: PathManager.h:93
detail::ModuleFactory fact_
Definition: PathManager.h:87
std::vector< detail::ModuleInPathInfo > ModInfos
Definition: PathsInfo.h:29
std::unique_ptr< std::set< std::string > > trigger_paths_config_
Definition: PathManager.h:84
vstring const & triggerPathNames() const
Definition: PathManager.h:97
std::vector< std::string > vstring
Definition: PathManager.h:42
PathsInfo & endPathInfo()
ActionTable & exceptActions_
Definition: PathManager.h:75
PathsInfo endPathInfo_
Definition: PathManager.h:92
std::map< std::string, ModInfos > protoTrigPathMap_
Definition: PathManager.h:89
MasterProductRegistry & preg_
Definition: PathManager.h:73
bool processOnePathConfig_(std::string const &path_name, vstring const &path_seq, vstring &trigger_path_names, std::ostream &error_stream)
PathManager(PathManager const &)=delete
Service to store calibration data products (CDP) in the SQLite3 metadatabase of a file...
Definition: FillParentInfo.h:8
ModInfos protoEndPathInfo_
Definition: PathManager.h:90
bool const dbEnabled_
Definition: PathManager.h:79
fhicl::ParameterSet procPS_
Definition: PathManager.h:72
bool const parentageEnabled_
Definition: PathManager.h:77
vstring processPathConfigs_()
PathsInfo::ModInfos ModInfos
Definition: PathManager.h:62
std::map< std::string, ModuleConfigInfo > ModuleConfigInfoMap
enum BeamMode string