CMS 3D CMS Logo

ProcessDesc.h
Go to the documentation of this file.
1 #ifndef FWCore_ParameterSet_ProcessDesc_h
2 #define FWCore_ParameterSet_ProcessDesc_h
3 
4 #include <memory>
5 #include <string>
6 #include <vector>
7 
9 
10 namespace edm {
11 
12  class ParameterSet;
13 
14  class ProcessDesc {
15 
16  public:
17  explicit ProcessDesc(std::shared_ptr<ParameterSet> pset);
18  explicit ProcessDesc(std::unique_ptr<ParameterSet> pset);
19 
21  explicit ProcessDesc(std::string const& config);
22 
23  ~ProcessDesc();
24 
26  std::shared_ptr<ParameterSet const> getProcessPSet() const {return get_underlying_safe(pset_);}
27  std::shared_ptr<ParameterSet>& getProcessPSet() {return get_underlying_safe(pset_);}
28 
30  auto const& getServicesPSets() const {return services_;}
31  auto& getServicesPSets() {return services_;}
32 
33  void addService(ParameterSet& pset);
35  void addService(std::string const& service);
37  void addDefaultService(std::string const& service);
39  void addForcedService(std::string const& service);
41  void addServices(std::vector<std::string> const& defaultServices,
42  std::vector<std::string> const& forcedServices = std::vector<std::string>());
43 
44  std::string dump() const;
45  private:
47  std::vector<ParameterSet> services_;
48  };
49 }
50 
51 #endif
void addDefaultService(std::string const &service)
add a service if it&#39;s not already there
Definition: ProcessDesc.cc:35
edm::propagate_const< std::shared_ptr< ParameterSet > > pset_
Definition: ProcessDesc.h:46
Definition: config.py:1
std::shared_ptr< ParameterSet const > getProcessPSet() const
get the parameter set
Definition: ProcessDesc.h:26
std::shared_ptr< ParameterSet > & getProcessPSet()
Definition: ProcessDesc.h:27
void addServices(std::vector< std::string > const &defaultServices, std::vector< std::string > const &forcedServices=std::vector< std::string >())
add some default services and forced services
Definition: ProcessDesc.cc:62
void addService(ParameterSet &pset)
Definition: ProcessDesc.cc:24
auto & getServicesPSets()
Definition: ProcessDesc.h:31
void addForcedService(std::string const &service)
add a service and replace it if it&#39;s already there
Definition: ProcessDesc.cc:50
std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
HLT enums.
std::string dump() const
Definition: ProcessDesc.cc:74
auto const & getServicesPSets() const
get the descriptions of the services
Definition: ProcessDesc.h:30
ProcessDesc(std::shared_ptr< ParameterSet > pset)
Definition: ProcessDesc.cc:7
std::vector< ParameterSet > services_
Definition: ProcessDesc.h:47