test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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  {
37  class Getter : public extensioncord::ECGetterBase<T> {
38 public:
39  Getter(const edm::EventSetup& iES,
40  const std::string& iLabel = std::string()) :
41  es_(&iES),
42  label_(iLabel) {}
43 private:
44  virtual const T* getImpl() const {
46  es_->template get<TRec>().get(label_,data);
47  return &(*data);
48  }
51  };
52 
53 
54  public:
56  ExtensionCord<T>& iCord):
57  OutletBase<T>(iCord),
58  getter_(iES) {
59  this->setGetter(&getter_);
60  }
61 
63  const std::string& iLabel,
64  ExtensionCord<T>& iCord):
65  getter_(iES,iLabel) {
66  this->setGetter( &getter_);
67  }
68 
69  //virtual ~ESOutlet();
70 
71  private:
72  ESOutlet(const ESOutlet&); // stop default
73 
74  const ESOutlet& operator=(const ESOutlet&); // stop default
75 
76  // ---------- member data --------------------------------
78 
79  };
80 }
81 
82 #endif
virtual const T * getImpl() const
Definition: ESOutlet.h:44
Getter getter_
Definition: ESOutlet.h:77
void setGetter(extensioncord::ECGetterBase< T > *iGetter)
Definition: OutletBase.h:36
Getter(const edm::EventSetup &iES, const std::string &iLabel=std::string())
Definition: ESOutlet.h:39
ESOutlet(const edm::EventSetup &iES, ExtensionCord< T > &iCord)
Definition: ESOutlet.h:55
ESOutlet(const edm::EventSetup &iES, const std::string &iLabel, ExtensionCord< T > &iCord)
Definition: ESOutlet.h:62
const ESOutlet & operator=(const ESOutlet &)
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
long double T
const std::string label_
Definition: ESOutlet.h:50
const edm::EventSetup * es_
Definition: ESOutlet.h:49