CMS 3D CMS Logo

TestDataProxy.h
Go to the documentation of this file.
1 #ifndef FWCore_TestProcessor_TestDataProxy_h
2 #define FWCore_TestProcessor_TestDataProxy_h
3 // -*- C++ -*-
4 //
5 // Package: FWCore/TestProcessor
6 // Class : TestDataProxy
7 //
16 //
17 // Original Author: root
18 // Created: Tue, 08 May 2018 18:32:38 GMT
19 //
20 
21 // system include files
22 #include <memory>
23 
24 // user include files
26 
27 // forward declarations
28 
29 namespace edm {
30 namespace test {
31 
32 template< typename T>
34 {
35 
36  public:
38 
39  void setData(std::unique_ptr<T> iData) {
40  data_ = std::move(iData);
41  }
42 
43  void const* getImpl(eventsetup::EventSetupRecordImpl const&, eventsetup::DataKey const& iKey) final {
44  return data_.get();
45  }
46 
47  void invalidateCache() final {
48  data_.reset();
49  }
50 
51  private:
52  std::unique_ptr<T> data_;
53 };
54 }
55 
56 }
57 
58 #endif
void const * getImpl(eventsetup::EventSetupRecordImpl const &, eventsetup::DataKey const &iKey) final
Definition: TestDataProxy.h:43
std::unique_ptr< T > data_
Definition: TestDataProxy.h:52
HLT enums.
void setData(std::unique_ptr< T > iData)
Definition: TestDataProxy.h:39
def move(src, dest)
Definition: eostools.py:510
void invalidateCache() final
Definition: TestDataProxy.h:47