File indexing completed on 2024-04-06 12:12:03
0001 #ifndef Framework_EventSetupRecordKey_h
0002 #define Framework_EventSetupRecordKey_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024 #include "FWCore/Framework/interface/HCTypeTag.h"
0025 #include "FWCore/Framework/interface/HCMethods.h"
0026
0027
0028 namespace edm {
0029 namespace eventsetup {
0030 class EventSetupRecordKey {
0031 public:
0032 typedef heterocontainer::HCTypeTag TypeTag;
0033
0034 EventSetupRecordKey();
0035 EventSetupRecordKey(const TypeTag& iType) : type_(iType) {}
0036
0037
0038
0039
0040 const TypeTag& type() const { return type_; }
0041
0042 bool operator<(const EventSetupRecordKey& iRHS) const { return type_ < iRHS.type_; }
0043 bool operator==(const EventSetupRecordKey& iRHS) const { return type_ == iRHS.type_; }
0044 inline bool operator!=(const EventSetupRecordKey& iRHS) const { return not(*this == iRHS); }
0045
0046 const char* name() const { return type().name(); }
0047
0048 template <class T>
0049 static EventSetupRecordKey makeKey() {
0050 return eventsetup::heterocontainer::makeKey<T, EventSetupRecordKey>();
0051 }
0052
0053
0054
0055 private:
0056
0057
0058
0059
0060
0061 TypeTag type_;
0062 };
0063 }
0064 }
0065
0066 #endif