CalibTracker
SiStripESProducers
src
SiStripGainESSource.cc
Go to the documentation of this file.
1
#include "
CalibTracker/SiStripESProducers/interface/SiStripGainESSource.h
"
2
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
3
#include "
DataFormats/SiStripCommon/interface/SiStripConstants.h
"
4
#include "
CondFormats/SiStripObjects/interface/SiStripApvGain.h
"
5
#include "
CondFormats/DataRecord/interface/SiStripApvGainRcd.h
"
6
#include <iostream>
7
8
using namespace
sistrip
;
9
10
// -----------------------------------------------------------------------------
11
//
12
SiStripGainESSource::SiStripGainESSource
(
const
edm::ParameterSet
&
pset
) {
13
setWhatProduced(
this
);
14
findingRecord<SiStripApvGainRcd>();
15
}
16
17
// -----------------------------------------------------------------------------
18
//
19
std::unique_ptr<SiStripApvGain>
SiStripGainESSource::produce
(
const
SiStripApvGainRcd
&) {
20
SiStripApvGain
*
gain
=
makeGain
();
21
22
if
(!
gain
) {
23
edm::LogWarning
(
mlESSources_
) <<
"[SiStripGainESSource::"
<< __func__ <<
"]"
24
<<
" Null pointer to SiStripApvGain object!"
;
25
}
26
27
std::unique_ptr<SiStripApvGain> ptr(
gain
);
28
return
ptr;
29
}
30
31
// -----------------------------------------------------------------------------
32
//
33
void
SiStripGainESSource::setIntervalFor
(
const
edm::eventsetup::EventSetupRecordKey
&,
34
const
edm::IOVSyncValue
& iosv,
35
edm::ValidityInterval
& oValidity) {
36
edm::ValidityInterval
infinity
(iosv.
beginOfTime
(), iosv.
endOfTime
());
37
oValidity =
infinity
;
38
}
MessageLogger.h
CastorDbHardcode::makeGain
CastorGain makeGain(HcalGenericDetId fId, bool fSmear=false)
Definition:
CastorDbHardcode.cc:47
SiStripGainESSource::produce
virtual std::unique_ptr< SiStripApvGain > produce(const SiStripApvGainRcd &)
Definition:
SiStripGainESSource.cc:19
SiStripGainESSource::setIntervalFor
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
Definition:
SiStripGainESSource.cc:33
edm::ValidityInterval
Definition:
ValidityInterval.h:28
SiStripApvGainRcd.h
infinity
const double infinity
Definition:
CSCChamberFitter.cc:10
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition:
MessageLogger.h:122
edm::eventsetup::EventSetupRecordKey
Definition:
EventSetupRecordKey.h:30
SiStripGainESSource::SiStripGainESSource
SiStripGainESSource(const edm::ParameterSet &)
Definition:
SiStripGainESSource.cc:12
SiStripApvGain.h
edm::IOVSyncValue
Definition:
IOVSyncValue.h:31
SiStripConstants.h
edm::ParameterSet
Definition:
ParameterSet.h:47
edm::IOVSyncValue::endOfTime
static const IOVSyncValue & endOfTime()
Definition:
IOVSyncValue.cc:82
SiStripGainESSource.h
SiStripApvGainRcd
Definition:
SiStripCondDataRecords.h:8
PedestalClient_cfi.gain
gain
Definition:
PedestalClient_cfi.py:37
sistrip::mlESSources_
static const char mlESSources_[]
Definition:
ConstantsForLogger.h:21
edm::IOVSyncValue::beginOfTime
static const IOVSyncValue & beginOfTime()
Definition:
IOVSyncValue.cc:88
sistrip
sistrip classes
Definition:
SiStripQualityHelpers.h:14
SiStripApvGain
Definition:
SiStripApvGain.h:25
muonDTDigis_cfi.pset
pset
Definition:
muonDTDigis_cfi.py:27
Generated for CMSSW Reference Manual by
1.8.16