From 93eaac435bfcd8b96efde04225f66be0d53be689 Mon Sep 17 00:00:00 2001
From: schaffer <R.D.Schaffer@cern.ch>
Date: Thu, 7 May 2020 16:50:00 +0200
Subject: [PATCH] small correction to logic of previous IOVDbMetaDataTool-fix -
 should be ok now

---
 .../src/IOVDbMetaDataTool.cxx                 | 31 ++++++++++---------
 1 file changed, 16 insertions(+), 15 deletions(-)

diff --git a/Database/IOVDbMetaDataTools/src/IOVDbMetaDataTool.cxx b/Database/IOVDbMetaDataTools/src/IOVDbMetaDataTool.cxx
index 15349a25d9d..8a2bb85e48e 100755
--- a/Database/IOVDbMetaDataTools/src/IOVDbMetaDataTool.cxx
+++ b/Database/IOVDbMetaDataTools/src/IOVDbMetaDataTool.cxx
@@ -670,23 +670,24 @@ IOVDbMetaDataTool::overrideIOV (CondAttrListCollection*& coll) const
             coll->addNewStop (newRange.stop());
         }
         else {
-          // Add in channels
-          unsigned int nchans = coll->size();
-          for (unsigned int ichan = 0; ichan < nchans; ++ichan) {
-            // FIXME: O(N^2)!
-            CondAttrListCollection::ChanNum chan = coll->chanNum(ichan);
-            coll->add(chan, newRange);
-            ATH_MSG_DEBUG("overrideIOV: overriding the IOV of collection " << chan);
-          }
+            // Add in channels
+            unsigned int nchans = coll->size();
+            for (unsigned int ichan = 0; ichan < nchans; ++ichan) {
+                // FIXME: O(N^2)!
+                CondAttrListCollection::ChanNum chan = coll->chanNum(ichan);
+                coll->add(chan, newRange);
+                ATH_MSG_DEBUG("overrideIOV: overriding the IOV of collection chan " << chan);
+            }
+            // must reset the collection range AFTER the channels, because the collection range will be
+            // 'narrowed' to that of the channels
+            coll->resetMinRange();
         }
-        // must reset the collection range AFTER the channels, because the collection range will be
-        // 'narrowed' to that of the channels
-        coll->resetMinRange();
         if (msgLvl(MSG::DEBUG)) {
-	  std::ostringstream stream;
-	  coll->dump(stream);
-	  ATH_MSG_DEBUG(stream.str());
-	}
+            ATH_MSG_DEBUG("overrideIOV: after  overriding the IOV of collection");
+            std::ostringstream stream;
+            coll->dump(stream);
+            ATH_MSG_DEBUG(stream.str());
+        }
     }
     else ATH_MSG_DEBUG("overrideIOV: IOV is not run/event ");
 
-- 
GitLab