Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:12:03

0001 #ifndef Framework_EventSetupRecordKey_h
0002 #define Framework_EventSetupRecordKey_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     Framework
0006 // Class  :     EventSetupRecordKey
0007 //
0008 /**\class EventSetupRecordKey EventSetupRecordKey.h FWCore/Framework/interface/EventSetupRecordKey.h
0009 
0010  Description: Key used to lookup a EventSetupRecord within the EventSetup
0011 
0012  Usage:
0013     <usage>
0014 
0015 */
0016 //
0017 // Author:      Chris Jones
0018 // Created:     Fri Mar 25 15:19:21 EST 2005
0019 //
0020 
0021 // system include files
0022 
0023 // user include files
0024 #include "FWCore/Framework/interface/HCTypeTag.h"
0025 #include "FWCore/Framework/interface/HCMethods.h"
0026 
0027 // forward declarations
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       //virtual ~EventSetupRecordKey();
0038 
0039       // ---------- const member functions ---------------------
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       // ---------- static member functions --------------------
0048       template <class T>
0049       static EventSetupRecordKey makeKey() {
0050         return eventsetup::heterocontainer::makeKey<T, EventSetupRecordKey>();
0051       }
0052 
0053       // ---------- member functions ---------------------------
0054 
0055     private:
0056       //EventSetupRecordKey(const EventSetupRecordKey&); // allow default
0057 
0058       //const EventSetupRecordKey& operator=(const EventSetupRecordKey&); // allow default
0059 
0060       // ---------- member data --------------------------------
0061       TypeTag type_;
0062     };
0063   }  // namespace eventsetup
0064 }  // namespace edm
0065 
0066 #endif