2 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
7 * @file CaloIdCnv/CaloIDHelper_IDDetDescrCnv.icc
8 * @author scott snyder <snyder@bnl.gov>
10 * @brief Common code for creating calo ID helpers in the detector store.
14 #include "AthenaKernel/StorableConversions.h"
15 #include "AthenaKernel/errorcheck.h"
22 * @brief Helper function to actually create a new helper.
23 * @param svcloc Gaudi service locator.
24 * @param helperKey The StoreGate key of the helper being created.
25 * @param idhelper[out] Set to the created helper.
27 * The default implementation just does @c new with the default constructor;
28 * however, this function may be overridden for specific types.
31 StatusCode make_CaloIDHelper (ISvcLocator* /*svcloc*/,
32 const std::string& /*helperKey*/,
36 return StatusCode::SUCCESS;
41 * @brief Return the CLID of the class we create.
42 * Required by the converter infrastructure.
45 const CLID& CaloIDHelper_IDDetDescrCnv_T<T>::classID()
47 return ClassID_traits<T>::ID();
53 * @param svcloc Gaudi service locator.
56 CaloIDHelper_IDDetDescrCnv_T<T>::CaloIDHelper_IDDetDescrCnv_T
58 : CaloIDHelper_IDDetDescrCnv (classID(), svcloc)
64 * @brief Create the helper object.
65 * @param helperKey StoreGate key of the helper.
66 * @param idhelper[out] Set to a pointer to the new helper.
67 * @param pObj[out] Set to a reference to the created helper.
71 CaloIDHelper_IDDetDescrCnv_T<T>::createHelper (const std::string& helperKey,
76 CHECK( make_CaloIDHelper (serviceLocator(), helperKey, helper) );
78 pObj = SG::asStorable(helper);
79 return StatusCode::SUCCESS;
83 } // namespace CaloIdCnv