CMS 3D CMS Logo

EcalCATIAGainRatiosESProducer.cc
Go to the documentation of this file.
1 #include <memory>
2 #include <string>
12 //
13 // class declaration
14 //
16 
18 public:
20 
21  typedef std::unique_ptr<EcalCATIAGainRatios> ReturnType;
22 
24 
25 private:
27 };
28 
29 using namespace edm;
30 
32  std::string myname = p.getParameter<std::string>("ComponentName");
33  catiaGainRatio_ = p.getParameter<double>("CATIAGainRatio");
34  setWhatProduced(this);
35 }
38  auto prod = std::make_unique<EcalCATIAGainRatios>();
39  for (int iChannel = 0; iChannel < kEBChannels; iChannel++) {
40  EBDetId myEBDetId = EBDetId::unhashIndex(iChannel);
41  double val = catiaGainRatio_;
42  prod->setValue(myEBDetId.rawId(), val);
43  }
44 
45  return prod;
46 }
47 
48 //Define this as a plug-in
ESHandle.h
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
ESProducer.h
EcalCATIAGainRatiosRcd.h
EcalCATIAGainRatiosRcd
Definition: EcalCATIAGainRatiosRcd.h:5
dumpMFGeometry_cfg.prod
prod
Definition: dumpMFGeometry_cfg.py:24
EcalCATIAGainRatiosESProducer
Definition: EcalCATIAGainRatiosESProducer.cc:17
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EcalCATIAGainRatiosESProducer::catiaGainRatio_
double catiaGainRatio_
Definition: EcalCATIAGainRatiosESProducer.cc:26
EcalCATIAGainRatiosESProducer::ReturnType
std::unique_ptr< EcalCATIAGainRatios > ReturnType
Definition: EcalCATIAGainRatiosESProducer.cc:21
edm::ParameterSet
Definition: ParameterSet.h:47
EcalCATIAGainRatios.h
kEBChannels
const int kEBChannels
Definition: EcalCATIAGainRatiosESProducer.cc:15
ModuleFactory.h
heppy_batch.val
val
Definition: heppy_batch.py:351
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
EcalCATIAGainRatiosESProducer::produce
ReturnType produce(const EcalCATIAGainRatiosRcd &iRecord)
Definition: EcalCATIAGainRatiosESProducer.cc:37
EcalCATIAGainRatiosESProducer::EcalCATIAGainRatiosESProducer
EcalCATIAGainRatiosESProducer(const edm::ParameterSet &p)
Definition: EcalCATIAGainRatiosESProducer.cc:31
edm::ESProducer
Definition: ESProducer.h:104
ESProductHost.h
ParameterSet.h
ecalPh2::kEBChannels
static constexpr unsigned int kEBChannels
Definition: EcalConstants.h:15
classes.h