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 
33 
34  void initialize(Schedule const*, std::shared_ptr<ProductRegistry const>);
35 
36  private:
37 
38  virtual std::vector<std::string> const& doPaths() const override { return paths_; }
39  virtual std::vector<std::string> const& doEndPaths() const override { return endPaths_; }
40 
41  virtual std::vector<ModuleDescription const*> const& doAllModules() const override { return allModuleDescriptions_; }
42  virtual ModuleDescription const* doModuleDescription(unsigned int moduleID) const override;
43 
44  virtual std::vector<ModuleDescription const*> const& doModulesOnPath(unsigned int pathIndex) const override;
45  virtual std::vector<ModuleDescription const*> const& doModulesOnEndPath(unsigned int endPathIndex) const override;
46  virtual std::vector<ModuleDescription const*> const& doModulesWhoseProductsAreConsumedBy(unsigned int moduleID) const override;
47 
48  virtual std::vector<ConsumesInfo> doConsumesInfo(unsigned int moduleID) const override;
49 
50  unsigned int moduleIndex(unsigned int moduleID) const;
51 
52  // data members
53 
54  std::vector<std::string> paths_;
55  std::vector<std::string> endPaths_;
56 
57  std::vector<ModuleDescription const*> allModuleDescriptions_;
58 
59  std::vector<std::vector<ModuleDescription const*> > modulesOnPaths_;
60  std::vector<std::vector<ModuleDescription const*> > modulesOnEndPaths_;
61 
62  // Gives a translation from the module ID to the index into the
63  // following data member
64  std::vector<std::pair<unsigned int, unsigned int> > moduleIDToIndex_;
65 
66  std::vector<std::vector<ModuleDescription const*> > modulesWhoseProductsAreConsumedBy_;
67 
69  std::shared_ptr<ProductRegistry const> preg_;
70  };
71 
72  void
74  bool iPrintDependencies);
75 }
76 #endif
std::vector< std::vector< ModuleDescription const * > > modulesWhoseProductsAreConsumedBy_
virtual std::vector< ModuleDescription const * > const & doModulesOnPath(unsigned int pathIndex) const override
unsigned int moduleIndex(unsigned int moduleID) const
std::vector< std::pair< unsigned int, unsigned int > > moduleIDToIndex_
virtual std::vector< ModuleDescription const * > const & doModulesWhoseProductsAreConsumedBy(unsigned int moduleID) const override
std::vector< ModuleDescription const * > allModuleDescriptions_
virtual 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_
virtual std::vector< std::string > const & doEndPaths() const override
virtual std::vector< std::string > const & doPaths() const override
std::vector< std::string > endPaths_
virtual std::vector< ConsumesInfo > doConsumesInfo(unsigned int moduleID) const override
void checkForModuleDependencyCorrectness(edm::PathsAndConsumesOfModulesBase const &iPnC, bool iPrintDependencies)
virtual std::vector< ModuleDescription const * > const & doAllModules() const override
std::shared_ptr< ProductRegistry const > preg_
HLT enums.
std::vector< std::vector< ModuleDescription const * > > modulesOnEndPaths_
virtual ModuleDescription const * doModuleDescription(unsigned int moduleID) const override