CalibTracker
SiStripESProducers
plugins
fake
SiStripTemplateEmptyFakeESSource.h
Go to the documentation of this file.
1
#ifndef CalibTracker_SiStripESProducers_SiStripTemplateEmptyFakeESSource
2
#define CalibTracker_SiStripESProducers_SiStripTemplateEmptyFakeESSource
3
4
// system include files
5
#include <memory>
6
7
// user include files
8
#include "
FWCore/Framework/interface/ModuleFactory.h
"
9
#include "
FWCore/Framework/interface/ESProducer.h
"
10
11
#include "
FWCore/Framework/interface/EventSetupRecordIntervalFinder.h
"
12
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
13
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
14
15
//
16
// class declaration
17
//
18
19
template
<
typename
TObject,
typename
TRecord>
20
class
SiStripTemplateEmptyFakeESSource
:
public
edm::ESProducer
,
public
edm::EventSetupRecordIntervalFinder
{
21
public
:
22
SiStripTemplateEmptyFakeESSource
(
const
edm::ParameterSet
&);
23
~SiStripTemplateEmptyFakeESSource
()
override
{};
24
25
std::unique_ptr<TObject>
produce
(
const
TRecord&);
26
27
private
:
28
void
setIntervalFor
(
const
edm::eventsetup::EventSetupRecordKey
&,
29
const
edm::IOVSyncValue
& iov,
30
edm::ValidityInterval
& iValidity)
override
;
31
32
SiStripTemplateEmptyFakeESSource
(
const
SiStripTemplateEmptyFakeESSource
&) =
delete
;
33
const
SiStripTemplateEmptyFakeESSource
&
operator=
(
const
SiStripTemplateEmptyFakeESSource
&) =
delete
;
34
};
35
36
template
<
typename
TObject,
typename
TRecord>
37
SiStripTemplateEmptyFakeESSource<TObject, TRecord>::SiStripTemplateEmptyFakeESSource
(
const
edm::ParameterSet
& iConfig) {
38
setWhatProduced(
this
);
39
findingRecord<TRecord>();
40
}
41
42
template
<
typename
TObject,
typename
TRecord>
43
std::unique_ptr<TObject>
SiStripTemplateEmptyFakeESSource<TObject, TRecord>::produce
(
const
TRecord& iRecord) {
44
return
std::make_unique<TObject>();
45
}
46
47
template
<
typename
TObject,
typename
TRecord>
48
void
SiStripTemplateEmptyFakeESSource<TObject, TRecord>::setIntervalFor
(
const
edm::eventsetup::EventSetupRecordKey
&,
49
const
edm::IOVSyncValue
& iov,
50
edm::ValidityInterval
& iValidity) {
51
edm::ValidityInterval
infinity
(iov.
beginOfTime
(), iov.
endOfTime
());
52
iValidity =
infinity
;
53
}
54
55
#endif
SiStripTemplateEmptyFakeESSource
Definition:
SiStripTemplateEmptyFakeESSource.h:20
MessageLogger.h
SiStripTemplateEmptyFakeESSource::~SiStripTemplateEmptyFakeESSource
~SiStripTemplateEmptyFakeESSource() override
Definition:
SiStripTemplateEmptyFakeESSource.h:23
SiStripTemplateEmptyFakeESSource::operator=
const SiStripTemplateEmptyFakeESSource & operator=(const SiStripTemplateEmptyFakeESSource &)=delete
edm::ValidityInterval
Definition:
ValidityInterval.h:28
ESProducer.h
infinity
const double infinity
Definition:
CSCChamberFitter.cc:10
edm::EventSetupRecordIntervalFinder
Definition:
EventSetupRecordIntervalFinder.h:33
edm::eventsetup::EventSetupRecordKey
Definition:
EventSetupRecordKey.h:30
SiStripTemplateEmptyFakeESSource::produce
std::unique_ptr< TObject > produce(const TRecord &)
Definition:
SiStripTemplateEmptyFakeESSource.h:43
edm::IOVSyncValue
Definition:
IOVSyncValue.h:31
EventSetupRecordIntervalFinder.h
edm::ParameterSet
Definition:
ParameterSet.h:47
edm::IOVSyncValue::endOfTime
static const IOVSyncValue & endOfTime()
Definition:
IOVSyncValue.cc:82
SiStripTemplateEmptyFakeESSource::SiStripTemplateEmptyFakeESSource
SiStripTemplateEmptyFakeESSource(const edm::ParameterSet &)
Definition:
SiStripTemplateEmptyFakeESSource.h:37
ModuleFactory.h
SiStripTemplateEmptyFakeESSource::setIntervalFor
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &iov, edm::ValidityInterval &iValidity) override
Definition:
SiStripTemplateEmptyFakeESSource.h:48
edm::IOVSyncValue::beginOfTime
static const IOVSyncValue & beginOfTime()
Definition:
IOVSyncValue.cc:88
edm::ESProducer
Definition:
ESProducer.h:104
ParameterSet.h
Generated for CMSSW Reference Manual by
1.8.16