From 768485dd16189d95261ddcf1cfc371fdf0883dda Mon Sep 17 00:00:00 2001
From: Adam Edward Barton <adam.edward.barton@cern.ch>
Date: Fri, 18 Oct 2019 09:39:21 +0000
Subject: [PATCH] Turn InDetTimeCollection into std::vector

---
 .../src/DQTDetSynchMonAlg.cxx                 | 18 ++++------
 .../src/DQTDetSynchMonTool.cxx                | 18 ++++------
 .../src/PixelRawDataProviderTool.cxx          |  7 ++--
 .../src/PixelRawDataProviderTool.h            |  7 ----
 .../src/SCTRawDataProvider.cxx                | 12 +++----
 .../src/TRTRawDataProviderTool.cxx            | 34 ++++++++-----------
 .../src/TRTRawDataProviderTool.h              |  5 ++-
 .../src/InDetGlobalSynchMonTool.cxx           |  6 ++--
 .../src/TRT_Monitoring_Tool.cxx               |  6 ++--
 .../InDetRawData/InDetTimeCollection.h        |  4 +--
 10 files changed, 43 insertions(+), 74 deletions(-)

diff --git a/DataQuality/DataQualityTools/src/DQTDetSynchMonAlg.cxx b/DataQuality/DataQualityTools/src/DQTDetSynchMonAlg.cxx
index 3086617f81e..94298a4376e 100644
--- a/DataQuality/DataQualityTools/src/DQTDetSynchMonAlg.cxx
+++ b/DataQuality/DataQualityTools/src/DQTDetSynchMonAlg.cxx
@@ -122,9 +122,8 @@ StatusCode DQTDetSynchMonAlg::fillHistograms( const EventContext& ctx ) const
      for ( InDetTimeCollection::const_iterator itrt_bcid 
 	     = TRT_BCIDColl->begin();
 	   itrt_bcid != TRT_BCIDColl->end(); ++itrt_bcid ) {
-       if (!(*itrt_bcid)) continue;
        //Current bcid
-       trtbcidset.insert((uint16_t)(*itrt_bcid)->second);       
+       trtbcidset.insert((uint16_t)(*itrt_bcid).second);
      } // End for loop
    }
    else {
@@ -137,9 +136,8 @@ StatusCode DQTDetSynchMonAlg::fillHistograms( const EventContext& ctx ) const
      for ( InDetTimeCollection::const_iterator isct_bcid 
 	     = SCT_BCIDColl->begin();
 	   isct_bcid != SCT_BCIDColl->end(); ++isct_bcid ) {
-       if (!(*isct_bcid)) continue;
        //Current bcid
-       sctbcidset.insert((uint16_t)(*isct_bcid)->second);
+       sctbcidset.insert((uint16_t)(*isct_bcid).second);
      } // End for loop
    }
    else {
@@ -152,9 +150,8 @@ StatusCode DQTDetSynchMonAlg::fillHistograms( const EventContext& ctx ) const
      for ( InDetTimeCollection::const_iterator ipixel_bcid 
 	     = Pixel_BCIDColl->begin();
 	   ipixel_bcid != Pixel_BCIDColl->end(); ++ipixel_bcid ) {
-       if (!(*ipixel_bcid)) continue;
        //Current bcid
-       pixelbcidset.insert((uint16_t)(*ipixel_bcid)->second);
+       pixelbcidset.insert((uint16_t)(*ipixel_bcid).second);
      } // End for loop
    }
    else {
@@ -167,9 +164,8 @@ StatusCode DQTDetSynchMonAlg::fillHistograms( const EventContext& ctx ) const
      for ( InDetTimeCollection::const_iterator itrt_lvl1id 
 	     = TRT_LVL1IDColl->begin();
 	   itrt_lvl1id != TRT_LVL1IDColl->end(); ++itrt_lvl1id ) {
-       if (!(*itrt_lvl1id)) continue;
        //Current lvl1id
-       trtl1idset.insert((uint16_t)(*itrt_lvl1id)->second);
+       trtl1idset.insert((uint16_t)(*itrt_lvl1id).second);
      } // End for loop
    }
    else {
@@ -182,9 +178,8 @@ StatusCode DQTDetSynchMonAlg::fillHistograms( const EventContext& ctx ) const
      for ( InDetTimeCollection::const_iterator isct_lvl1id 
 	     = SCT_LVL1IDColl->begin();
 	   isct_lvl1id != SCT_LVL1IDColl->end(); ++isct_lvl1id ) {
-       if (!(*isct_lvl1id)) continue;
        //Current lvl1id
-       sctl1idset.insert((uint16_t)(*isct_lvl1id)->second);
+       sctl1idset.insert((uint16_t)(*isct_lvl1id).second);
      } // End for loop
    }
    else {
@@ -197,9 +192,8 @@ StatusCode DQTDetSynchMonAlg::fillHistograms( const EventContext& ctx ) const
      for ( InDetTimeCollection::const_iterator ipixel_lvl1id 
 	     = Pixel_LVL1IDColl->begin();
 	   ipixel_lvl1id != Pixel_LVL1IDColl->end(); ++ipixel_lvl1id ) {
-       if (!(*ipixel_lvl1id)) continue;
        //Current lvl1id
-       pixell1idset.insert((uint16_t)(*ipixel_lvl1id)->second);
+       pixell1idset.insert((uint16_t)(*ipixel_lvl1id).second);
      } // End for loop
    }
    else {
diff --git a/DataQuality/DataQualityTools/src/DQTDetSynchMonTool.cxx b/DataQuality/DataQualityTools/src/DQTDetSynchMonTool.cxx
index 49b419f97e5..1de8a26c876 100644
--- a/DataQuality/DataQualityTools/src/DQTDetSynchMonTool.cxx
+++ b/DataQuality/DataQualityTools/src/DQTDetSynchMonTool.cxx
@@ -649,9 +649,8 @@ StatusCode DQTDetSynchMonTool::fillHistograms()
 	     = TRT_BCIDColl->begin();
 	   itrt_bcid != TRT_BCIDColl->end(); ++itrt_bcid ) {
        //log << MSG::DEBUG << "TRT BCID pointer found! " << endmsg;
-       if (!(*itrt_bcid)) continue;
        //Current bcid
-       m_trtbcidset.insert((uint16_t)(*itrt_bcid)->second);
+       m_trtbcidset.insert((uint16_t)(*itrt_bcid).second);
        //log << MSG::DEBUG << "TRT BCID found " << (*itrt_bcid)->second  << endmsg;      
        
      } // End for loop
