From d9f258d9fa242a5095e6640be2445ef29b100695 Mon Sep 17 00:00:00 2001 From: zoujh <zoujh@ihep.ac.cn> Date: Mon, 27 Apr 2020 11:23:06 +0800 Subject: [PATCH] Update DataSvc in step with interface changes --- FWCore/FWCore/PodioDataSvc.h | 2 +- FWCore/src/PodioDataSvc.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/FWCore/FWCore/PodioDataSvc.h b/FWCore/FWCore/PodioDataSvc.h index 09194a30..54d9bc83 100644 --- a/FWCore/FWCore/PodioDataSvc.h +++ b/FWCore/FWCore/PodioDataSvc.h @@ -37,7 +37,7 @@ public: using DataSvc::registerObject; /// Overriding standard behaviour of evt service /// Register object with the data store. - virtual StatusCode registerObject(const std::string& fullPath, DataObject* pObject) final; + virtual StatusCode registerObject(std::string_view parentPath, std::string_view fullPath, DataObject* pObject) override final; StatusCode readCollection(const std::string& collectionName, int collectionID); diff --git a/FWCore/src/PodioDataSvc.cpp b/FWCore/src/PodioDataSvc.cpp index ce7d3699..c2920e12 100644 --- a/FWCore/src/PodioDataSvc.cpp +++ b/FWCore/src/PodioDataSvc.cpp @@ -101,10 +101,10 @@ StatusCode PodioDataSvc::readCollection(const std::string& collName, int collect collection->setID(id); wrapper->setData(collection); m_readCollections.emplace_back(std::make_pair(collName, collection)); - return DataSvc::registerObject(collName, wrapper); + return DataSvc::registerObject("/Event", "/" + collName, wrapper); } -StatusCode PodioDataSvc::registerObject(const std::string& fullPath, DataObject* pObject) { +StatusCode PodioDataSvc::registerObject(std::string_view parentPath, std::string_view fullPath, DataObject* pObject) { DataWrapperBase* wrapper = dynamic_cast<DataWrapperBase*>(pObject); if (wrapper != nullptr) { podio::CollectionBase* coll = wrapper->collectionBase(); @@ -116,5 +116,5 @@ StatusCode PodioDataSvc::registerObject(const std::string& fullPath, DataObject* m_collections.emplace_back(std::make_pair(shortPath, coll)); } } - return DataSvc::registerObject(fullPath, pObject); + return DataSvc::registerObject(parentPath, fullPath, pObject); } -- GitLab