Fill metaDataStore and ntuples.
192 auto piovComplete = std::make_unique<xAOD::LumiBlockRangeContainer>();
193 auto piovCompleteAux = std::make_unique<xAOD::LumiBlockRangeAuxContainer>();
194 piovComplete->setStore( piovCompleteAux.get() );
196 auto piovUnfinished = std::make_unique<xAOD::LumiBlockRangeContainer>();
197 auto piovUnfinishedAux = std::make_unique<xAOD::LumiBlockRangeAuxContainer>();
198 piovUnfinished->setStore( piovUnfinishedAux.get() );
200 auto piovSuspect = std::make_unique<xAOD::LumiBlockRangeContainer>();
201 auto piovSuspectAux = std::make_unique<xAOD::LumiBlockRangeAuxContainer>();
202 piovSuspect->setStore( piovSuspectAux.get() );
207 auto iovr = std::make_unique<xAOD::LumiBlockRange>(*
range);
208 piovSuspect->push_back(std::move(iovr));
219 tempLBColl.setStore( p_tempAuxLBColl );
229 << (*i)->startRunNumber() <<
" LB " << (*i)->startLumiBlockNumber() <<
" events seen "
230 << (*ilast)->eventsSeen() <<
" expected " << (*i)->eventsExpected());
233 if( ((*i)->startRunNumber()==(*ilast)->startRunNumber()) &&
234 ((*i)->stopRunNumber()==(*ilast)->stopRunNumber()) &&
235 ((*i)->startLumiBlockNumber()==(*ilast)->startLumiBlockNumber()) &&
236 ((*i)->stopLumiBlockNumber()==(*ilast)->stopLumiBlockNumber()) ) {
238 if((*ilast)->eventsExpected()!=(*i)->eventsExpected()) {
239 ATH_MSG_WARNING(
"Error: tmpLBColl with run " << (*i)->startRunNumber() <<
" LB " << (*i)->startLumiBlockNumber() <<
" events expected "
240 << (*ilast)->eventsExpected() <<
" and " << (*i)->eventsExpected() );
243 ATH_MSG_VERBOSE(
"Merge Run " << (*i)->startRunNumber() <<
" LB " << (*i)->startLumiBlockNumber()
244 <<
" events seen " << iovr->
eventsSeen() <<
"+"
245 << (*i)->eventsSeen() <<
" and events expected "
264 for (
const auto range : tempLBColl) {
265 auto iovr = std::make_unique<xAOD::LumiBlockRange>(*
range);
266 if(
range->eventsSeen() ==
range->eventsExpected() ) {
267 piovComplete->push_back(std::move(iovr));
269 else if(
range->eventsSeen() >
range->eventsExpected() ) {
270 piovSuspect->push_back(std::move(iovr));
273 piovUnfinished->push_back(std::move(iovr));
279 if(!piovComplete->empty()) {
280 ATH_MSG_DEBUG(
"Number of Complete LumiBlocks:" << piovComplete->size() );
281 for (
const auto range : *piovComplete) {
283 <<
range->startRunNumber() <<
"," <<
range->startLumiBlockNumber()
285 <<
range->startRunNumber() <<
"," <<
range->startLumiBlockNumber()
286 <<
") eventsSeen = " <<
range->eventsSeen()
287 <<
", eventsExpected = " <<
range->eventsExpected()
292 if(!piovUnfinished->empty()) {
293 ATH_MSG_DEBUG(
"Number of Unfinished LumiBlocks:" << piovUnfinished->size() );
294 for (
const auto range : *piovUnfinished) {
296 <<
range->startRunNumber() <<
"," <<
range->startLumiBlockNumber()
298 <<
range->startRunNumber() <<
"," <<
range->startLumiBlockNumber()
299 <<
") eventsSeen = " <<
range->eventsSeen()
300 <<
", eventsExpected = " <<
range->eventsExpected()
304 if(!piovSuspect->empty()) {
305 ATH_MSG_DEBUG(
"Number of Suspect LumiBlocks:" << piovSuspect->size() );
306 for (
const auto range : *piovSuspect) {
308 <<
range->startRunNumber() <<
"," <<
range->startLumiBlockNumber()
310 <<
range->startRunNumber() <<
"," <<
range->startLumiBlockNumber()
311 <<
") eventsSeen = " <<
range->eventsSeen()
312 <<
", eventsExpected = " <<
range->eventsExpected()
319 if (!piovComplete->empty()) {
320 ATH_MSG_INFO(
"Write Complete LumiBlocks with size " << piovComplete->size());
324 "Complete LumiBlocks container with key "
326 <<
" already exists. Updating if there are missing LumiBlocks.");
330 for (
const auto range : *piovComplete) {
333 for (
const auto existing : *complete) {
334 if ((existing->startRunNumber() ==
range->startRunNumber()) &&
335 (existing->stopRunNumber() ==
range->stopRunNumber()) &&
336 (existing->startLumiBlockNumber() ==
range->startLumiBlockNumber()) &&
337 (existing->stopLumiBlockNumber() ==
range->stopLumiBlockNumber()) &&
338 (existing->eventsSeen() ==
range->eventsSeen()) &&
339 (existing->eventsExpected() ==
range->eventsExpected())) {
349 "Copying LumiBlock: [ ("
350 <<
range->startRunNumber() <<
"," <<
range->stopLumiBlockNumber()
351 <<
"):(" <<
range->startRunNumber() <<
","
352 <<
range->stopLumiBlockNumber()
353 <<
") eventsSeen = " <<
range->eventsSeen()
354 <<
", eventsExpected = " <<
range->eventsExpected() <<
" ]");
356 complete->push_back(
out);
362 <<
" LumiBlockRangeContainer in output MetaDataStore");
368 if (!piovUnfinished->empty()) {
369 ATH_MSG_INFO(
"Write Unfinished LumiBlocks with size " << piovUnfinished->size());
373 "Unfinished LumiBlocks container with key "
375 <<
" already exists. Updating if there are missing LumiBlocks.");
379 for (
const auto range : *piovUnfinished) {
382 for (
const auto existing : *unfinished) {
383 if ((existing->startRunNumber() ==
range->startRunNumber()) &&
384 (existing->stopRunNumber() ==
range->stopRunNumber()) &&
385 (existing->startLumiBlockNumber() ==
range->startLumiBlockNumber()) &&
386 (existing->stopLumiBlockNumber() ==
range->stopLumiBlockNumber()) &&
387 (existing->eventsSeen() ==
range->eventsSeen()) &&
388 (existing->eventsExpected() ==
range->eventsExpected())) {
398 "Copying LumiBlock: [ ("
399 <<
range->startRunNumber() <<
"," <<
range->stopLumiBlockNumber()
400 <<
"):(" <<
range->startRunNumber() <<
","
401 <<
range->stopLumiBlockNumber()
402 <<
") eventsSeen = " <<
range->eventsSeen()
403 <<
", eventsExpected = " <<
range->eventsExpected() <<
" ]");
405 unfinished->push_back(
out);
411 <<
" LumiBlockRangeContainer in output MetaDataStore");
417 if (!piovSuspect->empty()) {
418 ATH_MSG_INFO(
"Write Suspect LumiBlocks with size " << piovSuspect->size());
422 "Suspect LumiBlocks container with key "
424 <<
" already exists. Updating if there are missing LumiBlocks.");
428 for (
const auto range : *piovSuspect) {
431 for (
const auto existing : *suspect) {
432 if ((existing->startRunNumber() ==
range->startRunNumber()) &&
433 (existing->stopRunNumber() ==
range->stopRunNumber()) &&
434 (existing->startLumiBlockNumber() ==
range->startLumiBlockNumber()) &&
435 (existing->stopLumiBlockNumber() ==
range->stopLumiBlockNumber()) &&
436 (existing->eventsSeen() ==
range->eventsSeen()) &&
437 (existing->eventsExpected() ==
range->eventsExpected())) {
447 "Copying LumiBlock: [ ("
448 <<
range->startRunNumber() <<
"," <<
range->stopLumiBlockNumber()
449 <<
"):(" <<
range->startRunNumber() <<
","
450 <<
range->stopLumiBlockNumber()
451 <<
") eventsSeen = " <<
range->eventsSeen()
452 <<
", eventsExpected = " <<
range->eventsExpected() <<
" ]");
454 suspect->push_back(
out);
460 <<
" LumiBlockRangeContainer in output MetaDataStore");
466 return(StatusCode::SUCCESS);