![]() |
![]() |
00001 #ifndef Framework_EventSetupRecordIntervalFinder_h 00002 #define Framework_EventSetupRecordIntervalFinder_h 00003 // -*- C++ -*- 00004 // 00005 // Package: Framework 00006 // Class : EventSetupRecordIntervalFinder 00007 // 00016 // 00017 // Author: Chris Jones 00018 // Created: Tue Mar 29 16:15:11 EST 2005 00019 // $Id: EventSetupRecordIntervalFinder.h,v 1.10 2008/06/04 20:20:47 chrjones Exp $ 00020 // 00021 00022 // system include files 00023 #include <map> 00024 #include <set> 00025 00026 // user include files 00027 #include "FWCore/Framework/interface/ValidityInterval.h" 00028 #include "FWCore/Framework/interface/EventSetupRecordKey.h" 00029 #include "FWCore/Framework/interface/ComponentDescription.h" 00030 00031 // forward declarations 00032 namespace edm { 00033 00034 class EventSetupRecordIntervalFinder 00035 { 00036 00037 public: 00038 EventSetupRecordIntervalFinder() : intervals_() {} 00039 virtual ~EventSetupRecordIntervalFinder(); 00040 00041 // ---------- const member functions --------------------- 00042 std::set<eventsetup::EventSetupRecordKey> findingForRecords() const ; 00043 00044 const eventsetup::ComponentDescription& descriptionForFinder() const { return description_;} 00045 // ---------- static member functions -------------------- 00046 00047 // ---------- member functions --------------------------- 00051 const ValidityInterval& findIntervalFor(const eventsetup::EventSetupRecordKey&, 00052 const IOVSyncValue&); 00053 00054 void setDescriptionForFinder(const eventsetup::ComponentDescription& iDescription) { 00055 description_ = iDescription; 00056 } 00057 protected: 00058 virtual void setIntervalFor(const eventsetup::EventSetupRecordKey&, 00059 const IOVSyncValue& , 00060 ValidityInterval&) = 0; 00061 00062 template< class T> 00063 void findingRecord() { 00064 findingRecordWithKey(eventsetup::EventSetupRecordKey::makeKey<T>()); 00065 } 00066 00067 void findingRecordWithKey(const eventsetup::EventSetupRecordKey&); 00068 00069 private: 00070 EventSetupRecordIntervalFinder(const EventSetupRecordIntervalFinder&); // stop default 00071 00072 const EventSetupRecordIntervalFinder& operator=(const EventSetupRecordIntervalFinder&); // stop default 00073 00075 virtual void delaySettingRecords(); 00076 // ---------- member data -------------------------------- 00077 typedef std::map<eventsetup::EventSetupRecordKey,ValidityInterval> Intervals; 00078 Intervals intervals_; 00079 00080 eventsetup::ComponentDescription description_; 00081 }; 00082 00083 } 00084 #endif