CMS 3D CMS Logo

ESOutlet.h
Go to the documentation of this file.
1 #ifndef Framework_ESOutlet_h
2 #define Framework_ESOutlet_h
3 // -*- C++ -*-
4 //
5 // Package: Framework
6 // Class : ESOutlet
7 //
18 //
19 // Original Author: Chris Jones
20 // Created: Fri Sep 22 15:07:28 EDT 2006
21 //
22 
23 // system include files
24 #include <string>
25 
26 // user include files
30 
31 // forward declarations
32 
33 namespace edm {
34  template <class T, class TRec>
35  class ESOutlet : private OutletBase<T> {
36  class Getter : public extensioncord::ECGetterBase<T> {
37  public:
38  Getter(const edm::EventSetup& iES, const std::string& iLabel = std::string()) : es_(&iES), label_(iLabel) {}
39 
40  private:
41  const T* getImpl() const override {
43  es_->template get<TRec>().get(label_, data);
44  return &(*data);
45  }
48  };
49 
50  public:
51  ESOutlet(const edm::EventSetup& iES, ExtensionCord<T>& iCord) : OutletBase<T>(iCord), getter_(iES) {
52  this->setGetter(&getter_);
53  }
54 
55  ESOutlet(const edm::EventSetup& iES, const std::string& iLabel, ExtensionCord<T>& iCord) : getter_(iES, iLabel) {
56  this->setGetter(&getter_);
57  }
58 
59  //virtual ~ESOutlet();
60 
61  private:
62  ESOutlet(const ESOutlet&) = delete; // stop default
63 
64  const ESOutlet& operator=(const ESOutlet&) = delete; // stop default
65 
66  // ---------- member data --------------------------------
68  };
69 } // namespace edm
70 
71 #endif
ESHandle.h
OutletBase.h
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::extensioncord::ECGetterBase
Definition: ECGetterBase.h:29
edm::ESOutlet::Getter::getImpl
const T * getImpl() const override
Definition: ESOutlet.h:41
edm::ESOutlet
Definition: ESOutlet.h:35
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
edm::ESOutlet::Getter::Getter
Getter(const edm::EventSetup &iES, const std::string &iLabel=std::string())
Definition: ESOutlet.h:38
edm::ESHandle
Definition: DTSurvey.h:22
edm::ExtensionCord
Definition: ExtensionCord.h:35
edm::ESOutlet::operator=
const ESOutlet & operator=(const ESOutlet &)=delete
edm::OutletBase::setGetter
void setGetter(extensioncord::ECGetterBase< T > *iGetter)
Definition: OutletBase.h:34
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ESOutlet::Getter::es_
const edm::EventSetup * es_
Definition: ESOutlet.h:46
edm::ESOutlet::ESOutlet
ESOutlet(const edm::EventSetup &iES, const std::string &iLabel, ExtensionCord< T > &iCord)
Definition: ESOutlet.h:55
edm::ESOutlet::getter_
Getter getter_
Definition: ESOutlet.h:67
edm::ESOutlet::ESOutlet
ESOutlet(const edm::EventSetup &iES, ExtensionCord< T > &iCord)
Definition: ESOutlet.h:51
edm::EventSetup
Definition: EventSetup.h:57
edm::ESOutlet::Getter
Definition: ESOutlet.h:36
edm::OutletBase
Definition: ExtensionCord.h:32
T
long double T
Definition: Basic3DVectorLD.h:48
edm::ESOutlet::Getter::label_
const std::string label_
Definition: ESOutlet.h:47
EventSetup.h
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79