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
const int kEBChannels
std::unique_ptr< EcalCATIAGainRatios > ReturnType
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:61
static constexpr unsigned int kEBChannels
Definition: EcalConstants.h:39
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
EcalCATIAGainRatiosESProducer(const edm::ParameterSet &p)
static EBDetId unhashIndex(int hi)
get a DetId from a compact index for arrays
Definition: EBDetId.h:110
HLT enums.
ReturnType produce(const EcalCATIAGainRatiosRcd &iRecord)