Implements edm::one::EDAnalyzerBase.
Definition at line 59 of file modGains.cc.
66 std::ifstream inStream(
fileIn.c_str());
75 std::ifstream inCorr(
fileCorr.c_str());
82 std::vector<DetId>
channels = gainsIn.getAllChannels();
92 if (corrsIn.exists(
id)) {
93 val = corrsIn.getValues(
id)->getValue();
96 std::cerr <<
"Vector operation, " <<
i <<
"th channel: using val=" <<
val << std::endl;
99 std::unique_ptr<HcalGain> p_item;
101 p_item = std::make_unique<HcalGain>(
id,
102 gainsIn.getValues(
id)->getValue(0) +
val,
103 gainsIn.getValues(
id)->getValue(1) +
val,
104 gainsIn.getValues(
id)->getValue(2) +
val,
105 gainsIn.getValues(
id)->getValue(3) +
val);
108 p_item = std::make_unique<HcalGain>(
id,
109 gainsIn.getValues(
id)->getValue(0) -
val,
110 gainsIn.getValues(
id)->getValue(1) -
val,
111 gainsIn.getValues(
id)->getValue(2) -
val,
112 gainsIn.getValues(
id)->getValue(3) -
val);
115 p_item = std::make_unique<HcalGain>(
id,
116 gainsIn.getValues(
id)->getValue(0) *
val,
117 gainsIn.getValues(
id)->getValue(1) *
val,
118 gainsIn.getValues(
id)->getValue(2) *
val,
119 gainsIn.getValues(
id)->getValue(3) *
val);
122 p_item = std::make_unique<HcalGain>(
id,
123 gainsIn.getValues(
id)->getValue(0) /
val,
124 gainsIn.getValues(
id)->getValue(1) /
val,
125 gainsIn.getValues(
id)->getValue(2) /
val,
126 gainsIn.getValues(
id)->getValue(3) /
val);
130 gainsOut.addValues(*p_item);
134 std::ofstream outStream(
fileOut.c_str());
References HcalCondObjectContainer< Item >::addValues(), beam_dqm_sourceclient-live_cfg::cerr, ewkTauDQM_cfi::channels, HcalDbASCIIIO::dumpObject(), HcalCondObjectContainer< Item >::exists(), fileCorr, fileIn, fileOut, edm::EventSetup::get(), get, HcalDbASCIIIO::getObject(), HcalRespCorr::getValue(), HcalCondObjectContainer< Item >::getValues(), mps_fire::i, s_operation, val, and vectorop.