CMS 3D CMS Logo

EcalLiteDTUPedestalsESProducer.cc
Go to the documentation of this file.
1 #include <memory>
2 #include <string>
12 
13 //
14 // class declaration
15 //
16 
18 public:
20 
21  typedef std::unique_ptr<EcalLiteDTUPedestalsMap> ReturnType;
22 
24 
25 private:
30 };
31 
32 using namespace edm;
33 
35  std::string myname = p.getParameter<std::string>("ComponentName");
36  meanPedestalsGain10_ = p.getParameter<double>("MeanPedestalsGain10");
37  rmsPedestalsGain10_ = p.getParameter<double>("RMSPedestalsGain10");
38  meanPedestalsGain1_ = p.getParameter<double>("MeanPedestalsGain1");
39  rmsPedestalsGain1_ = p.getParameter<double>("RMSPedestalsGain1");
40  setWhatProduced(this);
41 }
44  const EcalLiteDTUPedestalsRcd& iRecord) {
45  auto prod = std::make_unique<EcalLiteDTUPedestalsMap>();
46 
47  for (unsigned int iChannel = 0; iChannel < ecalPh2::kEBChannels; iChannel++) {
48  EBDetId myEBDetId = EBDetId::unhashIndex(iChannel);
50  ped.setMean(0, meanPedestalsGain10_);
51  ped.setRMS(0, rmsPedestalsGain10_);
52 
53  ped.setMean(1, meanPedestalsGain1_);
54  ped.setRMS(1, rmsPedestalsGain1_);
55 
56  prod->insert(std::make_pair(myEBDetId, ped));
57  }
58 
59  return prod;
60 }
61 
62 //Define this as a plug-in
ESHandle.h
EcalLiteDTUPedestalsESProducer::meanPedestalsGain10_
double meanPedestalsGain10_
Definition: EcalLiteDTUPedestalsESProducer.cc:26
EcalLiteDTUPedestalsRcd
Definition: EcalLiteDTUPedestalsRcd.h:5
EBDetId
Definition: EBDetId.h:17
edm
HLT enums.
Definition: AlignableModifier.h:19
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
EBDetId::unhashIndex
static EBDetId unhashIndex(int hi)
get a DetId from a compact index for arrays
Definition: EBDetId.h:110
EcalLiteDTUPedestals
Definition: EcalLiteDTUPedestals.h:8
ESProducer.h
EcalLiteDTUPedestalsRcd.h
EcalLiteDTUPedestalsESProducer
Definition: EcalLiteDTUPedestalsESProducer.cc:17
EcalLiteDTUPedestals.h
dumpMFGeometry_cfg.prod
prod
Definition: dumpMFGeometry_cfg.py:24
EcalLiteDTUPedestalsESProducer::EcalLiteDTUPedestalsESProducer
EcalLiteDTUPedestalsESProducer(const edm::ParameterSet &p)
Definition: EcalLiteDTUPedestalsESProducer.cc:34
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:47
EcalLiteDTUPedestalsESProducer::ReturnType
std::unique_ptr< EcalLiteDTUPedestalsMap > ReturnType
Definition: EcalLiteDTUPedestalsESProducer.cc:21
EcalLiteDTUPedestalsESProducer::rmsPedestalsGain10_
double rmsPedestalsGain10_
Definition: EcalLiteDTUPedestalsESProducer.cc:27
EcalConstants.h
EcalLiteDTUPedestalsESProducer::meanPedestalsGain1_
double meanPedestalsGain1_
Definition: EcalLiteDTUPedestalsESProducer.cc:28
EcalLiteDTUPedestalsESProducer::produce
ReturnType produce(const EcalLiteDTUPedestalsRcd &iRecord)
Definition: EcalLiteDTUPedestalsESProducer.cc:43
EcalLiteDTUPedestals::setMean
int setMean(unsigned int i, float value)
Definition: EcalLiteDTUPedestals.h:10
ModuleFactory.h
EcalLiteDTUPedestals::setRMS
int setRMS(unsigned int i, float value)
Definition: EcalLiteDTUPedestals.h:18
EcalLiteDTUPedestalsESProducer::rmsPedestalsGain1_
double rmsPedestalsGain1_
Definition: EcalLiteDTUPedestalsESProducer.cc:29
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
edm::ESProducer
Definition: ESProducer.h:104
ESProductHost.h
ParameterSet.h
ecalPh2::kEBChannels
static constexpr unsigned int kEBChannels
Definition: EcalConstants.h:15
classes.h