2 * Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration.
5 * @file AthenaKernel/CondObjDeleter.icc
6 * @author scott snyder <snyder@bnl.gov>
8 * @brief Deletion object for conditions payloads.
17 * @param rcusvc Service with which to register.
20 CondObjDeleter<T>::CondObjDeleter (Athena::IRCUSvc& rcusvc)
21 : CxxUtils::IRangeMapPayloadDeleter<void, EventContext> (delPayload),
22 m_obj (rcusvc, Athena::IRCUObject::NoObject)
28 * @brief Queue an object for deletion.
29 * @param p The object to delete.
31 * The object should not actually be deleted until @c quiescent has been
32 * called for each active slot.
35 void CondObjDeleter<T>::discard (const void* p)
37 const T* pp = static_cast<const T*> (p);
38 m_obj.discard (std::unique_ptr<const T> (pp));
43 * @brief Mark a slot as quiescent.
44 * @param ctx Event context identifying the slot.
47 void CondObjDeleter<T>::quiescent (const EventContext& ctx)
49 m_obj.quiescent (ctx);
54 * @brief Function to delete a payload object immediately.
57 void CondObjDeleter<T>::delPayload (const void* p)
59 delete static_cast<const T*>(p);