File indexing completed on 2024-04-06 12:12:52
0001 #ifndef FWCore_ParameterSet_ProcessDesc_h
0002 #define FWCore_ParameterSet_ProcessDesc_h
0003
0004 #include <memory>
0005 #include <string>
0006 #include <vector>
0007
0008 #include "FWCore/Utilities/interface/get_underlying_safe.h"
0009
0010 namespace edm {
0011
0012 class ParameterSet;
0013
0014 class ProcessDesc {
0015 public:
0016 explicit ProcessDesc(std::shared_ptr<ParameterSet> pset);
0017 explicit ProcessDesc(std::unique_ptr<ParameterSet> pset);
0018
0019
0020 explicit ProcessDesc(std::string const& config);
0021
0022 ~ProcessDesc();
0023
0024
0025 std::shared_ptr<ParameterSet const> getProcessPSet() const { return get_underlying_safe(pset_); }
0026 std::shared_ptr<ParameterSet>& getProcessPSet() { return get_underlying_safe(pset_); }
0027
0028
0029 auto const& getServicesPSets() const { return services_; }
0030 auto& getServicesPSets() { return services_; }
0031
0032 void addService(ParameterSet& pset);
0033
0034 void addService(std::string const& service);
0035
0036 void addDefaultService(std::string const& service);
0037
0038 void addForcedService(std::string const& service);
0039
0040 void addServices(std::vector<std::string> const& defaultServices,
0041 std::vector<std::string> const& forcedServices = std::vector<std::string>());
0042
0043 std::string dump() const;
0044
0045 private:
0046 edm::propagate_const<std::shared_ptr<ParameterSet>> pset_;
0047 std::vector<ParameterSet> services_;
0048 };
0049 }
0050
0051 #endif