Implements popcon::PopConSourceHandler< EcalLaserAPDPNRatios >.
Definition at line 23 of file EcalLaser_weekly_Handler.cc.
References Tm::cmsNanoSeconds(), corr, gather_cfg::cout, cmsRelvalreport::exit, alignmentValidation::fname, mps_fire::i, kEBChannels, kEEChannels, cond::TagInfo_t::lastInterval, popcon::PopConSourceHandler< EcalLaserAPDPNRatios >::lastPayload(), popcon::PopConSourceHandler< EcalLaserAPDPNRatios >::m_to_transfer, EcalLaserAPDPNRatios::EcalLaserAPDPNpair::p1, EcalLaserAPDPNRatios::EcalLaserAPDPNpair::p2, EcalLaserAPDPNRatios::EcalLaserAPDPNpair::p3, jets_cff::payload, findQualityFiles::run, cond::TagInfo_t::size, EcalCondObjectContainer< T >::size(), command_line::start, AlCaHLTBitMon_QueryRunRegistry::string, lumiQTWidget::t, EcalLaserAPDPNRatios::EcalLaserTimeStamp::t1, reco::t2, EcalLaserAPDPNRatios::EcalLaserTimeStamp::t2, EcalLaserAPDPNRatios::EcalLaserTimeStamp::t3, popcon::PopConSourceHandler< EcalLaserAPDPNRatios >::tagInfo(), cond::timestamp, EBDetId::unhashIndex(), EEDetId::unhashIndex(), and edm::Timestamp::value().
27 const size_t nLmes = 92;
33 std::cout <<
"------- Ecal -> getNewObjects\n";
36 unsigned long long max_since= 1;
43 Tm max_since_tm(max_since);
48 payload->getLaserMap();
49 std::cout <<
"payload->getLaserMap(): OK " << std::endl;
50 std::cout <<
"Its size is " << laserRatiosMap.
size() << std::endl;
52 payload->getTimeMap();
53 std::cout <<
"payload->getTimeMap(): OK " << std::endl;
54 std::cout <<
"Last Object in Offline DB has SINCE = " << max_since
55 <<
" -> " << max_since_tm.cmsNanoSeconds()
56 <<
" (" << max_since_tm <<
")" 61 for (
int i=0;
i<92;
i++) {
63 if( t_min > timestamp.
t1) {
68 std::cout <<
"WOW: we just retrieved the last valid record from DB " 78 std::cout <<
" which input IOV do you want " << std::endl;
81 std::ostringstream oss;
84 fWeek.open(fname.c_str());
85 if(!fWeek.is_open()) {
86 std::cout <<
"ERROR : can't open file 'weekly_" << oss.str() << std::endl;
89 std::cout <<
" file weekly_" << oss.str() <<
" opened" << std::endl;
92 std::ifstream fRunStartTime;
93 fRunStartTime.open(
"RunStartTime");
94 if(!fRunStartTime.is_open()) {
95 std::cout <<
"ERROR : cannot open file RunStartTime" << std::endl;
99 while(!fRunStartTime.eof()) {
102 fRunStartTime >> run >>
start;
105 std::cout <<
"run " << run <<
" timestamp " << start <<
"\n";
108 else if (run == fileIOV) {
109 std::cout <<
" run " << fileIOV <<
" not found in RunStartTime. Let us give up" << std::endl;
113 fRunStartTime.close();
118 t3 = t1 + 7792788661862400;
119 t2 = t1 + (t3 - t1)/2;
121 for(
size_t i = 0;
i < nLmes; ++
i){
125 corrSet->setTime(
i, t);
130 for (
int iChannel = 0; iChannel <
kEBChannels; iChannel++) {
132 fWeek >> rawId >> corrp;
133 corr.
p1=corr.
p2=corr.
p3 = corrp;
134 corrSet->setValue((
int)ebId, corr );
136 for (
int iChannel = 0; iChannel <
kEEChannels; iChannel++) {
138 fWeek >> rawId >> corrp;
139 corr.
p1=corr.
p2=corr.
p3 = corrp;
140 corrSet->setValue((
int)eeId, corr );
144 std::cout <<
"Write IOV " << iIov <<
" starting from " << fileIOV <<
"... "<< std::endl;
149 std::cout <<
"Ecal -> end of getNewObjects -----------\n";
edm::Ref< Container > Ref
static EEDetId unhashIndex(int hi)
OldContainer m_to_transfer
cond::ValidityInterval lastInterval
auto const T2 &decltype(t1.eta()) t2
unsigned long long uint64_t
std::vector< EcalLaserTimeStamp > EcalLaserTimeStampMap
static EBDetId unhashIndex(int hi)
get a DetId from a compact index for arrays
TimeValue_t value() const
cond::TagInfo_t const & tagInfo() const