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  virtual const T* getImpl() const {
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&); // stop default
63 
64  const ESOutlet& operator=(const ESOutlet&); // stop default
65 
66  // ---------- member data --------------------------------
68  };
69 } // namespace edm
70 
71 #endif
virtual const T * getImpl() const
Definition: ESOutlet.h:41
Getter getter_
Definition: ESOutlet.h:67
void setGetter(extensioncord::ECGetterBase< T > *iGetter)
Definition: OutletBase.h:34
Getter(const edm::EventSetup &iES, const std::string &iLabel=std::string())
Definition: ESOutlet.h:38
ESOutlet(const edm::EventSetup &iES, ExtensionCord< T > &iCord)
Definition: ESOutlet.h:51
ESOutlet(const edm::EventSetup &iES, const std::string &iLabel, ExtensionCord< T > &iCord)
Definition: ESOutlet.h:55
const ESOutlet & operator=(const ESOutlet &)
HLT enums.
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
long double T
const std::string label_
Definition: ESOutlet.h:47
const edm::EventSetup * es_
Definition: ESOutlet.h:46