Implements popcon::PopConSourceHandler< EcalLaserAPDPNRatios >.
Definition at line 23 of file EcalLaser_weekly_Handler.cc.
27 const size_t nLmes = 92;
33 std::cout <<
"------- Ecal -> getNewObjects\n";
35 unsigned long long max_since = 1;
42 Tm max_since_tm(max_since);
47 std::cout <<
"payload->getLaserMap(): OK " << std::endl;
48 std::cout <<
"Its size is " << laserRatiosMap.
size() << std::endl;
50 std::cout <<
"payload->getTimeMap(): OK " << std::endl;
51 std::cout <<
"Last Object in Offline DB has SINCE = " << max_since <<
" -> " << max_since_tm.cmsNanoSeconds() <<
" ("
52 << max_since_tm <<
")"
56 for (
int i = 0;
i < 92;
i++) {
63 std::cout <<
"WOW: we just retrieved the last valid record from DB " << std::endl;
72 std::cout <<
" which input IOV do you want " << std::endl;
75 std::ostringstream oss;
78 fWeek.open(
fname.c_str());
79 if (!fWeek.is_open()) {
80 std::cout <<
"ERROR : can't open file 'weekly_" << oss.str() << std::endl;
83 std::cout <<
" file weekly_" << oss.str() <<
" opened" << std::endl;
86 std::ifstream fRunStartTime;
87 fRunStartTime.open(
"RunStartTime");
88 if (!fRunStartTime.is_open()) {
89 std::cout <<
"ERROR : cannot open file RunStartTime" << std::endl;
93 while (!fRunStartTime.eof()) {
101 }
else if (
run == fileIOV) {
102 std::cout <<
" run " << fileIOV <<
" not found in RunStartTime. Let us give up" << std::endl;
106 fRunStartTime.close();
111 t3 =
t1 + 7792788661862400;
114 for (
size_t i = 0;
i < nLmes; ++
i) {
118 corrSet->setTime(
i,
t);
123 for (
int iChannel = 0; iChannel <
kEBChannels; iChannel++) {
125 fWeek >> rawId >> corrp;
127 corrSet->setValue((
int)ebId,
corr);
129 for (
int iChannel = 0; iChannel <
kEEChannels; iChannel++) {
131 fWeek >> rawId >> corrp;
133 corrSet->setValue((
int)eeId,
corr);
137 std::cout <<
"Write IOV " << iIov <<
" starting from " << fileIOV <<
"... " << std::endl;
142 std::cout <<
"Ecal -> end of getNewObjects -----------\n";
References Tm::cmsNanoSeconds(), alignCSCRings::corr, gather_cfg::cout, beamvalidation::exit(), alignmentValidation::fname, mps_fire::i, kEBChannels, kEEChannels, jets_cff::payload, writedatasetfile::run, EcalCondObjectContainer< T >::size(), command_line::start, AlCaHLTBitMon_QueryRunRegistry::string, submitPVValidationJobs::t, RandomServiceHelper::t1, RandomServiceHelper::t2, RandomServiceHelper::t3, dumpRecoGeometry_cfg::tagInfo, cond::timestamp, EBDetId::unhashIndex(), EEDetId::unhashIndex(), and edm::Timestamp::value().