test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 #endif
std::vector< std::vector< ModuleDescription const * > > modulesWhoseProductsAreConsumedBy_
virtual std::vector< std::string > const & doPaths() const override
virtual std::vector< ModuleDescription const * > const & doAllModules() const override
virtual std::vector< ModuleDescription const * > const & doModulesWhoseProductsAreConsumedBy(unsigned int moduleID) const override
virtual std::vector< std::string > const & doEndPaths() const override
unsigned int moduleIndex(unsigned int moduleID) const
virtual std::vector< ModuleDescription const * > const & doModulesOnPath(unsigned int pathIndex) const override
std::vector< std::pair< unsigned int, unsigned int > > moduleIDToIndex_
std::vector< ModuleDescription const * > allModuleDescriptions_
void initialize(Schedule const *, std::shared_ptr< ProductRegistry const >)
std::vector< std::vector< ModuleDescription const * > > modulesOnPaths_
std::vector< std::string > endPaths_
std::shared_ptr< ProductRegistry const > preg_
virtual ModuleDescription const * doModuleDescription(unsigned int moduleID) const override
virtual std::vector< ConsumesInfo > doConsumesInfo(unsigned int moduleID) const override
virtual std::vector< ModuleDescription const * > const & doModulesOnEndPath(unsigned int endPathIndex) const override
std::vector< std::vector< ModuleDescription const * > > modulesOnEndPaths_