Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:28:14

0001 #ifndef Framework_DummyEventSetupRecordRetriever_h
0002 #define Framework_DummyEventSetupRecordRetriever_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     Framework
0006 // Class  :     DummyEventSetupRecordRetriever
0007 //
0008 /**\class DummyEventSetupRecordRetriever DummyEventSetupRecordRetriever.h FWCore/Framework/interface/DummyEventSetupRecordRetriever.h
0009 
0010  Description: <one line class summary>
0011 
0012  Usage:
0013     <usage>
0014 
0015 */
0016 //
0017 // Author:      Chris Jones
0018 // Created:     Fri Apr 22 14:14:09 EDT 2005
0019 //
0020 
0021 // system include files
0022 
0023 // user include files
0024 #include "FWCore/Framework/interface/EventSetupRecordIntervalFinder.h"
0025 #include "FWCore/Framework/interface/ESProducer.h"
0026 
0027 #include "FWCore/Framework/test/DummyEventSetupRecord.h"
0028 #include "FWCore/Framework/test/DummyEventSetupData.h"
0029 
0030 // forward declarations
0031 namespace edm {
0032   class DummyEventSetupRecordRetriever : public EventSetupRecordIntervalFinder, public ESProducer {
0033   public:
0034     DummyEventSetupRecordRetriever() {
0035       this->findingRecord<DummyEventSetupRecord>();
0036       setWhatProduced(this);
0037     }
0038 
0039     std::unique_ptr<DummyEventSetupData> produce(const DummyEventSetupRecord&) {
0040       return std::make_unique<DummyEventSetupData>(1);
0041     }
0042 
0043   protected:
0044     virtual void setIntervalFor(const edm::eventsetup::EventSetupRecordKey&,
0045                                 const edm::IOVSyncValue& /*iTime*/,
0046                                 edm::ValidityInterval& iInterval) {
0047       iInterval = edm::ValidityInterval(IOVSyncValue::beginOfTime(), IOVSyncValue::endOfTime());
0048     }
0049 
0050   private:
0051     DummyEventSetupRecordRetriever(const DummyEventSetupRecordRetriever&);  // stop default
0052 
0053     const DummyEventSetupRecordRetriever& operator=(const DummyEventSetupRecordRetriever&);  // stop default
0054 
0055     // ---------- member data --------------------------------
0056   };
0057 }  // namespace edm
0058 #endif