diff --git a/Trigger/TrigCost/TrigCostRootAnalysis/Root/MonitorRates.cxx b/Trigger/TrigCost/TrigCostRootAnalysis/Root/MonitorRates.cxx
index 8e5d7a0b387c4f6fa89c2cfadea5793a29d69974..f58dd715e56c860e0255e70829583f8e5ca17e85 100644
--- a/Trigger/TrigCost/TrigCostRootAnalysis/Root/MonitorRates.cxx
+++ b/Trigger/TrigCost/TrigCostRootAnalysis/Root/MonitorRates.cxx
@@ -1,7 +1,7 @@
 // Dear emacs, this is -*- c++ -*-
 
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // -------------------------------------------------------------
@@ -161,8 +161,8 @@ namespace TrigCostRootAnalysis {
       }
     }
 
-    for (const auto chainItem : m_chainItemsHLT) chainItem.second->classifyLumiAndRandom();
-    for (const auto chainItem : m_chainItemsL1) chainItem.second->classifyLumiAndRandom();
+    for (const auto& chainItem : m_chainItemsHLT) chainItem.second->classifyLumiAndRandom();
+    for (const auto& chainItem : m_chainItemsL1) chainItem.second->classifyLumiAndRandom();
 
     if (Config::config().getVecSize(kListOfNoLumiWeightChains) > 0) {
       Info("MonitorRates::populateChainItemMaps",
@@ -186,7 +186,7 @@ namespace TrigCostRootAnalysis {
     }
 
     // Get the common factor of all the CPS groups
-    for (const auto cpsGroup : m_cpsGroups) cpsGroup.second->calculateCPSFactor();
+    for (const auto& cpsGroup : m_cpsGroups) cpsGroup.second->calculateCPSFactor();
   }
 
   /**
diff --git a/Trigger/TrigCost/TrigCostRootAnalysis/Root/MonitorRatesUpgrade.cxx b/Trigger/TrigCost/TrigCostRootAnalysis/Root/MonitorRatesUpgrade.cxx
index 6d0533b0095cdfa65689a147aac081c3fe476adc..c5214673f25a922475592b7982eacbb48b8d9776 100644
--- a/Trigger/TrigCost/TrigCostRootAnalysis/Root/MonitorRatesUpgrade.cxx
+++ b/Trigger/TrigCost/TrigCostRootAnalysis/Root/MonitorRatesUpgrade.cxx
@@ -1,7 +1,7 @@
 // Dear emacs, this is -*- c++ -*-
 
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // -------------------------------------------------------------
@@ -305,9 +305,9 @@ namespace TrigCostRootAnalysis {
     }
 
 
-    for (const auto chainItem : m_chainItemsL1) chainItem.second->classifyLumiAndRandom();
+    for (const auto& chainItem : m_chainItemsL1) chainItem.second->classifyLumiAndRandom();
     //Should not be needed, do different lumi scaling here
-    for (const auto chainItem : m_chainItemsL2) chainItem.second->classifyLumiAndRandom();
+    for (const auto& chainItem : m_chainItemsL2) chainItem.second->classifyLumiAndRandom();
   }
 
   /**
@@ -389,7 +389,7 @@ namespace TrigCostRootAnalysis {
     // }
 
 
-    for (const auto item : m_upgradeChains) {
+    for (const auto& item : m_upgradeChains) {
       if (item.m_level != 1) continue; // not doing HLT here
 
       const std::string chainName = item.m_name;
@@ -450,7 +450,7 @@ namespace TrigCostRootAnalysis {
    * L2 are like L1, but with another hardware layer added
    */
   void MonitorRatesUpgrade::createL2Counters(CounterMap_t* counterMap) {
-    for (const auto item : m_upgradeChains) {
+    for (const auto& item : m_upgradeChains) {
       if (item.m_level != 1) continue; // Note should be 1, L2 stored in L1 info
 
       std::string chainName = item.m_l2name;
@@ -738,8 +738,8 @@ namespace TrigCostRootAnalysis {
     // m_eventsToMix -= (Int_t)m_eventsToMix; // Remove whole integer events mixed. Leave fractional part to accumulate
     // for next event.
 
-    for (const auto chainItem : m_chainItemsL1) chainItem.second->beginEvent(m_thisEventPtr);
-    for (const auto chainItem : m_chainItemsL2) chainItem.second->beginEvent(m_thisEventPtr);
+    for (const auto& chainItem : m_chainItemsL1) chainItem.second->beginEvent(m_thisEventPtr);
+    for (const auto& chainItem : m_chainItemsL2) chainItem.second->beginEvent(m_thisEventPtr);
 
     //Now loop over the counter collections;
     for (CounterMapSetIt_t cmsIt = m_collectionsToProcess.begin(); cmsIt != m_collectionsToProcess.end(); ++cmsIt) {
@@ -759,8 +759,8 @@ namespace TrigCostRootAnalysis {
       endEvent(0);
     }
 
-    for (const auto chainItem : m_chainItemsL1) chainItem.second->endEvent();
-    for (const auto chainItem : m_chainItemsL2) chainItem.second->endEvent();
+    for (const auto& chainItem : m_chainItemsL1) chainItem.second->endEvent();
+    for (const auto& chainItem : m_chainItemsL2) chainItem.second->endEvent();
 
     delete thisEventPtr;
     thisEventPtr = nullptr;
diff --git a/Trigger/TrigCost/TrigCostRootAnalysis/Root/TrigConfInterface.cxx b/Trigger/TrigCost/TrigCostRootAnalysis/Root/TrigConfInterface.cxx
index 37a2b0197519e42a2d2e6f26d16b0326f7ea1212..e9d767c0948f0f55c54e3a9b63cda83289acf082 100644
--- a/Trigger/TrigCost/TrigCostRootAnalysis/Root/TrigConfInterface.cxx
+++ b/Trigger/TrigCost/TrigCostRootAnalysis/Root/TrigConfInterface.cxx
@@ -1,7 +1,7 @@
 // Dear emacs, this is -*- c++ -*-
 
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // -------------------------------------------------------------
@@ -147,10 +147,10 @@ namespace TrigCostRootAnalysis {
    * Look at which LB each keyset was being used in
    */
   void TrigConfInterface::populateLBPerKeysetStrings() {
-    for (const auto keyset : m_seenKeys) {
+    for (const auto& keyset : m_seenKeys) {
       // Set of my LB
       std::set<UInt_t> myLB;
-      for (const auto it : m_lumiToKeyMap) {
+      for (const auto& it : m_lumiToKeyMap) {
         if (it.second == keyset) {
           myLB.insert(it.first);
         }