2   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
    7  * @file D3PDMakerUtils/ObjGetterTool.icc
 
    8  * @author scott snyder <snyder@bnl.gov>
 
   10  * @brief Template definitions for ObjGetterTool.
 
   18  * @brief Standard Gaudi tool constructor.
 
   19  * @param type The name of the tool type.
 
   20  * @param name The tool name.
 
   21  * @param parent The tool's Gaudi parent.
 
   24 ObjGetterTool<T>::ObjGetterTool (const std::string& type,
 
   25                                  const std::string& name,
 
   26                                  const IInterface* parent)
 
   27   : ObjGetterToolImpl (type, name, parent)
 
   33  * @brief Return the target object.
 
   34  * @param allowMissing If true, then we should not generate errors
 
   35  *        if the requested object is missing.
 
   37  * Should be of the type given by @c typeinfo.
 
   38  * Return 0 on failure.
 
   41 const void* ObjGetterTool<T>::getUntyped (bool allowMissing /*= false*/)
 
   43   return get (allowMissing);
 
   48  * @brief Return the type of object retrieved by this tool.
 
   51 const std::type_info& ObjGetterTool<T>::typeinfo() const
 
   58  * @brief Release an object retrieved from the getter.
 
   59  * @param p The object to release.
 
   61  * Call this when you are done with the object returned by
 
   62  * @c get().  The default implementation is a no-op,
 
   63  * but if the getter dynamically allocated the object which
 
   64  * it returned, this gives it a chance to free it.
 
   67 void ObjGetterTool<T>::releaseObject (const T* /*p*/)
 
   73  * @brief Release an object retrieved from the getter.
 
   74  * @param p The object to release.
 
   76  * Call this when you are done with the object returned by
 
   77  * @c getUntyped().  The default implementation is a no-op,
 
   78  * but if the getter dynamically allocated the object which
 
   79  * it returned, this gives it a chance to free it.
 
   82 void ObjGetterTool<T>::releaseObjectUntyped (const void* p)
 
   84   releaseObject (reinterpret_cast<const T*> (p));