From ef04bf31a10e003c771d54312aa52c3669928496 Mon Sep 17 00:00:00 2001 From: scott snyder <sss@karma> Date: Fri, 17 Jul 2020 12:07:08 -0400 Subject: [PATCH] AthenaRootComps: Add IAthenaOutputTool::preStream() Add abstract method IAthenaOutputTool::preStream(). To be called just before streaming objects. --- .../src/RootNtupleOutputMetadataTool.cxx | 7 +++---- .../src/RootNtupleOutputMetadataTool.h | 21 ++++++++++--------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Database/AthenaRoot/AthenaRootComps/src/RootNtupleOutputMetadataTool.cxx b/Database/AthenaRoot/AthenaRootComps/src/RootNtupleOutputMetadataTool.cxx index d2baa4b17ae..28d83f1e276 100755 --- a/Database/AthenaRoot/AthenaRootComps/src/RootNtupleOutputMetadataTool.cxx +++ b/Database/AthenaRoot/AthenaRootComps/src/RootNtupleOutputMetadataTool.cxx @@ -1,7 +1,7 @@ ///////////////////////// -*- C++ -*- ///////////////////////////// /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // RootNtupleOutputMetadataTool.cxx @@ -40,14 +40,12 @@ namespace Athena { RootNtupleOutputMetadataTool::RootNtupleOutputMetadataTool(const std::string& type, const std::string& name, const IInterface* parent) : - ::AthAlgTool(type, name, parent), + base_class(type, name, parent), m_imetaStore("InputMetaDataStore", name), m_ometaStore("MetaDataStore", name), m_clidSvc("ClassIDSvc", name), m_metaWritten(false) { - // Declare IAthenaOutputStreamTool interface - declareInterface<IAthenaOutputTool>(this); // Properties declareProperty("InputStore", m_imetaStore, @@ -149,6 +147,7 @@ RootNtupleOutputMetadataTool::finalize() StatusCode RootNtupleOutputMetadataTool::postInitialize() {return StatusCode::SUCCESS;} StatusCode RootNtupleOutputMetadataTool::preFinalize() {return StatusCode::SUCCESS;} StatusCode RootNtupleOutputMetadataTool::preExecute() {return StatusCode::SUCCESS;} +StatusCode RootNtupleOutputMetadataTool::preStream() {return StatusCode::SUCCESS;} StatusCode RootNtupleOutputMetadataTool::postExecute() {return StatusCode::SUCCESS;} void diff --git a/Database/AthenaRoot/AthenaRootComps/src/RootNtupleOutputMetadataTool.h b/Database/AthenaRoot/AthenaRootComps/src/RootNtupleOutputMetadataTool.h index d1784d76e18..f14103509ad 100755 --- a/Database/AthenaRoot/AthenaRootComps/src/RootNtupleOutputMetadataTool.h +++ b/Database/AthenaRoot/AthenaRootComps/src/RootNtupleOutputMetadataTool.h @@ -1,7 +1,7 @@ ///////////////////////// -*- C++ -*- ///////////////////////////// /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // RootNtupleOutputMetadataTool.h @@ -33,7 +33,7 @@ namespace Athena { * @brief This is the AthenaRoot version of AthenaServices/AthenaOutputStreamTool. **/ class RootNtupleOutputMetadataTool - : virtual public IIncidentListener, public ::IAthenaOutputTool, public ::AthAlgTool + : public extends<::AthAlgTool, IIncidentListener, ::IAthenaOutputTool> { public: @@ -46,16 +46,17 @@ public: virtual ~RootNtupleOutputMetadataTool(); /// Gaudi AlgTool Interface method implementations: - StatusCode initialize(); - StatusCode finalize(); - StatusCode stop(); + virtual StatusCode initialize() override; + virtual StatusCode finalize() override; + virtual StatusCode stop() override; /// AthenaOutputTool Interface method implementations: - StatusCode postInitialize(); - StatusCode preFinalize(); - StatusCode preExecute(); - StatusCode postExecute(); + virtual StatusCode postInitialize() override; + virtual StatusCode preFinalize() override; + virtual StatusCode preExecute() override; + virtual StatusCode preStream() override; + virtual StatusCode postExecute() override; /// Incident service handle listening for Begin/End InputFile incidents - void handle(const Incident& incident); + virtual void handle(const Incident& incident) override; /// Connect to the output stream /// Must writeMetadata BEFORE streaming -- GitLab