CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SiStripTemplateDepFakeESSource.h
Go to the documentation of this file.
1 #ifndef CalibTracker_SiStripESProducers_SiStripTemplateDepFakeESSource
2 #define CalibTracker_SiStripESProducers_SiStripTemplateDepFakeESSource
3 
4 // system include files
5 #include <memory>
6 #include "boost/shared_ptr.hpp"
7 
8 // user include files
12 
14 
18 
19 //
20 // class declaration
21 //
22 
23 template< typename TObject , typename TRecord, typename TService, typename DepTRecord, typename DepTObj>
25  public:
28 
29 
30  std::auto_ptr<TObject> produce(const TRecord&);
31 
32 private:
33 
35  const edm::IOVSyncValue& iov,
36  edm::ValidityInterval& iValidity);
37 
40 };
41 
42 template< typename TObject , typename TRecord, typename TService, typename DepTRecord, typename DepTObj>
44 {
45  setWhatProduced(this);
46  findingRecord<TRecord>();
47 }
48 
49 template< typename TObject , typename TRecord, typename TService, typename DepTRecord, typename DepTObj>
51 {
52  edm::ESHandle<DepTObj> depObjHandle;
53  iRecord.template getRecord<DepTRecord>().get(depObjHandle);
54  const DepTObj* const depObject = depObjHandle.product();
55 
56  edm::Service<TService> condObjBuilder;
57  TObject *obj=0;
58  condObjBuilder->getObj(obj,depObject);
59  std::auto_ptr<TObject> ptr(obj);
60  return ptr;
61 }
62 
63 template< typename TObject , typename TRecord, typename TService, typename DepTRecord, typename DepTObj>
65  const edm::IOVSyncValue& iov,
66  edm::ValidityInterval& iValidity){
68  iValidity = infinity;
69 }
70 
71 
72 #endif
static const IOVSyncValue & endOfTime()
Definition: IOVSyncValue.cc:97
std::auto_ptr< TObject > produce(const TRecord &)
tuple iov
Definition: o2o.py:307
static const IOVSyncValue & beginOfTime()
const double infinity
T const * product() const
Definition: ESHandle.h:86
const SiStripTemplateDepFakeESSource & operator=(const SiStripTemplateDepFakeESSource &)
SiStripTemplateDepFakeESSource(const edm::ParameterSet &)
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &iov, edm::ValidityInterval &iValidity)