From 498313dee3cf182664ba1280385d603fa581083c Mon Sep 17 00:00:00 2001 From: scott snyder <sss@karma> Date: Tue, 28 Jul 2020 21:41:23 -0400 Subject: [PATCH 1/3] AthContainersInterface: Remove IAuxStoreIO::selectAux. Remove the selectAux method of IAuxStore. Moving towards removing the AuxSelection members from the aux store base classes. --- .../AthContainersInterfaces/IAuxStoreIO.h | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/Control/AthContainersInterfaces/AthContainersInterfaces/IAuxStoreIO.h b/Control/AthContainersInterfaces/AthContainersInterfaces/IAuxStoreIO.h index 5346b680b71d..00789cdbc1ed 100644 --- a/Control/AthContainersInterfaces/AthContainersInterfaces/IAuxStoreIO.h +++ b/Control/AthContainersInterfaces/AthContainersInterfaces/IAuxStoreIO.h @@ -1,7 +1,7 @@ // This file's extension implies that it's C, but it's really -*- 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 */ // $Id: IAuxStoreIO.h 584348 2014-02-20 09:21:15Z krasznaa $ @@ -81,20 +81,7 @@ public: /** - * @brief Set up the object to only expose selected data items to the IO - * @param attr The attributes for selecting the variables to be written. - * - * The convention for the formatting of the attributes expected by this - * function is still a bit in flux, documentation will be provided later. - */ - virtual void selectAux (const std::set<std::string>& /*attr*/) {} - - - /** - * @brief Get a list of all the variables that need to be written out. - * - * The return value of this function depends on the parameters passed to - * selectAux previously. + * @brief Get a list of dynamic variables that need to be written out. */ virtual SG::auxid_set_t getSelectedAuxIDs() const { // default all are selected -- GitLab From 051575d754c16ad0f199d6299a0d8a38511a9117 Mon Sep 17 00:00:00 2001 From: scott snyder <sss@karma> Date: Tue, 28 Jul 2020 22:09:18 -0400 Subject: [PATCH 2/3] xAODCore: Remove IAuxStoreIO::selectAux. Remove the selectAux method of IAuxStore. Moving towards removing the AuxSelection members from the aux store base classes. --- Event/xAOD/xAODCore/Root/AuxContainerBase.cxx | 10 ---------- Event/xAOD/xAODCore/Root/AuxInfoBase.cxx | 9 --------- Event/xAOD/xAODCore/Root/ShallowAuxContainer.cxx | 10 +--------- Event/xAOD/xAODCore/test/ut_xaodcore_shallowcopy.cxx | 9 +++++---- Event/xAOD/xAODCore/xAODCore/AuxContainerBase.h | 3 --- Event/xAOD/xAODCore/xAODCore/AuxInfoBase.h | 5 +---- Event/xAOD/xAODCore/xAODCore/ShallowAuxContainer.h | 5 +---- 7 files changed, 8 insertions(+), 43 deletions(-) diff --git a/Event/xAOD/xAODCore/Root/AuxContainerBase.cxx b/Event/xAOD/xAODCore/Root/AuxContainerBase.cxx index 40cd0a7a4e51..95484438acb6 100644 --- a/Event/xAOD/xAODCore/Root/AuxContainerBase.cxx +++ b/Event/xAOD/xAODCore/Root/AuxContainerBase.cxx @@ -617,16 +617,6 @@ namespace xAOD { return dummy; } - void - AuxContainerBase::selectAux( const std::set< std::string >& attributes ) { - - // Guard against multi-threaded execution: - guard_t guard( m_mutex ); - - m_selection.selectAux( attributes ); - return; - } - AuxContainerBase::auxid_set_t AuxContainerBase::getSelectedAuxIDs() const { diff --git a/Event/xAOD/xAODCore/Root/AuxInfoBase.cxx b/Event/xAOD/xAODCore/Root/AuxInfoBase.cxx index 65a86d6a007e..86e29eb9c4ac 100644 --- a/Event/xAOD/xAODCore/Root/AuxInfoBase.cxx +++ b/Event/xAOD/xAODCore/Root/AuxInfoBase.cxx @@ -583,15 +583,6 @@ namespace xAOD { return dummy; } - void AuxInfoBase::selectAux( const std::set< std::string >& attributes ) { - - // Guard against multi-threaded execution: - guard_t guard( m_mutex ); - - m_selection.selectAux( attributes ); - return; - } - AuxInfoBase::auxid_set_t AuxInfoBase::getSelectedAuxIDs() const { diff --git a/Event/xAOD/xAODCore/Root/ShallowAuxContainer.cxx b/Event/xAOD/xAODCore/Root/ShallowAuxContainer.cxx index 5db106afb16f..ad1eb37ac96f 100644 --- a/Event/xAOD/xAODCore/Root/ShallowAuxContainer.cxx +++ b/Event/xAOD/xAODCore/Root/ShallowAuxContainer.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // $Id: ShallowAuxContainer.cxx 793737 2017-01-24 20:11:10Z ssnyder $ @@ -468,14 +468,6 @@ namespace xAOD { } } - void ShallowAuxContainer:: - selectAux( const std::set< std::string >& attributes ) { - - guard_t guard (m_mutex); - m_selection.selectAux( attributes ); - return; - } - ShallowAuxContainer::auxid_set_t ShallowAuxContainer::getSelectedAuxIDs() const { diff --git a/Event/xAOD/xAODCore/test/ut_xaodcore_shallowcopy.cxx b/Event/xAOD/xAODCore/test/ut_xaodcore_shallowcopy.cxx index 29f49daf3b40..1d04b81dbf05 100644 --- a/Event/xAOD/xAODCore/test/ut_xaodcore_shallowcopy.cxx +++ b/Event/xAOD/xAODCore/test/ut_xaodcore_shallowcopy.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 */ // $Id: ut_xaodcore_shallowcopy.cxx 673658 2015-06-09 12:45:34Z krasznaa $ @@ -95,11 +95,12 @@ int testCopy (const DataVector<SG::AuxElement>& origVec, } // Finally, test variable filtering: - copyAux.selectAux( std::set< std::string >( { "FloatVar", "DoubleVar" } ) ); + xAOD::AuxSelection sel; + sel.selectAux (std::set< std::string >( { "FloatVar", "DoubleVar" } ) ); copyAux.setShallowIO( true ); - SIMPLE_ASSERT( copyAux.getSelectedAuxIDs().size() == 1 ); + SIMPLE_ASSERT( sel.getSelectedAuxIDs (copyAux.getSelectedAuxIDs()).size() == 1 ); copyAux.setShallowIO( false ); - SIMPLE_ASSERT( copyAux.getSelectedAuxIDs().size() == 2 ); + SIMPLE_ASSERT( sel.getSelectedAuxIDs (copyAux.getSelectedAuxIDs()).size() == 2 ); return 0; } diff --git a/Event/xAOD/xAODCore/xAODCore/AuxContainerBase.h b/Event/xAOD/xAODCore/xAODCore/AuxContainerBase.h index 8fe46c85f0e1..c90549919af3 100644 --- a/Event/xAOD/xAODCore/xAODCore/AuxContainerBase.h +++ b/Event/xAOD/xAODCore/xAODCore/AuxContainerBase.h @@ -153,9 +153,6 @@ namespace xAOD { /// Get the types(names) of variables created dynamically virtual const auxid_set_t& getDynamicAuxIDs() const override; - /// Select dynamic Aux attributes by name (for writing) - virtual void selectAux( const std::set< std::string >& attributes ) override; - /// Get the IDs of the selected dynamic Aux variables (for writing) virtual SG::auxid_set_t getSelectedAuxIDs() const override; diff --git a/Event/xAOD/xAODCore/xAODCore/AuxInfoBase.h b/Event/xAOD/xAODCore/xAODCore/AuxInfoBase.h index e75f1773ef62..7df0856d9cd8 100644 --- a/Event/xAOD/xAODCore/xAODCore/AuxInfoBase.h +++ b/Event/xAOD/xAODCore/xAODCore/AuxInfoBase.h @@ -1,6 +1,6 @@ // Dear emacs, this is -*- c++ -*- /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef XAODCORE_AUXINFOBASE_H #define XAODCORE_AUXINFOBASE_H @@ -147,9 +147,6 @@ namespace xAOD { /// Get the types(names) of variables created dynamically virtual const auxid_set_t& getDynamicAuxIDs() const override; - /// Select dynamic Aux attributes by name (for writing) - virtual void selectAux( const std::set< std::string >& attributes ) override; - /// Get the IDs of the selected dynamic Aux variables (for writing) virtual SG::auxid_set_t getSelectedAuxIDs() const override; diff --git a/Event/xAOD/xAODCore/xAODCore/ShallowAuxContainer.h b/Event/xAOD/xAODCore/xAODCore/ShallowAuxContainer.h index 785feb3ea586..1150c88a8bd9 100644 --- a/Event/xAOD/xAODCore/xAODCore/ShallowAuxContainer.h +++ b/Event/xAOD/xAODCore/xAODCore/ShallowAuxContainer.h @@ -1,7 +1,7 @@ // Dear emacs, this is -*- c++ -*- /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // $Id: ShallowAuxContainer.h 793737 2017-01-24 20:11:10Z ssnyder $ @@ -154,9 +154,6 @@ namespace xAOD { /// Get the types(names) of variables created dynamically virtual const auxid_set_t& getDynamicAuxIDs() const override; - /// Select dynamic Aux attributes by name (for writing) - virtual void selectAux( const std::set< std::string >& attributes ) override; - /// Get the IDs of the selected dynamic Aux variables (for writing) virtual auxid_set_t getSelectedAuxIDs() const override; -- GitLab From 308105fd6a2f9360ce6861ceb57ce2698c3d8118 Mon Sep 17 00:00:00 2001 From: scott snyder <sss@karma> Date: Tue, 28 Jul 2020 22:04:03 -0400 Subject: [PATCH 3/3] xAODRootAccess: Removing IAuxStoreIO::selectAux. Removed the selectAux method of IAuxStore, so remove the override keyword here. Moving towards removing the AuxSelection members from the aux store base classes. --- Control/xAODRootAccess/xAODRootAccess/TAuxStore.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Control/xAODRootAccess/xAODRootAccess/TAuxStore.h b/Control/xAODRootAccess/xAODRootAccess/TAuxStore.h index ef198405d526..21f42479ddb5 100644 --- a/Control/xAODRootAccess/xAODRootAccess/TAuxStore.h +++ b/Control/xAODRootAccess/xAODRootAccess/TAuxStore.h @@ -170,7 +170,7 @@ namespace xAOD { /// Select dynamic auxiliary attributes for writing virtual void - selectAux( const std::set< std::string >& attributes ) override; + selectAux( const std::set< std::string >& attributes ); /// Get the IDs of the selected aux variables virtual auxid_set_t getSelectedAuxIDs() const override; -- GitLab