1#include "GaudiKernel/MsgStream.h"
3#include "EventModel/EventModel.h"
4#include "EvtRecEvent/EvtRecObject.h"
5#include "RootEventData/TEvtRecObject.h"
7#include "RootCnvSvc/EvtRec/EvtRecCnv.h"
8#include "RootCnvSvc/RootAddress.h"
25 MsgStream log(
msgSvc(),
"EvtRecCnv" );
26 log << MSG::DEBUG <<
"EvtRecCnv::TObjectToDataObject" << endmsg;
30 refpObject = evtRecObject;
32 return StatusCode::SUCCESS;
37 MsgStream log(
msgSvc(),
"EvtRecCnv" );
38 log << MSG::DEBUG <<
"EvtRecCnv::DataObjectToTObject" << endmsg;
40 if ( m_common.m_evtRecObject != NULL )
return StatusCode::SUCCESS;
45 log << MSG::ERROR <<
"Could not downcast to EvtRecObject" << endmsg;
46 return StatusCode::FAILURE;
50 m_common.m_evtRecObject = m_objWrite;
56 m_objWrite->ClassName(), &m_objWrite,
61 cout <<
"Could not create branch TEvtRecObject" << endl;
62 log << MSG::ERROR <<
"Could not create branch TEvtRecObject" << endmsg;
67 m_objWrite->initialize();
69 return StatusCode::SUCCESS;
virtual StatusCode initialize()
static const CLID & classID()
virtual StatusCode DataObjectToTObject(DataObject *obj, RootAddress *addr)
transformation to root
virtual StatusCode TObjectToDataObject(DataObject *&obj)
transformation from root
EvtRecCnv(ISvcLocator *svc)
Definition of a Root address, derived from IOpaqueAddress.
std::string getTreename() const
virtual StatusCode initialize()
RootInterface * m_rootInterface
pointer to the RootInterface
std::string m_rootBranchname
root branchname (may be concatenated of severals)
RootEventBaseCnv(const CLID &clid, ISvcLocator *svc)