From 59b2e71f587aad0a96452784262db0b9cce249c4 Mon Sep 17 00:00:00 2001
From: scott snyder <scott.snyder@cern.ch>
Date: Mon, 15 Jan 2018 19:13:54 +0100
Subject: [PATCH] IOVSvc: Change CondCont to use ConcurrentRangeMap

Change CondCont to use ConcurrentRangeMap to store conditions information.
This allows the elimination of locking operations in most cases.
---
 Control/IOVSvc/src/CondInputLoader.cxx | 8 +++++---
 Control/IOVSvc/src/CondInputLoader.h   | 1 +
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/Control/IOVSvc/src/CondInputLoader.cxx b/Control/IOVSvc/src/CondInputLoader.cxx
index d6d88121fd8..0d90d365001 100644
--- a/Control/IOVSvc/src/CondInputLoader.cxx
+++ b/Control/IOVSvc/src/CondInputLoader.cxx
@@ -58,7 +58,8 @@ CondInputLoader::CondInputLoader( const std::string& name,
   m_condStore("StoreGateSvc/ConditionStore", name),
   m_condSvc("CondSvc",name),
   m_IOVSvc("IOVSvc",name),
-  m_clidSvc("ClassIDSvc",name)
+  m_clidSvc("ClassIDSvc",name),
+  m_rcuSvc("Athena::RCUSvc",name)
 
 {
   //
@@ -93,6 +94,7 @@ CondInputLoader::initialize()
   ATH_CHECK( m_condSvc.retrieve() );
   ATH_CHECK( m_condStore.retrieve() );
   ATH_CHECK( m_clidSvc.retrieve() );
+  ATH_CHECK( m_rcuSvc.retrieve() );
 
   // Trigger read of IOV database
   ServiceHandle<IIOVSvc> ivs("IOVSvc",name());
@@ -259,12 +261,12 @@ CondInputLoader::start()
                         << "This is a BAD sign, but will try to continue");
       }
       SG::DataObjectSharedPtr<DataObject> cb = 
-        CondContainer::CondContFactory::Instance().Create( ditr->clid(), ditr->key() );
+        CondContainer::CondContFactory::Instance().Create( *m_rcuSvc, ditr->clid(), ditr->key() );
       if (cb == 0) {
         // try to force a load of libraries using ROOT
         (void)TClass::GetClass (tp.c_str());
         cb =
-          CondContainer::CondContFactory::Instance().Create( ditr->clid(), ditr->key() );
+          CondContainer::CondContFactory::Instance().Create( *m_rcuSvc, ditr->clid(), ditr->key() );
       }
       if (cb == 0) {
         ATH_MSG_ERROR("failed to create CondCont<" << tp
diff --git a/Control/IOVSvc/src/CondInputLoader.h b/Control/IOVSvc/src/CondInputLoader.h
index 3a4482668eb..240a8afda01 100644
--- a/Control/IOVSvc/src/CondInputLoader.h
+++ b/Control/IOVSvc/src/CondInputLoader.h
@@ -89,6 +89,7 @@ class CondInputLoader
   ServiceHandle<ICondSvc> m_condSvc;
   ServiceHandle<IIOVSvc> m_IOVSvc;
   ServiceHandle<IClassIDSvc> m_clidSvc;
+  ServiceHandle<Athena::IRCUSvc> m_rcuSvc;
   
   std::map<std::string,std::string> m_keyFolderMap;
 }; 
-- 
GitLab