CalibMuon
CSCCalibration
plugins
CSCGainsDBConditions.cc
Go to the documentation of this file.
1
#include <fstream>
2
#include <memory>
3
4
#include "
CalibMuon/CSCCalibration/interface/CSCGainsDBConditions.h
"
5
#include "
CondFormats/CSCObjects/interface/CSCDBGains.h
"
6
#include "
CondFormats/DataRecord/interface/CSCDBGainsRcd.h
"
7
8
CSCGainsDBConditions::CSCGainsDBConditions
(
const
edm::ParameterSet
&iConfig) {
9
// the following line is needed to tell the framework what
10
// data is being produced
11
// added by Zhen (changed since 1_2_0)
12
setWhatProduced
(
this
, &
CSCGainsDBConditions::produceDBGains
);
13
findingRecord<CSCDBGainsRcd>();
14
// now do what ever other initialization is needed
15
}
16
17
CSCGainsDBConditions::~CSCGainsDBConditions
() {
18
// do anything here that needs to be done at desctruction time
19
// (e.g. close files, deallocate resources etc.)
20
}
21
22
//
23
// member functions
24
//
25
26
// ------------ method called to produce the data ------------
27
CSCGainsDBConditions::ReturnType
CSCGainsDBConditions::produceDBGains
(
const
CSCDBGainsRcd
&iRecord) {
28
// need a new object so to not be deleted at exit
29
return
CSCGainsDBConditions::ReturnType
(
prefillDBGains
());
30
}
31
32
void
CSCGainsDBConditions::setIntervalFor
(
const
edm::eventsetup::EventSetupRecordKey
&,
33
const
edm::IOVSyncValue
&,
34
edm::ValidityInterval
&oValidity) {
35
oValidity =
edm::ValidityInterval
(
edm::IOVSyncValue::beginOfTime
(),
edm::IOVSyncValue::endOfTime
());
36
}
CSCGainsDBConditions::CSCGainsDBConditions
CSCGainsDBConditions(const edm::ParameterSet &)
Definition:
CSCGainsDBConditions.cc:8
CSCGainsDBConditions.h
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition:
ESProducer.h:138
edm::ValidityInterval
Definition:
ValidityInterval.h:28
CSCGainsDBConditions::~CSCGainsDBConditions
~CSCGainsDBConditions() override
Definition:
CSCGainsDBConditions.cc:17
edm::eventsetup::EventSetupRecordKey
Definition:
EventSetupRecordKey.h:30
CSCGainsDBConditions::prefillDBGains
static CSCDBGains * prefillDBGains()
Definition:
CSCGainsDBConditions.h:44
edm::IOVSyncValue
Definition:
IOVSyncValue.h:31
edm::ParameterSet
Definition:
ParameterSet.h:36
edm::IOVSyncValue::endOfTime
static const IOVSyncValue & endOfTime()
Definition:
IOVSyncValue.cc:82
cond::ValidityInterval
std::pair< Time_t, Time_t > ValidityInterval
Definition:
Time.h:17
CSCGainsDBConditions::produceDBGains
ReturnType produceDBGains(const CSCDBGainsRcd &)
Definition:
CSCGainsDBConditions.cc:27
CSCGainsDBConditions::setIntervalFor
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
Definition:
CSCGainsDBConditions.cc:32
CSCDBGainsRcd.h
edm::IOVSyncValue::beginOfTime
static const IOVSyncValue & beginOfTime()
Definition:
IOVSyncValue.cc:88
CSCDBGainsRcd
Definition:
CSCDBGainsRcd.h:5
CSCGainsDBConditions::ReturnType
std::unique_ptr< CSCDBGains > ReturnType
Definition:
CSCGainsDBConditions.h:27
CSCDBGains.h
Generated for CMSSW Reference Manual by
1.8.16