23#include "GaudiKernel/DataObject.h"
25#include "GaudiKernel/ServiceHandle.h"
26#include "GaudiKernel/System.h"
37 std::string name_from_clid (
const CLID clid)
40 o <<
"AthenaRootxAODCnv_" << clid;
54 ISvcLocator* pSvcLocator ) :
55 ::
Converter( POOL_ROOTTREE_StorageType, clid, pSvcLocator ),
67 ::
Converter ( POOL_ROOTTREE_StorageType, CLID_NULL, pSvcLocator ),
96 if ( ::Converter::initialize().isFailure() ) {
98 return StatusCode::FAILURE;
105 IDictLoaderSvc_t dictSvc(
"AthDictLoaderSvc",
108 if ( !dictSvc.retrieve().isSuccess() ) {
109 ATH_MSG_ERROR(
"could not retrieve [" << dictSvc.typeAndName() <<
"] !");
110 return StatusCode::FAILURE;
113 RootType ty = dictSvc->load_type(this->objType());
115 << this->objType() <<
"]: name=["
116 << ty.
Name() <<
"]");
119 ATH_MSG_DEBUG(
"converter correctly initialized - clid=[" << objType() <<
"]");
120 return StatusCode::SUCCESS;
131 return POOL_ROOTTREE_StorageType;
144 ATH_MSG_DEBUG(
"::createObj(" << pAddr <<
", " << pObj <<
")");
148 return StatusCode::FAILURE;
151 <<
"/" << rba->par()[1] <<
"]...");
157 <<
"/" << rba->par()[1] <<
"]... [done]");
164 return StatusCode::SUCCESS;
175 ATH_MSG_INFO(
"::createRep(" << pObj <<
", " << pAddr <<
")");
178 return StatusCode::FAILURE;
180 msg(MSG::INFO) <<
" -> clid: [" << pObj->clID() <<
"]" <<
endmsg
181 <<
" -> name: [" << pObj->name() <<
"]" <<
endmsg;
202 GenericAddress* addr =
new GenericAddress(POOL_ROOTTREE_StorageType,
207 (POOL_ROOTTREE_StorageType,
id,
210 (
unsigned long)(value_ptr),
211 (
unsigned long)(m_nbrEvts-1));
214 return StatusCode::SUCCESS;
220 std::cout <<
"Calling xAODCnv::storageType" << std::endl;
222 return POOL_ROOTTREE_StorageType;
#define ATH_MSG_VERBOSE(x)
uint32_t CLID
The Class ID type.
Include TBranchElement.h, suppressing clang warnings.
MsgStream & msg() const
The standard message stream.
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
A simple class to do the retrieve from TEvent.
virtual ~xAODCnv()
Destructor:
static long storageType()
xAODCnv(const CLID &clid, ISvcLocator *pSvcLocator)
Constructor with parameters:
virtual StatusCode createObj(IOpaqueAddress *pAddr, DataObject *&pObj)
Create a transient object from a persistent representation.
virtual StatusCode initialize()
Gaudi Service Implementation.
virtual StatusCode createRep(DataObject *pObj, IOpaqueAddress *&pAddr)
Create a persistent representation for a transient object.
RootType m_type
the type we can convert
std::string Name(unsigned int mod=Reflex::SCOPED) const
Some weak symbol referencing magic... These are declared in AthenaKernel/getMessageSvc....