CMS 3D CMS Logo

PathsAndConsumesOfModules.h
Go to the documentation of this file.
1 #ifndef FWCore_Framework_PathsAndConsumesOfModules_h
2 #define FWCore_Framework_PathsAndConsumesOfModules_h
3 
11 //
12 // Original Author: W. David Dagenhart
13 // Created: 11/5/2014
14 
17 
18 #include <memory>
19 #include <string>
20 #include <utility>
21 #include <vector>
22 
23 namespace edm {
24 
25  class ModuleDescription;
26  class ProductRegistry;
27  class Schedule;
28 
30  public:
31  ~PathsAndConsumesOfModules() override;
32 
33  void initialize(Schedule const*, std::shared_ptr<ProductRegistry const>);
34 
35  private:
36  std::vector<std::string> const& doPaths() const override { return paths_; }
37  std::vector<std::string> const& doEndPaths() const override { return endPaths_; }
38 
39  std::vector<ModuleDescription const*> const& doAllModules() const override { return allModuleDescriptions_; }
40  ModuleDescription const* doModuleDescription(unsigned int moduleID) const override;
41 
42  std::vector<ModuleDescription const*> const& doModulesOnPath(unsigned int pathIndex) const override;
43  std::vector<ModuleDescription const*> const& doModulesOnEndPath(unsigned int endPathIndex) const override;
44  std::vector<ModuleDescription const*> const& doModulesWhoseProductsAreConsumedBy(
45  unsigned int moduleID) const override;
46 
47  std::vector<ConsumesInfo> doConsumesInfo(unsigned int moduleID) const override;
48 
49  unsigned int moduleIndex(unsigned int moduleID) const;
50 
51  // data members
52 
53  std::vector<std::string> paths_;
54  std::vector<std::string> endPaths_;
55 
56  std::vector<ModuleDescription const*> allModuleDescriptions_;
57 
58  std::vector<std::vector<ModuleDescription const*> > modulesOnPaths_;
59  std::vector<std::vector<ModuleDescription const*> > modulesOnEndPaths_;
60 
61  // Gives a translation from the module ID to the index into the
62  // following data member
63  std::vector<std::pair<unsigned int, unsigned int> > moduleIDToIndex_;
64 
65  std::vector<std::vector<ModuleDescription const*> > modulesWhoseProductsAreConsumedBy_;
66 
68  std::shared_ptr<ProductRegistry const> preg_;
69  };
70 
71  void checkForModuleDependencyCorrectness(edm::PathsAndConsumesOfModulesBase const& iPnC, bool iPrintDependencies);
72 } // namespace edm
73 #endif
edm::PathsAndConsumesOfModules::doConsumesInfo
std::vector< ConsumesInfo > doConsumesInfo(unsigned int moduleID) const override
Definition: PathsAndConsumesOfModules.cc:73
edm::PathsAndConsumesOfModules::modulesOnPaths_
std::vector< std::vector< ModuleDescription const * > > modulesOnPaths_
Definition: PathsAndConsumesOfModules.h:58
edm::PathsAndConsumesOfModules::doModulesWhoseProductsAreConsumedBy
std::vector< ModuleDescription const * > const & doModulesWhoseProductsAreConsumedBy(unsigned int moduleID) const override
Definition: PathsAndConsumesOfModules.cc:68
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::PathsAndConsumesOfModules::modulesOnEndPaths_
std::vector< std::vector< ModuleDescription const * > > modulesOnEndPaths_
Definition: PathsAndConsumesOfModules.h:59
edm::PathsAndConsumesOfModules::doEndPaths
std::vector< std::string > const & doEndPaths() const override
Definition: PathsAndConsumesOfModules.h:37
edm::PathsAndConsumesOfModules::modulesWhoseProductsAreConsumedBy_
std::vector< std::vector< ModuleDescription const * > > modulesWhoseProductsAreConsumedBy_
Definition: PathsAndConsumesOfModules.h:65
edm::PathsAndConsumesOfModules::initialize
void initialize(Schedule const *, std::shared_ptr< ProductRegistry const >)
Definition: PathsAndConsumesOfModules.cc:14
edm::ModuleDescription
Definition: ModuleDescription.h:21
edm::PathsAndConsumesOfModules
Definition: PathsAndConsumesOfModules.h:29
edm::Schedule
Definition: Schedule.h:121
edm::PathsAndConsumesOfModules::doAllModules
std::vector< ModuleDescription const * > const & doAllModules() const override
Definition: PathsAndConsumesOfModules.h:39
edm::PathsAndConsumesOfModules::doModuleDescription
ModuleDescription const * doModuleDescription(unsigned int moduleID) const override
Definition: PathsAndConsumesOfModules.cc:48
edm::checkForModuleDependencyCorrectness
void checkForModuleDependencyCorrectness(edm::PathsAndConsumesOfModulesBase const &iPnC, bool iPrintDependencies)
Definition: PathsAndConsumesOfModules.cc:130
edm::PathsAndConsumesOfModules::paths_
std::vector< std::string > paths_
Definition: PathsAndConsumesOfModules.h:53
edm::PathsAndConsumesOfModules::preg_
std::shared_ptr< ProductRegistry const > preg_
Definition: PathsAndConsumesOfModules.h:68
edm::PathsAndConsumesOfModules::moduleIDToIndex_
std::vector< std::pair< unsigned int, unsigned int > > moduleIDToIndex_
Definition: PathsAndConsumesOfModules.h:63
edm::PathsAndConsumesOfModules::doModulesOnEndPath
std::vector< ModuleDescription const * > const & doModulesOnEndPath(unsigned int endPathIndex) const override
Definition: PathsAndConsumesOfModules.cc:63
edm::PathsAndConsumesOfModules::doPaths
std::vector< std::string > const & doPaths() const override
Definition: PathsAndConsumesOfModules.h:36
edm::PathsAndConsumesOfModules::endPaths_
std::vector< std::string > endPaths_
Definition: PathsAndConsumesOfModules.h:54
edm::PathsAndConsumesOfModules::allModuleDescriptions_
std::vector< ModuleDescription const * > allModuleDescriptions_
Definition: PathsAndConsumesOfModules.h:56
edm::PathsAndConsumesOfModules::schedule_
Schedule const * schedule_
Definition: PathsAndConsumesOfModules.h:67
edm::PathsAndConsumesOfModulesBase
Definition: PathsAndConsumesOfModulesBase.h:34
edm::PathsAndConsumesOfModules::~PathsAndConsumesOfModules
~PathsAndConsumesOfModules() override
Definition: PathsAndConsumesOfModules.cc:12
edm::PathsAndConsumesOfModules::doModulesOnPath
std::vector< ModuleDescription const * > const & doModulesOnPath(unsigned int pathIndex) const override
Definition: PathsAndConsumesOfModules.cc:59
PathsAndConsumesOfModulesBase.h
edm::PathsAndConsumesOfModules::moduleIndex
unsigned int moduleIndex(unsigned int moduleID) const
Definition: PathsAndConsumesOfModules.cc:78
ConsumesInfo.h