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
std::vector< ModuleDescription const * > const & doAllModules() const override
std::vector< std::vector< ModuleDescription const * > > modulesWhoseProductsAreConsumedBy_
std::vector< ModuleDescription const * > const & doModulesOnPath(unsigned int pathIndex) const override
std::vector< std::string > const & doPaths() const override
unsigned int moduleIndex(unsigned int moduleID) const
std::vector< std::pair< unsigned int, unsigned int > > moduleIDToIndex_
std::vector< ModuleDescription const * > const & doModulesWhoseProductsAreConsumedBy(unsigned int moduleID) const override
std::vector< ModuleDescription const * > allModuleDescriptions_
std::vector< ModuleDescription const * > const & doModulesOnEndPath(unsigned int endPathIndex) const override
void initialize(Schedule const *, std::shared_ptr< ProductRegistry const >)
std::vector< std::vector< ModuleDescription const * > > modulesOnPaths_
std::vector< std::string > const & doEndPaths() const override
std::vector< std::string > endPaths_
std::vector< ConsumesInfo > doConsumesInfo(unsigned int moduleID) const override
void checkForModuleDependencyCorrectness(edm::PathsAndConsumesOfModulesBase const &iPnC, bool iPrintDependencies)
std::shared_ptr< ProductRegistry const > preg_
HLT enums.
std::vector< std::vector< ModuleDescription const * > > modulesOnEndPaths_
ModuleDescription const * doModuleDescription(unsigned int moduleID) const override