From 59c01b1d12609cc613d709f73edc87d48adea2f2 Mon Sep 17 00:00:00 2001 From: sss <sss@karma> Date: Sat, 23 Nov 2024 22:43:41 -0500 Subject: [PATCH] AthLinks: Move checkForRemap out-of-line. Cleaning up header dependencies. --- Control/AthLinks/AthLinks/ElementLink.h | 3 +- Control/AthLinks/AthLinks/ElementLink.icc | 28 ++-------------- Control/AthLinks/src/ElementLink.cxx | 41 +++++++++++++++++++++++ 3 files changed, 44 insertions(+), 28 deletions(-) create mode 100644 Control/AthLinks/src/ElementLink.cxx diff --git a/Control/AthLinks/AthLinks/ElementLink.h b/Control/AthLinks/AthLinks/ElementLink.h index d71fa23428af..761fbab72bc0 100644 --- a/Control/AthLinks/AthLinks/ElementLink.h +++ b/Control/AthLinks/AthLinks/ElementLink.h @@ -1,7 +1,7 @@ // This file's extension implies that it's C, but it's really -*- C++ -*-. /* - Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration */ /** @@ -757,7 +757,6 @@ namespace SG_detail { * For other index types, the the templated version below is used * (which doesn't allow remapping indices). */ -inline bool checkForRemap (IProxyDict* sg, SG::sgkey_t sgkey_in, size_t index_in, diff --git a/Control/AthLinks/AthLinks/ElementLink.icc b/Control/AthLinks/AthLinks/ElementLink.icc index 68bc93358c8d..6498256e83b2 100644 --- a/Control/AthLinks/AthLinks/ElementLink.icc +++ b/Control/AthLinks/AthLinks/ElementLink.icc @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration */ /** * @file AthLinks/ElementLink.h @@ -11,7 +11,6 @@ #include "AthLinks/exceptions.h" #include "AthenaKernel/proxyDictFromEventContext.h" -#include "AthenaKernel/IProxyDict.h" /** @@ -873,29 +872,6 @@ bool operator != (const ElementLink<STORABLE>& lhs, namespace SG_detail { -/** - * @brief See if an EL is being remapped. - * @param sgkey_in Original hashed key of the EL. - * @param index_in Original index of the EL. - * @param sgkey_out[out] New hashed key for the EL. - * @param index_out[out] New index for the EL. - * @return True if there is a remapping; false otherwise. - * - * This version is for the case where the EL index is a @c size_t. - * For other index types, the the templated version below is used - * (which doesn't allow remapping indices). - */ -inline -bool checkForRemap (IProxyDict* sg, - SG::sgkey_t sgkey_in, - size_t index_in, - SG::sgkey_t& sgkey_out, - size_t& index_out) -{ - return sg->tryELRemap (sgkey_in, index_in, sgkey_out, index_out); -} - - /** * @brief See if an EL is being remapped. * @param sgkey_in Original hashed key of the EL. @@ -917,7 +893,7 @@ bool checkForRemap (IProxyDict* sg, { size_t index_in = 0; size_t index_out; - return sg->tryELRemap (sgkey_in, index_in, sgkey_out, index_out); + return checkForRemap (sg, sgkey_in, index_in, sgkey_out, index_out); } diff --git a/Control/AthLinks/src/ElementLink.cxx b/Control/AthLinks/src/ElementLink.cxx new file mode 100644 index 000000000000..aa2327651d36 --- /dev/null +++ b/Control/AthLinks/src/ElementLink.cxx @@ -0,0 +1,41 @@ +/* + Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration +*/ +/** + * @file AthLinks/src/ElementLink.cxx + * @author scott snyder <snyder@bnl.gov> + * @date Nov, 2024 + * @brief a persistable pointer to an element of a STORABLE (data object) + */ + + +#include "AthLinks/ElementLink.h" +#include "AthenaKernel/IProxyDict.h" + + +namespace SG_detail { + + +/** + * @brief See if an EL is being remapped. + * @param sgkey_in Original hashed key of the EL. + * @param index_in Original index of the EL. + * @param sgkey_out[out] New hashed key for the EL. + * @param index_out[out] New index for the EL. + * @return True if there is a remapping; false otherwise. + * + * This version is for the case where the EL index is a @c size_t. + * For other index types, the the templated version below is used + * (which doesn't allow remapping indices). + */ +bool checkForRemap (IProxyDict* sg, + SG::sgkey_t sgkey_in, + size_t index_in, + SG::sgkey_t& sgkey_out, + size_t& index_out) +{ + return sg->tryELRemap (sgkey_in, index_in, sgkey_out, index_out); +} + + +} // namespace SG_detail -- GitLab