CMS 3D CMS Logo

DataProxyTemplate.h
Go to the documentation of this file.
1 #ifndef FWCore_Framework_DataProxyTemplate_h
2 #define FWCore_Framework_DataProxyTemplate_h
3 // -*- C++ -*-
4 //
5 // Package: Framework
6 // Class : DataProxyTemplate
7 //
16 //
17 // Author: Chris Jones
18 // Created: Thu Mar 31 12:45:32 EST 2005
19 //
20 
21 // system include files
22 
23 // user include files
26 #include <cassert>
27 
28 // forward declarations
29 
30 namespace edm {
31  namespace eventsetup {
32 template<class RecordT, class DataT>
34 {
35 
36  public:
37  typedef DataT value_type;
38  typedef RecordT record_type;
39 
41  //virtual ~DataProxyTemplate();
42 
43  // ---------- const member functions ---------------------
44 
45  // ---------- static member functions --------------------
46 
47  // ---------- member functions ---------------------------
48  const void* getImpl(const EventSetupRecordImpl& iRecord,
49  const DataKey& iKey) override {
50  assert(iRecord.key() == RecordT::keyForClass());
51  RecordT rec;
52  rec.setImpl(&iRecord);
53  return this->make(rec, iKey);
54  }
55 
56  protected:
57  virtual const DataT* make(const RecordT&, const DataKey&) = 0;
58 
59  private:
60  DataProxyTemplate(const DataProxyTemplate&) = delete; // stop default
61 
62  const DataProxyTemplate& operator=(const DataProxyTemplate&) = delete; // stop default
63 
64  // ---------- member data --------------------------------
65 };
66 
67  }
68 }
69 #endif
const void * getImpl(const EventSetupRecordImpl &iRecord, const DataKey &iKey) override
virtual const DataT * make(const RecordT &, const DataKey &)=0
HLT enums.
const DataProxyTemplate & operator=(const DataProxyTemplate &)=delete
EventSetupRecordKey const & key() const