CMS 3D CMS Logo

ServiceMakerBase.h
Go to the documentation of this file.
1 #ifndef FWCore_ServiceRegistry_ServiceMakerBase_h
2 #define FWCore_ServiceRegistry_ServiceMakerBase_h
3 // -*- C++ -*-
4 //
5 // Package: ServiceRegistry
6 // Class : ServiceMakerBase
7 //
16 //
17 // Original Author: Chris Jones
18 // Created: Mon Sep 5 13:33:00 EDT 2005
19 //
20 
21 #include <typeinfo>
22 
23 // forward declarations
24 namespace edm {
25  class ParameterSet;
26  class ActivityRegistry;
27 
28  namespace service {
29  inline bool isProcessWideService(void const* /*service*/) { return false; }
30  } // namespace service
31 
32  namespace serviceregistry {
33  class SaveConfiguration;
34  class ServiceWrapperBase;
35  class ServicesManager;
36 
38  public:
40  virtual ~ServiceMakerBase();
41 
42  // ---------- const member functions ---------------------
43  virtual std::type_info const& serviceType() const = 0;
44 
45  virtual bool make(ParameterSet const&, ActivityRegistry&, ServicesManager&) const = 0;
46 
47  virtual bool processWideService() const = 0;
48 
49  virtual bool saveConfiguration() const = 0;
50 
51  // ---------- static member functions --------------------
52 
53  // ---------- member functions ---------------------------
54 
55  protected:
56  bool testSaveConfiguration(SaveConfiguration const*) const { return true; }
57  bool testSaveConfiguration(void const*) const { return false; }
58 
59  private:
60  ServiceMakerBase(ServiceMakerBase const&) = delete; // stop default
61 
62  ServiceMakerBase const& operator=(ServiceMakerBase const&) = delete; // stop default
63 
64  // ---------- member data --------------------------------
65  };
66  } // namespace serviceregistry
67 } // namespace edm
68 
69 #endif
bool isProcessWideService(TFileService const *)
Definition: TFileService.h:99
S make(const edm::ParameterSet &cfg)
bool testSaveConfiguration(void const *) const
bool testSaveConfiguration(SaveConfiguration const *) const
HLT enums.