@@ -667,9 +666,8 @@ StatusCode DQTDetSynchMonTool::fillHistograms()
 	     = SCT_BCIDColl->begin();
 	   isct_bcid != SCT_BCIDColl->end(); ++isct_bcid ) {
        //log << MSG::DEBUG << "SCT BCID pointer found! " << endmsg;
-       if (!(*isct_bcid)) continue;
        //Current bcid
-       m_sctbcidset.insert((uint16_t)(*isct_bcid)->second);
+       m_sctbcidset.insert((uint16_t)(*isct_bcid).second);
        //log << MSG::DEBUG << "SCT BCID found " << (*isct_bcid)->second  << endmsg;            
      } // End for loop
    }
@@ -684,9 +682,8 @@ StatusCode DQTDetSynchMonTool::fillHistograms()
 	     = Pixel_BCIDColl->begin();
 	   ipixel_bcid != Pixel_BCIDColl->end(); ++ipixel_bcid ) {
        //log << MSG::DEBUG << "Pixel BCID pointer found! " << endmsg;
-       if (!(*ipixel_bcid)) continue;
        //Current bcid
-       m_pixelbcidset.insert((uint16_t)(*ipixel_bcid)->second);
+       m_pixelbcidset.insert((uint16_t)(*ipixel_bcid).second);
        //log << MSG::DEBUG << "Pixel BCID found " << (*ipixel_bcid)->second  << endmsg;            
      } // End for loop
    }
@@ -701,9 +698,8 @@ StatusCode DQTDetSynchMonTool::fillHistograms()
 	     = TRT_LVL1IDColl->begin();
 	   itrt_lvl1id != TRT_LVL1IDColl->end(); ++itrt_lvl1id ) {
        //log << MSG::DEBUG << "TRT LVL1 ID pointer found! " << endmsg;
-       if (!(*itrt_lvl1id)) continue;
        //Current lvl1id
-       m_trtl1idset.insert((uint16_t)(*itrt_lvl1id)->second);
+       m_trtl1idset.insert((uint16_t)(*itrt_lvl1id).second);
        //log << MSG::DEBUG << "TRT LVL1 ID found " << (*itrt_lvl1id)->second  << endmsg;      
      } // End for loop
    }
