Explicit call to process IOV meta data from the input meta data store, transferring it to the main meta data store.
Normally, this method is called at the BeginInputFile incident. However, this explicit call allows the transfer to occur during the initialization phase, which occurs before BeginInputFile incident.
556{
557
558 std::scoped_lock guard(
m_mutex );
559
560 ATH_MSG_DEBUG(
"processInputFileMetaData: file name " << fileName);
561
562
563 SG::ConstIterator<IOVMetaDataContainer> cont;
564 SG::ConstIterator<IOVMetaDataContainer> contEnd;
565
567 if (!
sc.isSuccess()) {
568 ATH_MSG_DEBUG(
"processInputFileMetaData: Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data");
569 return StatusCode::SUCCESS;
570 }
571
572 ATH_MSG_DEBUG(
"processInputFileMetaData: Retrieved from IOVMetaDataContainer(s) from InputMetaDataStore");
573
574
575 unsigned int ncolls = 0;
576 unsigned int ndupColls = 0;
577 for (; cont != contEnd; ++cont) {
578 IOVMetaDataContainer* contMaster =
getMetaDataContainer(cont->folderName(), cont->folderDescription());
580 ATH_MSG_DEBUG(
"processInputFileMetaData: New container: payload size " <<
payload->size() <<
" key " << cont.
key());
581
582 if (msgLvl(MSG::VERBOSE)) {
584 ATH_MSG_VERBOSE(
"Before merge, payload minRange for folder " << cont->folderName());
585 if (payloadMaster && payloadMaster->
size()) {
586
589 unsigned int iPayload = 0;
590 for (; itColl != itCollEnd; ++itColl, ++iPayload) {
591 ATH_MSG_VERBOSE(iPayload <<
" " << (*itColl)->minRange() <<
" " << (*itColl)->size());
592 }
593 }
594 else {
596 }
597 }
598
599
600 if (msgLvl(MSG::DEBUG)) {
604 std::ostringstream
stream;
605 for (; itColl1 != itCollEnd1; ++itColl1) (*itColl1)->dump(stream);
607 }
608
609
610
611
614 for (; itColl != itCollEnd; ++itColl) {
615
616
617 CondAttrListCollection* coll = new CondAttrListCollection(**itColl);
618
621 }
622
623
625 ATH_MSG_ERROR(
"processInputFileMetaData: Could not modify the payload for folder " << contMaster->
folderName());
626 return StatusCode::FAILURE;
627 }
628
630 if (!contMaster->
merge(coll)) {
631
632 delete coll;
633 ++ndupColls;
635 }
636 else {
637 ++ncolls;
639 }
640 }
641 ATH_MSG_DEBUG(
"processInputFileMetaData: Merged together containers for folder " << cont->folderName() <<
" ncoll/ndup " << ncolls <<
" " << ndupColls);
642
644 if (payloadMaster && payloadMaster->
size()) {
645
648 IOVTime lastStop;
649 if ((*itColl)->minRange().start().isTimestamp()) lastStop = IOVTime(0);
650 else lastStop = IOVTime(0,0);
651 bool hasError = false;
652 for (; itColl != itCollEnd; ++itColl) {
653 if ((*itColl)->minRange().start() < lastStop) hasError = true;
654 lastStop = (*itColl)->minRange().stop();
655 }
656 if (hasError) {
657 ATH_MSG_ERROR(
"processInputFileMetaData: error after merge of file meta data. " );
658 ATH_MSG_ERROR(
"processInputFileMetaData: Filename " << fileName);
660 ATH_MSG_ERROR(
"processInputFileMetaData: MinRange for meta data folders ");
661 unsigned int iPayload = 0;
662 itColl = payloadMaster->
begin();
663 for (; itColl != itCollEnd; ++itColl, ++iPayload) {
664 ATH_MSG_ERROR(iPayload <<
" " << (*itColl)->minRange() <<
" " << (*itColl)->size());
665 }
666 }
667 }
668
669
670 if (msgLvl(MSG::VERBOSE)) {
672 ATH_MSG_VERBOSE(
"processInputFileMetaData: After merge, payload minRange ");
673 if (payloadMaster) {
674
677 unsigned int iPayload = 0;
678 for (; itColl != itCollEnd; ++itColl, ++iPayload) {
679 ATH_MSG_VERBOSE(iPayload <<
" " << (*itColl)->minRange() <<
" " << (*itColl)->size());
680 }
681 }
683 }
684
685 if (msgLvl(MSG::DEBUG)) {
686 ATH_MSG_DEBUG(
"processInputFileMetaData: Input payload " << cont->folderName());
687 std::ostringstream streamInp;
690 for (; itColl != itCollEnd; ++itColl) (*itColl)->dump(streamInp);
693 std::ostringstream streamOut;
696 for (; itColl != itCollEnd; ++itColl) (*itColl)->dump(streamOut);
698 }
699 }
700
701 ATH_MSG_DEBUG(
"processInputFileMetaData: Total number of attribute collections merged together " << ncolls
702 << " Number of duplicate collections " << ndupColls);
703
704
705
706
707
708
710
711 return StatusCode::SUCCESS;
712}
#define ATH_MSG_VERBOSE(x,...)
size_type size() const
size of payload vector
payloadVec::const_iterator const_iterator
const_iterator begin() const
Begin of payload vector.
const_iterator end() const
End of payload vector.
const std::string & key() const
Get the key string with which the current object was stored.