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