From 6f21a74904934502819859be9ffd86294b5ed27b Mon Sep 17 00:00:00 2001
From: scott snyder <scott.snyder@cern.ch>
Date: Wed, 6 Dec 2017 16:09:05 +0100
Subject: [PATCH] IOVSvc: CondContFactory should return a DataBucket.

CondContFactory currently returns a CondContBase*.
Change it to return a DataBucket.  In that case, the DataBucket holds
the information about the fully-derived type of the conditions container,
allowing the symlinks to be set correctly when the object is recorded
by CondInputLoader.


Former-commit-id: ddd7d25994b62de1000a4ac7ea9f5158903b29fa
---
 Control/IOVSvc/src/CondInputLoader.cxx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Control/IOVSvc/src/CondInputLoader.cxx b/Control/IOVSvc/src/CondInputLoader.cxx
index 23b5f5f93cc..d6d88121fd8 100644
--- a/Control/IOVSvc/src/CondInputLoader.cxx
+++ b/Control/IOVSvc/src/CondInputLoader.cxx
@@ -258,7 +258,7 @@ CondInputLoader::start()
         ATH_MSG_WARNING("unable to convert clid " << ditr->clid() << " to a classname."
                         << "This is a BAD sign, but will try to continue");
       }
-      CondContBase* cb = 
+      SG::DataObjectSharedPtr<DataObject> cb = 
         CondContainer::CondContFactory::Instance().Create( ditr->clid(), ditr->key() );
       if (cb == 0) {
         // try to force a load of libraries using ROOT
@@ -274,7 +274,7 @@ CondInputLoader::start()
       } else {
         ATH_MSG_INFO("created CondCont<" << tp << "> with key '"
                      << ditr->key() << "'");
-        if (m_condStore->record(cb, vhk.key()).isFailure()) {
+        if (m_condStore->recordObject(cb, vhk.key(), true, false) == nullptr) {
           ATH_MSG_ERROR("while creating a CondContBase for " 
                         << vhk.fullKey());
           fail = true;
-- 
GitLab