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  public:
16  explicit ProcessDesc(std::shared_ptr<ParameterSet> pset);
17  explicit ProcessDesc(std::unique_ptr<ParameterSet> pset);
18 
20  explicit ProcessDesc(std::string const& config);
21 
22  ~ProcessDesc();
23 
25  std::shared_ptr<ParameterSet const> getProcessPSet() const { return get_underlying_safe(pset_); }
26  std::shared_ptr<ParameterSet>& getProcessPSet() { return get_underlying_safe(pset_); }
27 
29  auto const& getServicesPSets() const { return services_; }
30  auto& getServicesPSets() { return services_; }
31 
34  void addService(std::string const& service);
40  void addServices(std::vector<std::string> const& defaultServices,
41  std::vector<std::string> const& forcedServices = std::vector<std::string>());
42 
43  std::string dump() const;
44 
45  private:
47  std::vector<ParameterSet> services_;
48  };
49 } // namespace edm
50 
51 #endif
std::string dump() const
Definition: ProcessDesc.cc:69
void addDefaultService(std::string const &service)
add a service if it&#39;s not already there
Definition: ProcessDesc.cc:30
edm::propagate_const< std::shared_ptr< ParameterSet > > pset_
Definition: ProcessDesc.h:46
Definition: config.py:1
constexpr std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
std::shared_ptr< ParameterSet > & getProcessPSet()
Definition: ProcessDesc.h:26
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:57
std::shared_ptr< ParameterSet const > getProcessPSet() const
get the parameter set
Definition: ProcessDesc.h:25
void addService(ParameterSet &pset)
Definition: ProcessDesc.cc:19
auto & getServicesPSets()
Definition: ProcessDesc.h:30
void addForcedService(std::string const &service)
add a service and replace it if it&#39;s already there
Definition: ProcessDesc.cc:45
HLT enums.
ProcessDesc(std::shared_ptr< ParameterSet > pset)
Definition: ProcessDesc.cc:7
std::vector< ParameterSet > services_
Definition: ProcessDesc.h:47
auto const & getServicesPSets() const
get the descriptions of the services
Definition: ProcessDesc.h:29