@@ -718,9 +714,8 @@ StatusCode DQTDetSynchMonTool::fillHistograms()
 	     = SCT_LVL1IDColl->begin();
 	   isct_lvl1id != SCT_LVL1IDColl->end(); ++isct_lvl1id ) {
        //log << MSG::DEBUG << "SCT LVL1 ID pointer found! " << endmsg;
-       if (!(*isct_lvl1id)) continue;
        //Current lvl1id
-       m_sctl1idset.insert((uint16_t)(*isct_lvl1id)->second);
+       m_sctl1idset.insert((uint16_t)(*isct_lvl1id).second);
        //log << MSG::DEBUG << "SCT LVL1 ID found " << (*isct_lvl1id)->second  << endmsg;            
      } // End for loop
    }
@@ -735,9 +730,8 @@ StatusCode DQTDetSynchMonTool::fillHistograms()
 	     = Pixel_LVL1IDColl->begin();
 	   ipixel_lvl1id != Pixel_LVL1IDColl->end(); ++ipixel_lvl1id ) {
        //log << MSG::DEBUG << "Pixel LVL1 ID pointer found! " << endmsg;
-       if (!(*ipixel_lvl1id)) continue;
        //Current lvl1id
-       m_pixell1idset.insert((uint16_t)(*ipixel_lvl1id)->second);
+       m_pixell1idset.insert((uint16_t)(*ipixel_lvl1id).second);
        //log << MSG::DEBUG << "Pixel LVL1 ID found " << (*ipixel_lvl1id)->second  << endmsg;            
      } // End for loop
    }
diff --git a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawDataProviderTool.cxx b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawDataProviderTool.cxx
index bc851b4a1ad..013c2f1af6a 100644
--- a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawDataProviderTool.cxx
+++ b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawDataProviderTool.cxx
@@ -3,6 +3,7 @@
 */
 
 #include "PixelRawDataProviderTool.h"
+#include "StoreGate/WriteHandle.h"
 
 using OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment;
 
