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) {
579 , cont->folderDescription());
580
581
582
583 std::list<SG::ObjectWithVersion<IOVMetaDataContainer> > allVersions;
585 if (!
sc.isSuccess()) {
588 }
589
590 for (SG::ObjectWithVersion<IOVMetaDataContainer>& obj : allVersions) {
592
593 ATH_MSG_DEBUG(
"processInputFileMetaData: New container: payload size " <<
payload->size() <<
" version key " <<
obj.versionedKey);
594
595
596 if (msgLvl(MSG::VERBOSE)) {
598 ATH_MSG_VERBOSE(
"Before merge, payload minRange for folder " << cont->folderName());
599 if (payloadMaster && payloadMaster->
size()) {
600
603 unsigned int iPayload = 0;
604 for (; itColl != itCollEnd; ++itColl, ++iPayload) {
606 << (*itColl)->size());
607 }
608 }
609 else {
611 }
612 }
613 }
614
615
616 if (msgLvl(MSG::DEBUG)) {
620 std::ostringstream
stream;
621 for (; itColl1 != itCollEnd1; ++itColl1) (*itColl1)->dump(stream);
623 }
624
625
626
627
628 for (SG::ObjectWithVersion<IOVMetaDataContainer>& obj : allVersions) {
632 for (; itColl != itCollEnd; ++itColl) {
633
634
635
636 CondAttrListCollection* coll = new CondAttrListCollection(**itColl);
637
640 }
641
642
644 ATH_MSG_ERROR(
"processInputFileMetaData: Could not modify the payload for folder " << contMaster->
folderName());
645 return StatusCode::FAILURE;
646 }
647
649 if (!contMaster->
merge(coll)) {
650
651 delete coll;
652 ++ndupColls;
654 }
655 else {
656 ++ncolls;
658 }
659
660 }
661 ATH_MSG_DEBUG(
"processInputFileMetaData: Merged together containers for folder " << cont->folderName() <<
" ncoll/ndup "
662 << ncolls << " " << ndupColls);
663
664
666 if (payloadMaster && payloadMaster->
size()) {
667
670 IOVTime lastStop;
671 if ((*itColl)->minRange().start().isTimestamp()) lastStop = IOVTime(0);
672 else lastStop = IOVTime(0,0);
673 bool hasError = false;
674 for (; itColl != itCollEnd; ++itColl) {
675 if ((*itColl)->minRange().start() < lastStop) hasError = true;
676 lastStop = (*itColl)->minRange().stop();
677 }
678 if (hasError) {
679 ATH_MSG_ERROR(
"processInputFileMetaData: error after merge of file meta data. " );
680 ATH_MSG_ERROR(
"processInputFileMetaData: Filename " << fileName);
682 ATH_MSG_ERROR(
"processInputFileMetaData: MinRange for meta data folders ");
683 unsigned int iPayload = 0;
684 itColl = payloadMaster->
begin();
685 for (; itColl != itCollEnd; ++itColl, ++iPayload) {
686 ATH_MSG_ERROR(iPayload <<
" " << (*itColl)->minRange() <<
" " << (*itColl)->size());
687 }
688 }
689 }
690
691
692 if (msgLvl(MSG::VERBOSE)) {
694 ATH_MSG_VERBOSE(
"processInputFileMetaData: After merge, payload minRange ");
695 if (payloadMaster) {
696
699 unsigned int iPayload = 0;
700 for (; itColl != itCollEnd; ++itColl, ++iPayload) {
702 << (*itColl)->size());
703 }
704 }
706 }
707
708
709 if (msgLvl(MSG::DEBUG)) {
710 ATH_MSG_DEBUG(
"processInputFileMetaData: Input payload " << cont->folderName());
711 std::ostringstream streamInp;
714 for (; itColl != itCollEnd; ++itColl) (*itColl)->dump(streamInp);
717 std::ostringstream streamOut;
720 for (; itColl != itCollEnd; ++itColl) (*itColl)->dump(streamOut);
722 }
723 }
724 }
725
726 ATH_MSG_DEBUG(
"processInputFileMetaData: Total number of attribute collections merged together " << ncolls
727 << " Number of duplicate collections " << ndupColls);
728
729
730
731
732
733
735
736 return StatusCode::SUCCESS;
737}
#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.