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.
543{
544
545 std::scoped_lock guard(
m_mutex );
546
547 ATH_MSG_DEBUG(
"processInputFileMetaData: file name " << fileName);
548
549
550 SG::ConstIterator<IOVMetaDataContainer> cont;
551 SG::ConstIterator<IOVMetaDataContainer> contEnd;
552
554 if (!
sc.isSuccess()) {
555 ATH_MSG_DEBUG(
"processInputFileMetaData: Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data");
556 return StatusCode::SUCCESS;
557 }
558
559 ATH_MSG_DEBUG(
"processInputFileMetaData: Retrieved from IOVMetaDataContainer(s) from InputMetaDataStore");
560
561
562 unsigned int ncolls = 0;
563 unsigned int ndupColls = 0;
564 for (; cont != contEnd; ++cont) {
566 , cont->folderDescription());
567
568
569
570 std::list<SG::ObjectWithVersion<IOVMetaDataContainer> > allVersions;
572 if (!
sc.isSuccess()) {
575 }
576
577 for (SG::ObjectWithVersion<IOVMetaDataContainer>& obj : allVersions) {
579
580 ATH_MSG_DEBUG(
"processInputFileMetaData: New container: payload size " <<
payload->size() <<
" version key " <<
obj.versionedKey);
581
582
583 if (msgLvl(MSG::VERBOSE)) {
585 ATH_MSG_VERBOSE(
"Before merge, payload minRange for folder " << cont->folderName());
586 if (payloadMaster && payloadMaster->
size()) {
587
590 unsigned int iPayload = 0;
591 for (; itColl != itCollEnd; ++itColl, ++iPayload) {
593 << (*itColl)->size());
594 }
595 }
596 else {
598 }
599 }
600 }
601
602
603 if (msgLvl(MSG::DEBUG)) {
607 std::ostringstream
stream;
608 for (; itColl1 != itCollEnd1; ++itColl1) (*itColl1)->dump(stream);
610 }
611
612
613
614
615 for (SG::ObjectWithVersion<IOVMetaDataContainer>& obj : allVersions) {
619 for (; itColl != itCollEnd; ++itColl) {
620
621
622
623 CondAttrListCollection* coll = new CondAttrListCollection(**itColl);
624
627 }
628
629
631 ATH_MSG_ERROR(
"processInputFileMetaData: Could not modify the payload for folder " << contMaster->
folderName());
632 return StatusCode::FAILURE;
633 }
634
636 if (!contMaster->
merge(coll)) {
637
638 delete coll;
639 ++ndupColls;
641 }
642 else {
643 ++ncolls;
645 }
646
647 }
648 ATH_MSG_DEBUG(
"processInputFileMetaData: Merged together containers for folder " << cont->folderName() <<
" ncoll/ndup "
649 << ncolls << " " << ndupColls);
650
651
653 if (payloadMaster && payloadMaster->
size()) {
654
657 IOVTime lastStop;
658 if ((*itColl)->minRange().start().isTimestamp()) lastStop = IOVTime(0);
659 else lastStop = IOVTime(0,0);
660 bool hasError = false;
661 for (; itColl != itCollEnd; ++itColl) {
662 if ((*itColl)->minRange().start() < lastStop) hasError = true;
663 lastStop = (*itColl)->minRange().stop();
664 }
665 if (hasError) {
666 ATH_MSG_ERROR(
"processInputFileMetaData: error after merge of file meta data. " );
667 ATH_MSG_ERROR(
"processInputFileMetaData: Filename " << fileName);
669 ATH_MSG_ERROR(
"processInputFileMetaData: MinRange for meta data folders ");
670 unsigned int iPayload = 0;
671 itColl = payloadMaster->
begin();
672 for (; itColl != itCollEnd; ++itColl, ++iPayload) {
673 ATH_MSG_ERROR(iPayload <<
" " << (*itColl)->minRange() <<
" " << (*itColl)->size());
674 }
675 }
676 }
677
678
679 if (msgLvl(MSG::VERBOSE)) {
681 ATH_MSG_VERBOSE(
"processInputFileMetaData: After merge, payload minRange ");
682 if (payloadMaster) {
683
686 unsigned int iPayload = 0;
687 for (; itColl != itCollEnd; ++itColl, ++iPayload) {
689 << (*itColl)->size());
690 }
691 }
693 }
694
695
696 if (msgLvl(MSG::DEBUG)) {
697 ATH_MSG_DEBUG(
"processInputFileMetaData: Input payload " << cont->folderName());
698 std::ostringstream streamInp;
701 for (; itColl != itCollEnd; ++itColl) (*itColl)->dump(streamInp);
704 std::ostringstream streamOut;
707 for (; itColl != itCollEnd; ++itColl) (*itColl)->dump(streamOut);
709 }
710 }
711 }
712
713 ATH_MSG_DEBUG(
"processInputFileMetaData: Total number of attribute collections merged together " << ncolls
714 << " Number of duplicate collections " << ndupColls);
715
716
717
718
719
720
722
723 return StatusCode::SUCCESS;
724}
#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.