7#ifndef ATHENAKERNEL_STORABLECONVERSIONS_H
8# define ATHENAKERNEL_STORABLECONVERSIONS_H
17#include "GaudiKernel/DataObject.h"
39 bool isConst =
true) {
59 const std::type_info* tinfo =
nullptr,
61 IRegisterTransient* irt = 0,
79 const std::type_info* tinfo =
nullptr,
81 IRegisterTransient* irt = 0,
128 template <
class T,
class U >
135 static constexpr bool has_base = std::is_same_v<base1, SG::NoBase>;
138 using deflt = std::type_identity<SG::DataBucket<U> >;
144 using type =
typename std::conditional_t<has_base, deflt, recurse>::type;
152 template <
typename T>
155 return new bucket_t (pObject);
158 template <
typename T>
160 typedef typename std::remove_const<T>::type T_nc;
162 return new bucket_t (std::move(pObject));
168 template <
typename T>
174 typedef typename std::remove_const<T>::type T_nc;
179 quiet, irt, isConst));
180 return pTrans !=
nullptr;
a traits class that associates a CLID to a type T It also detects whether T inherits from Gaudi DataO...
uint32_t CLID
The Class ID type.
Interface for registering a transient object in t2p map.
T * Storable_cast(DataObject *pDObj, bool quiet=true, IRegisterTransient *irt=0, bool isConst=true)
typename SG::BaseType< T >::type BaseType_t
bool fromStorable(DataObject *pDObj, T *&pTrans, bool quiet=false, IRegisterTransient *irt=0, bool isConst=true)
DataObject * asStorable(SG::DataObjectSharedPtr< T > pObject)
Metafunction to find the proper DataBucket class for T.
static void init()
Initialization hook. A no-op by default.
SG::BaseType_t< typename SG::Bases< T >::bases::Base1 > base1
typename std::conditional_t< has_base, deflt, recurse >::type type
static constexpr bool has_base
std::type_identity< SG::DataBucket< U > > deflt
DataBucketTrait< base1, U > recurse