25 typedef std::vector<edm::ParameterSet>
Parameters;
27 for (Parameters::iterator itToPut =
toPut.begin(); itToPut !=
toPut.end(); ++itToPut) {
30 since_.push_back(itToPut->getUntrackedParameter<
unsigned int>(
"since"));
37 edm::LogError(
"StoreESCondition") <<
"PoolDBOutputService is unavailable"
42 bool toAppend =
false;
45 size_t messageSize = message.size() + 1;
46 char* messChar =
new char[messageSize];
47 strncpy(messChar, message.c_str(), messageSize);
69 edm::LogInfo(
"StoreESCondition") <<
" ESChannelStatus file read "
88 myintercalib, newTime, mydbservice->
endOfTime(),
"ESIntercalibConstantsRcd");
96 myintercalib, newTime, mydbservice->
endOfTime(),
"ESTimeSampleWeightsRcd");
107 }
else if (
objectName_[
i] ==
"ESMissingEnergyCalibration") {
111 myintercalib, newTime, mydbservice->
endOfTime(),
"ESMissingEnergyCalibrationRcd");
114 myintercalib, newTime,
"ESMissingEnergyCalibrationRcd");
120 myintercalib, newTime, mydbservice->
endOfTime(),
"ESRecHitRatioCutsRcd");
138 }
else if (
objectName_[
i] ==
"ESEEIntercalibConstants") {
142 myintercalib, newTime, mydbservice->
endOfTime(),
"ESEEIntercalibConstantsRcd");
176 strcpy(appendMode,
"append");
178 strcpy(appendMode,
"create");
203 timeinfo = localtime(&rawtime);
205 strcpy(
user, getlogin());
206 strcpy(
header, asctime(timeinfo));
213 ESThresholdsFile >> ts2;
214 ESThresholdsFile >> zs;
222 float gammaLow0, alphaLow0, gammaHigh0, alphaHigh0, gammaLow1, alphaLow1, gammaHigh1, alphaHigh1, gammaLow2,
223 alphaLow2, gammaHigh2, alphaHigh2, gammaLow3, alphaLow3, gammaHigh3, alphaHigh3;
229 ESEEIntercalibFile >> gammaLow0;
230 ESEEIntercalibFile >> alphaLow0;
231 ESEEIntercalibFile >> gammaHigh0;
232 ESEEIntercalibFile >> alphaHigh0;
233 ESEEIntercalibFile >> gammaLow1;
234 ESEEIntercalibFile >> alphaLow1;
235 ESEEIntercalibFile >> gammaHigh1;
236 ESEEIntercalibFile >> alphaHigh1;
237 ESEEIntercalibFile >> gammaLow2;
238 ESEEIntercalibFile >> alphaLow2;
239 ESEEIntercalibFile >> gammaHigh2;
240 ESEEIntercalibFile >> alphaHigh2;
241 ESEEIntercalibFile >> gammaLow3;
242 ESEEIntercalibFile >> alphaLow3;
243 ESEEIntercalibFile >> gammaHigh3;
244 ESEEIntercalibFile >> alphaHigh3;
262 return eseeIntercalibConstants;
267 float ConstAEta0, ConstBEta0, ConstAEta1, ConstBEta1, ConstAEta2, ConstBEta2, ConstAEta3, ConstBEta3;
268 ESMissingEnergyFile >> ConstAEta0;
269 ESMissingEnergyFile >> ConstBEta0;
270 ESMissingEnergyFile >> ConstAEta1;
271 ESMissingEnergyFile >> ConstBEta1;
272 ESMissingEnergyFile >> ConstAEta2;
273 ESMissingEnergyFile >> ConstBEta2;
274 ESMissingEnergyFile >> ConstAEta3;
275 ESMissingEnergyFile >> ConstBEta3;
277 ConstAEta0, ConstBEta0, ConstAEta1, ConstBEta1, ConstAEta2, ConstBEta2, ConstAEta3, ConstBEta3);
279 return esMissingEnergy;
295 int iz, ip, ix, iy, is, ped_,
zside;
298 for (
int i = 0;
i < 137216; ++
i) {
299 pedestalFile >> iz >> ip >> ix >> iy >> is >> ped_;
301 zside = (iz == -1) ? 1 : 0;
302 ped[
zside][ip - 1][ix - 1][iy - 1][is - 1] = ped_;
305 for (
int iz = -1; iz <= 1; ++iz) {
308 zside = (iz == -1) ? 1 : 0;
315 ESitem.
mean = ped[
zside][iplane - 1][ix - 1][iy - 1][istrip - 1];
319 ESDetId esId(istrip, ix, iy, iplane, iz);
320 esPedestals->
insert(std::make_pair(esId.
rawId(), ESitem));
331 float r12Low, r23Low, r12High, r23High;
332 ESRecHitRatioCutsFile >> r12Low;
333 ESRecHitRatioCutsFile >> r23Low;
334 ESRecHitRatioCutsFile >> r12High;
335 ESRecHitRatioCutsFile >> r23High;
348 return esRecHitRatioCuts;
366 for (
int k = 0;
k < 3; ++
k) {
370 edm::LogInfo(
"StoreESCondition") <<
"weight : " <<
k <<
" " <<
w[
k] <<
"\n";
382 for (
int i = 0;
i < 137216; ++
i) {
383 int iz, ip, ix, iy, is;
385 mipFile >> iz >> ip >> ix >> iy >> is >> mip;
392 if (mip < 20 || mip > 70)
393 edm::LogInfo(
"StoreESCondition") << iz <<
" " << ip <<
" " << ix <<
" " << iy <<
" " << is <<
" " << mip
397 ESDetId esId(is, ix, iy, ip, iz);
406 int z[1000],
p[1000],
x[1000],
y[1000], nsensors;
408 statusFile >> nsensors;
409 edm::LogInfo(
"StoreESCondition") <<
" nsensors " << nsensors <<
"\n";
410 if (nsensors >= 1000) {
411 edm::LogInfo(
"StoreESCondition") <<
" *** value too high, modify the method!***"
415 for (
int i = 0;
i < nsensors; ++
i) {
416 statusFile >>
z[
i] >>
p[
i] >>
x[
i] >>
y[
i];
419 int Nbstatus = 0, Nbstrip = 0;
423 for (
int iplane = 1; iplane <= 2; iplane++) {
424 for (
int izeta = -1; izeta <= 1; izeta = izeta + 2) {
432 ESDetId anESId(istrip, ix, iy, iplane, izeta);
436 for (
int i = 0;
i < nsensors; ++
i) {
437 if (izeta ==
z[
i] && iplane ==
p[
i] && ix ==
x[
i] && iy ==
y[
i])
443 edm::LogInfo(
"StoreESCondition") <<
" Bad channel ix " << ix <<
" iy " << iy <<
" iplane " << iplane
444 <<
" iz " << izeta <<
"\n";
455 edm::LogInfo(
"StoreESCondition") <<
" Nb of strips " << Nbstrip <<
" Number of bad channels " << Nbstatus <<
"\n";