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 // $Id: ESOutlet.h,v 1.1 2006/09/22 19:54:49 chrjones Exp $
22 //
23 
24 // system include files
25 #include <string>
26 
27 // user include files
31 
32 // forward declarations
33 
34 namespace edm {
35  template <class T, class TRec>
36  class ESOutlet :private OutletBase<T>
37  {
38  class Getter : public extensioncord::ECGetterBase<T> {
39 public:
40  Getter(const edm::EventSetup& iES,
41  const std::string& iLabel = std::string()) :
42  es_(&iES),
43  label_(iLabel) {}
44 private:
45  virtual const T* getImpl() const {
47  es_->template get<TRec>().get(label_,data);
48  return &(*data);
49  }
52  };
53 
54 
55  public:
57  ExtensionCord<T>& iCord):
58  OutletBase<T>(iCord),
59  getter_(iES) {
60  this->setGetter(&getter_);
61  }
62 
64  const std::string& iLabel,
65  ExtensionCord<T>& iCord):
66  getter_(iES,iLabel) {
67  this->setGetter( &getter_);
68  }
69 
70  //virtual ~ESOutlet();
71 
72  private:
73  ESOutlet(const ESOutlet&); // stop default
74 
75  const ESOutlet& operator=(const ESOutlet&); // stop default
76 
77  // ---------- member data --------------------------------
79 
80  };
81 }
82 
83 #endif
virtual const T * getImpl() const
Definition: ESOutlet.h:45
Getter getter_
Definition: ESOutlet.h:78
void setGetter(extensioncord::ECGetterBase< T > *iGetter)
Definition: OutletBase.h:37
Getter(const edm::EventSetup &iES, const std::string &iLabel=std::string())
Definition: ESOutlet.h:40
ESOutlet(const edm::EventSetup &iES, ExtensionCord< T > &iCord)
Definition: ESOutlet.h:56
ESOutlet(const edm::EventSetup &iES, const std::string &iLabel, ExtensionCord< T > &iCord)
Definition: ESOutlet.h:63
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:51
const edm::EventSetup * es_
Definition: ESOutlet.h:50