diff --git a/Database/AthenaPOOL/OutputStreamAthenaPool/src/EventInfoAttListTool.cxx b/Database/AthenaPOOL/OutputStreamAthenaPool/src/EventInfoAttListTool.cxx index 102b71a79b85a5786e71d4df9e4dffda2f986bdc..0dac118fc55d5130d62a69cbd637df21d39d63c9 100755 --- a/Database/AthenaPOOL/OutputStreamAthenaPool/src/EventInfoAttListTool.cxx +++ b/Database/AthenaPOOL/OutputStreamAthenaPool/src/EventInfoAttListTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /***************************************************************************** @@ -90,6 +90,24 @@ const AthenaAttributeList EventInfoAttListTool::getAttributeList(const EventInfo return eventTag; } +/* Build attribute list from EventInfo object */ +std::unique_ptr<AthenaAttributeList> +EventInfoAttListTool::getAttributeListPtr(const xAOD::EventInfo& eventInfo) +{ + // Create attributeList with appropriate attributes + auto eventTag = std::make_unique<AthenaAttributeList> ( *m_attribListSpec ); + + StatusCode sc = this->eventTag (*eventTag, eventInfo); + if (sc.isFailure()) { + ATH_MSG_WARNING("Unable to build Tag Fragments for the Event"); + } + + ATH_MSG_DEBUG("EventInfoAttListTool - getAttributeList() return success"); + + return eventTag; +} + + /** build the tag associate to the event information */ StatusCode EventInfoAttListTool::eventTag(AthenaAttributeList& eventTag, const xAOD::EventInfo& eventInfo) diff --git a/Database/AthenaPOOL/OutputStreamAthenaPool/src/EventInfoAttListTool.h b/Database/AthenaPOOL/OutputStreamAthenaPool/src/EventInfoAttListTool.h index 2957ce50059affc93ede1bb6868dc80955f6c8e7..55123192b9dc204131aaa85e7394028f4045ddb7 100755 --- a/Database/AthenaPOOL/OutputStreamAthenaPool/src/EventInfoAttListTool.h +++ b/Database/AthenaPOOL/OutputStreamAthenaPool/src/EventInfoAttListTool.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef EVENTINFOATTLISTTOOL_H @@ -43,6 +43,8 @@ public: const AthenaAttributeList getAttributeList(const xAOD::EventInfo& einfo); const AthenaAttributeList getAttributeList(const EventInfo& einfo); + std::unique_ptr<AthenaAttributeList> getAttributeListPtr(const xAOD::EventInfo& einfo); + protected: /** the various components to build their own fragments of tag */ diff --git a/Database/AthenaPOOL/OutputStreamAthenaPool/src/EventInfoTagBuilder.cxx b/Database/AthenaPOOL/OutputStreamAthenaPool/src/EventInfoTagBuilder.cxx index 563904bd63fbce63edd47db880769e1bb98fb436..0df956aac45afb2191c7abaa8d85d11590e7f1bb 100755 --- a/Database/AthenaPOOL/OutputStreamAthenaPool/src/EventInfoTagBuilder.cxx +++ b/Database/AthenaPOOL/OutputStreamAthenaPool/src/EventInfoTagBuilder.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "EventInfoTagBuilder.h" @@ -41,8 +41,8 @@ StatusCode EventInfoTagBuilder::execute() { /** create a EventInfo Tag and ask the tool to fill it */ if (h_evt.isValid()) { - auto attribList = std::make_unique<AthenaAttributeList> - ( m_tool->getAttributeList( *h_evt ) ); + std::unique_ptr<AthenaAttributeList> attribList = + m_tool->getAttributeListPtr( *h_evt ); // Check whether to propagate if (m_propInput) {