@@ -89,12 +90,10 @@ StatusCode PixelRawDataProviderTool::convert(std::vector<const ROBFragment*>& ve
 
     if (isNewEvent) {
       unsigned int lvl1id = (*rob_it)->rod_lvl1_id();
-      std::pair<uint32_t, unsigned int>* lvl1Pair = new std::pair<uint32_t, unsigned int>(robid,lvl1id);
-      m_LVL1Collection->push_back(lvl1Pair) ;
+      m_LVL1Collection->emplace_back(robid,lvl1id) ;
 
       unsigned int bcid = (*rob_it)->rod_bc_id();  
-      std::pair<uint32_t, unsigned int>* bcidPair = new std::pair<uint32_t, unsigned int>(robid,bcid);
-      m_BCIDCollection->push_back(bcidPair);
+      m_BCIDCollection->emplace_back(robid,bcid);
       
 #ifdef PIXEL_DEBUG
       ATH_MSG_DEBUG("Stored LVL1ID "<<lvl1id<<" and BCID "<<bcid<<" in InDetTimeCollections");
diff --git a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawDataProviderTool.h b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawDataProviderTool.h
index 22cfebb854c..ce49ef18315 100644
--- a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawDataProviderTool.h
+++ b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawDataProviderTool.h
@@ -9,17 +9,10 @@
 #include "PixelRawDataByteStreamCnv/IPixelRodDecoder.h"
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "GaudiKernel/ToolHandle.h"
-#include "GaudiKernel/ServiceHandle.h"
-
 #include "StoreGate/WriteHandleKey.h"
-#include "StoreGate/WriteHandle.h"
-
 #include "InDetRawData/InDetTimeCollection.h"
 
-#include <set>
-#include <string>
 
-class IPixelRodDecoder;
 
 // the tool to decode a ROB frament
 class PixelRawDataProviderTool : virtual public IPixelRawDataProviderTool, public AthAlgTool
diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProvider.cxx b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProvider.cxx
index 5d14c00dbc9..a854a30e1cd 100644
--- a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProvider.cxx
+++ b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProvider.cxx
@@ -100,12 +100,14 @@ StatusCode SCTRawDataProvider::execute(const EventContext& ctx) const
   ATH_MSG_DEBUG("Number of ROB fragments " << vecROBFrags.size());
 
   SG::WriteHandle<InDetTimeCollection> lvl1Collection{m_lvl1CollectionKey, ctx};
-  lvl1Collection = std::make_unique<InDetTimeCollection>(vecROBFrags.size()); 
+  lvl1Collection = std::make_unique<InDetTimeCollection>();
   ATH_CHECK(lvl1Collection.isValid());
 
   SG::WriteHandle<InDetTimeCollection> bcIDCollection{m_bcIDCollectionKey, ctx};
-  bcIDCollection = std::make_unique<InDetTimeCollection>(vecROBFrags.size()); 
+  bcIDCollection = std::make_unique<InDetTimeCollection>();
   ATH_CHECK(bcIDCollection.isValid());
+  lvl1Collection->reserve(vecROBFrags.size());
+  bcIDCollection->reserve(vecROBFrags.size());
 
   for (const ROBFragment* robFrag : vecROBFrags) {
     // Store LVL1ID and BCID information in InDetTimeCollection 
@@ -114,12 +116,10 @@ StatusCode SCTRawDataProvider::execute(const EventContext& ctx) const
     uint32_t robID{(robFrag)->rod_source_id()};
     
     unsigned int lvl1ID{(robFrag)->rod_lvl1_id()};
-    auto lvl1Pair{std::make_unique<std::pair<uint32_t, unsigned int>>(robID, lvl1ID)};
-    lvl1Collection->push_back(std::move(lvl1Pair));
+    lvl1Collection->emplace_back(robID, lvl1ID);
     
     unsigned int bcID{(robFrag)->rod_bc_id()};
-    auto bcIDPair{std::make_unique<std::pair<uint32_t, unsigned int>>(robID, bcID)};
-    bcIDCollection->push_back(std::move(bcIDPair));
+    bcIDCollection->emplace_back(robID, bcID);
     
     ATH_MSG_DEBUG("Stored LVL1ID " << lvl1ID << " and BCID " << bcID << " in InDetTimeCollections");
   }
diff --git a/InnerDetector/InDetEventCnv/TRT_RawDataByteStreamCnv/src/TRTRawDataProviderTool.cxx b/InnerDetector/InDetEventCnv/TRT_RawDataByteStreamCnv/src/TRTRawDataProviderTool.cxx
index da5627618aa..26cd0f5b557 100644
--- a/InnerDetector/InDetEventCnv/TRT_RawDataByteStreamCnv/src/TRTRawDataProviderTool.cxx
+++ b/InnerDetector/InDetEventCnv/TRT_RawDataByteStreamCnv/src/TRTRawDataProviderTool.cxx
@@ -30,14 +30,13 @@ TRTRawDataProviderTool::TRTRawDataProviderTool
      m_decoder   ("TRT_RodDecoder",this),
      m_bsErrSvc ("TRT_ByteStream_ConditionsSvc", name),
      m_LastLvl1ID(),
-     m_LVL1Collection(nullptr),
-     m_BCCollection(nullptr),
-     m_storeInDetTimeColls(true)
+     m_storeInDetTimeColls(true),
+     m_doEventCheck(true)
 {
   declareProperty ("Decoder", m_decoder);
   declareProperty ("BSCondSvc", m_bsErrSvc);
   declareProperty ("StoreInDetTimeCollections", m_storeInDetTimeColls);
-
+  declareProperty ("checkLVL1ID", m_doEventCheck);
 
   declareInterface< ITRTRawDataProviderTool >( this );   
 }
@@ -112,11 +111,12 @@ StatusCode TRTRawDataProviderTool::convert(const std::vector<const ROBFragment*>
      return StatusCode::SUCCESS;
 
 
-
+  std::unique_ptr<InDetTimeCollection> LVL1Collection;
+  std::unique_ptr<InDetTimeCollection> BCCollection;
   std::vector<const ROBFragment*>::const_iterator rob_it = vecRobs.begin();
   
   // are we working on a new event ?
-  bool isNewEvent = ((*rob_it)->rod_lvl1_id() != m_LastLvl1ID);
+  bool isNewEvent = m_doEventCheck ? ((*rob_it)->rod_lvl1_id() != m_LastLvl1ID) : true;
 
   if ( isNewEvent )
   {
@@ -131,11 +131,11 @@ StatusCode TRTRawDataProviderTool::convert(const std::vector<const ROBFragment*>
     if ( m_storeInDetTimeColls )
     {
       // Create Collections for per ROD vectors on L1ID and BCID  
-      m_LVL1Collection = new InDetTimeCollection();
-      m_LVL1Collection->reserve(vecRobs.size());
+      LVL1Collection = std::make_unique<InDetTimeCollection>();
+      LVL1Collection->reserve(vecRobs.size());
   
-      m_BCCollection = new InDetTimeCollection();
-      m_BCCollection->reserve(vecRobs.size());  
+      BCCollection = std::make_unique<InDetTimeCollection>();
+      BCCollection->reserve(vecRobs.size());
     }
   }
 
@@ -153,14 +153,10 @@ StatusCode TRTRawDataProviderTool::convert(const std::vector<const ROBFragment*>
 	  */
 
 	 unsigned int lvl1id = (*rob_it)->rod_lvl1_id();
-	 std::pair<uint32_t, unsigned int>* lvl1Pair = 
-	    new std::pair<uint32_t, unsigned int>(std::make_pair( robid, lvl1id ));
-	 m_LVL1Collection->push_back( lvl1Pair ) ;
+	 LVL1Collection->emplace_back( robid, lvl1id ) ;
 	
 	 unsigned int bcid = (*rob_it)->rod_bc_id();  
-	 std::pair<uint32_t, unsigned int>* bcidPair = 
-	    new std::pair<uint32_t, unsigned int>(std::make_pair( robid, bcid ));
-	 m_BCCollection->push_back( bcidPair );
+	 BCCollection->emplace_back( robid, bcid );
       
 #ifdef TRT_BSC_DEBUG
 	 ATH_MSG_DEBUG( "Stored LVL1ID " << lvl1id << " and BCID " << bcid << " in InDetTimeCollections" );
@@ -196,8 +192,7 @@ StatusCode TRTRawDataProviderTool::convert(const std::vector<const ROBFragment*>
     {
 
       SG::WriteHandle<InDetTimeCollection> lvl1id(m_lvl1idkey);
-      auto mylvl1 = std::make_unique<InDetTimeCollection>(*m_LVL1Collection);
-      sc = lvl1id.record(std::move(mylvl1));
+      sc = lvl1id.record(std::move(LVL1Collection));
       if ( sc.isFailure() ) 
       {   
 	ATH_MSG_WARNING( "failed to record LVL1ID TimeCollection" );
@@ -205,8 +200,7 @@ StatusCode TRTRawDataProviderTool::convert(const std::vector<const ROBFragment*>
       }
 
       SG::WriteHandle<InDetTimeCollection> bcid(m_bcidkey);
-      auto mybc = std::make_unique<InDetTimeCollection>(*m_BCCollection);
-      sc = bcid.record(std::move(mybc));
+      sc = bcid.record(std::move(BCCollection));
       if ( sc.isFailure() ) 
       {   
 	ATH_MSG_WARNING( "failed to record BCID TimeCollection" );
diff --git a/InnerDetector/InDetEventCnv/TRT_RawDataByteStreamCnv/src/TRTRawDataProviderTool.h b/InnerDetector/InDetEventCnv/TRT_RawDataByteStreamCnv/src/TRTRawDataProviderTool.h
index 0ebd476dfa2..73807b9db49 100644
--- a/InnerDetector/InDetEventCnv/TRT_RawDataByteStreamCnv/src/TRTRawDataProviderTool.h
+++ b/InnerDetector/InDetEventCnv/TRT_RawDataByteStreamCnv/src/TRTRawDataProviderTool.h
@@ -57,11 +57,10 @@ private:
 
   // bookkeeping if we have decoded a ROB already
   uint32_t      m_LastLvl1ID;
-  InDetTimeCollection* m_LVL1Collection;
-  InDetTimeCollection* m_BCCollection;
-  bool  m_storeInDetTimeColls;
   SG::WriteHandleKey<InDetTimeCollection> m_lvl1idkey{this,"LVL1IDKey","TRT_LVL1ID","TRT_LVL1ID out-key"};
   SG::WriteHandleKey<InDetTimeCollection> m_bcidkey{this,"BCIDKey","TRT_BCID","TRT_BCID out-key"};
+  bool  m_storeInDetTimeColls;
+  bool  m_doEventCheck;
 };
 
 #endif
diff --git a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalSynchMonTool.cxx b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalSynchMonTool.cxx
index c9a691bf88a..d6577d1cb1b 100755
--- a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalSynchMonTool.cxx
+++ b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalSynchMonTool.cxx
@@ -563,10 +563,8 @@ unsigned int InDetGlobalSynchMonTool::fillTimingHistos( const InDetTimeCollectio
     InDetTimeCollection::const_iterator it_time,it_time_E(collection->end());
     for ( it_time = collection->begin(); it_time != it_time_E; ++it_time ) {
 	
-	if (!(*it_time)) continue;
-	
-	const unsigned int curr = (*procFunc)( (*it_time)->second );
-	const int robid = getDetectorId ( (*it_time)->first  ); //remember only first 2 digits of ROBID
+	const unsigned int curr = (*procFunc)( (*it_time).second );
+	const int robid = getDetectorId ( (*it_time).first  ); //remember only first 2 digits of ROBID
 	
 	std::multimap<short, short>::const_iterator curr_rob = m_robMapping.find(robid);
 	
diff --git a/InnerDetector/InDetMonitoring/TRT_Monitoring/src/TRT_Monitoring_Tool.cxx b/InnerDetector/InDetMonitoring/TRT_Monitoring/src/TRT_Monitoring_Tool.cxx
index 33fc287c826..b06d5cc75cf 100644
--- a/InnerDetector/InDetMonitoring/TRT_Monitoring/src/TRT_Monitoring_Tool.cxx
+++ b/InnerDetector/InDetMonitoring/TRT_Monitoring/src/TRT_Monitoring_Tool.cxx
@@ -1831,15 +1831,13 @@ StatusCode TRT_Monitoring_Tool::fillTRTRDOs(const TRT_RDO_Container& rdoContaine
 		InDetTimeCollection::const_iterator itrt_bcid = trtBCIDCollection->begin();
 
 		while (goodid_status == 0 && itrt_bcid != trtBCIDCollection->end()) {
-			if (!(*itrt_bcid)) continue;
-
-			const unsigned int trt_bcid = (*itrt_bcid)->second;
+			const unsigned int trt_bcid = (*itrt_bcid).second;
 
 			if (itrt_bcid > trtBCIDCollection->begin() && prev_bcid - trt_bcid == 0) {
 				goodid_status = 1;
 			} else if (itrt_bcid > trtBCIDCollection->begin() && prev_bcid - trt_bcid != 0) {
 				ATH_MSG_WARNING("TRT BCID is not consistent.  TRT RODID is " <<
-				                std::hex << (*itrt_bcid)->first << " trt bcid from ROD is " <<
+				                std::hex << (*itrt_bcid).first << " trt bcid from ROD is " <<
 				                std::hex << trt_bcid);
 			}
 
diff --git a/InnerDetector/InDetRawEvent/InDetRawData/InDetRawData/InDetTimeCollection.h b/InnerDetector/InDetRawEvent/InDetRawData/InDetRawData/InDetTimeCollection.h
index eb4398e12ff..e21d3df99c6 100644
--- a/InnerDetector/InDetRawEvent/InDetRawData/InDetRawData/InDetTimeCollection.h
+++ b/InnerDetector/InDetRawEvent/InDetRawData/InDetRawData/InDetTimeCollection.h
@@ -5,11 +5,11 @@
 #ifndef INDETRAWDATA_INDETTIMECOLLECTION_H
 #define INDETRAWDATA_INDETTIMECOLLECTION_H
 
-#include "AthContainers/DataVector.h"
+#include <vector>
 #include "AthenaKernel/CLASS_DEF.h"
 
 
-typedef DataVector< std::pair<uint32_t,  unsigned int > > InDetTimeCollection;
+typedef std::vector< std::pair<uint32_t,  unsigned int > > InDetTimeCollection;
 CLASS_DEF(InDetTimeCollection ,1103971028,1 )
 
 
-- 
GitLab