CMS 3D CMS Logo

ProxyFactoryTemplate.h
Go to the documentation of this file.
1 #ifndef Framework_ProxyFactoryTemplate_h
2 #define Framework_ProxyFactoryTemplate_h
3 // -*- C++ -*-
4 //
5 // Package: Framework
6 // Class : ProxyFactoryTemplate
7 //
16 //
17 // Author: Chris Jones
18 // Created: Fri Apr 8 07:59:32 CDT 2005
19 //
20 
21 // system include files
22 #include <memory>
23 #include <string>
24 
25 // user include files
28 
29 // forward declarations
30 namespace edm {
31  namespace eventsetup {
32 
33  template <class T>
35  public:
36  typedef typename T::record_type record_type;
37 
39  //virtual ~ProxyFactoryTemplate();
40 
41  // ---------- const member functions ---------------------
42  virtual std::unique_ptr<DataProxy> makeProxy() const { return std::make_unique<T>(); }
43 
44  virtual DataKey makeKey(const std::string& iName) const {
45  return DataKey(DataKey::makeTypeTag<typename T::value_type>(), iName.c_str());
46  }
47 
48  // ---------- static member functions --------------------
49 
50  // ---------- member functions ---------------------------
51 
52  private:
53  ProxyFactoryTemplate(const ProxyFactoryTemplate&); // stop default
54 
55  const ProxyFactoryTemplate& operator=(const ProxyFactoryTemplate&); // stop default
56 
57  // ---------- member data --------------------------------
58  };
59 
60  } // namespace eventsetup
61 } // namespace edm
62 
63 #endif
virtual std::unique_ptr< DataProxy > makeProxy() const
HLT enums.
const ProxyFactoryTemplate & operator=(const ProxyFactoryTemplate &)
virtual DataKey makeKey(const std::string &iName) const