File indexing completed on 2024-04-06 12:13:02
0001 #ifndef FWCore_ServiceRegistry_PathsAndConsumesOfModulesBase_h
0002 #define FWCore_ServiceRegistry_PathsAndConsumesOfModulesBase_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025 #include "FWCore/ServiceRegistry/interface/ConsumesInfo.h"
0026 #include "FWCore/Utilities/interface/BranchType.h"
0027
0028 #include <string>
0029 #include <vector>
0030
0031 namespace edm {
0032
0033 class ModuleDescription;
0034
0035 class PathsAndConsumesOfModulesBase {
0036 public:
0037 virtual ~PathsAndConsumesOfModulesBase();
0038
0039 std::vector<std::string> const& paths() const { return doPaths(); }
0040 std::vector<std::string> const& endPaths() const { return doEndPaths(); }
0041
0042 std::vector<ModuleDescription const*> const& allModules() const { return doAllModules(); }
0043
0044 ModuleDescription const* moduleDescription(unsigned int moduleID) const { return doModuleDescription(moduleID); }
0045
0046 std::vector<ModuleDescription const*> const& modulesOnPath(unsigned int pathIndex) const {
0047 return doModulesOnPath(pathIndex);
0048 }
0049
0050 std::vector<ModuleDescription const*> const& modulesOnEndPath(unsigned int endPathIndex) const {
0051 return doModulesOnEndPath(endPathIndex);
0052 }
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063
0064 std::vector<ModuleDescription const*> const& modulesWhoseProductsAreConsumedBy(
0065 unsigned int moduleID, BranchType branchType = InEvent) const {
0066 return doModulesWhoseProductsAreConsumedBy(moduleID, branchType);
0067 }
0068
0069
0070
0071
0072
0073
0074
0075
0076 std::vector<ConsumesInfo> consumesInfo(unsigned int moduleID) const { return doConsumesInfo(moduleID); }
0077
0078 unsigned int largestModuleID() const { return doLargestModuleID(); }
0079
0080 private:
0081 virtual std::vector<std::string> const& doPaths() const = 0;
0082 virtual std::vector<std::string> const& doEndPaths() const = 0;
0083 virtual std::vector<ModuleDescription const*> const& doAllModules() const = 0;
0084 virtual ModuleDescription const* doModuleDescription(unsigned int moduleID) const = 0;
0085 virtual std::vector<ModuleDescription const*> const& doModulesOnPath(unsigned int pathIndex) const = 0;
0086 virtual std::vector<ModuleDescription const*> const& doModulesOnEndPath(unsigned int endPathIndex) const = 0;
0087 virtual std::vector<ModuleDescription const*> const& doModulesWhoseProductsAreConsumedBy(
0088 unsigned int moduleID, BranchType branchType) const = 0;
0089 virtual std::vector<ConsumesInfo> doConsumesInfo(unsigned int moduleID) const = 0;
0090 virtual unsigned int doLargestModuleID() const = 0;
0091 };
0092 }
0093 #endif