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  public:
36 
37  void setData(std::unique_ptr<T> iData) { data_ = std::move(iData); }
38 
39  void const* getImpl(eventsetup::EventSetupRecordImpl const&, eventsetup::DataKey const& iKey) final {
40  return data_.get();
41  }
42 
43  void invalidateCache() final { data_.reset(); }
44 
45  private:
46  std::unique_ptr<T> data_;
47  };
48  } // namespace test
49 
50 } // namespace edm
51 
52 #endif
void const * getImpl(eventsetup::EventSetupRecordImpl const &, eventsetup::DataKey const &iKey) final
Definition: TestDataProxy.h:39
std::unique_ptr< T > data_
Definition: TestDataProxy.h:46
HLT enums.
void setData(std::unique_ptr< T > iData)
Definition: TestDataProxy.h:37
def move(src, dest)
Definition: eostools.py:511
void invalidateCache() final
Definition: TestDataProxy.h:43