9#include "GaudiKernel/DataObject.h"
10#include "GaudiKernel/IOpaqueAddress.h"
11#include "GaudiKernel/MsgStream.h"
12#include "GaudiKernel/RegistryEntry.h"
13#include "GaudiKernel/SmartDataPtr.h"
15#include "EventModel/EventHeader.h"
16#include "EventModel/EventModel.h"
17#include "McTruth/McEvent.h"
18#include "RootCnvSvc/Mc/McCnv.h"
19#include "RootCnvSvc/RootAddress.h"
20#include "RootCnvSvc/RootEvtSelector.h"
23using namespace DataSvcHelpers;
35 MsgStream log(
msgSvc(),
"McCnv" );
36 log << MSG::DEBUG <<
"McCnv::initialize" << endmsg;
48 StatusCode sc = StatusCode::SUCCESS;
50 MsgStream log(
msgSvc(),
"McCnv" );
51 log << MSG::DEBUG <<
"TObjectToDataObject" << endmsg;
53 SmartDataPtr<Event::EventHeader> evt(
m_eds, EventModel::EventHeader );
56 log << MSG::ERROR <<
"Failed to retrieve McEvent" << endmsg;
57 return StatusCode::FAILURE;
68 MsgStream log(
msgSvc(),
"McCnv" );
69 log << MSG::DEBUG <<
"McCnv::DataObjectToTObject" << endmsg;
74 if ( m_common.m_mcEvt != NULL )
return StatusCode::SUCCESS;
87 log << MSG::ERROR <<
"Could not downcast to TDS McEvent" << endmsg;
88 return StatusCode::FAILURE;
92 m_common.m_mcEvt = m_objWrite;
101 if ( sc.isFailure() )
103 log << MSG::ERROR <<
"Could not create branch TMcEvent" << endmsg;
112 std::cout <<
"******************************" << std::endl;
113 std::cout <<
" eveId: " << evtId << std::endl;
114 std::cout <<
" runId: " << runId << std::endl;
115 std::cout <<
"******************************" << std::endl;
117 m_objWrite->initialize();
119 return StatusCode::SUCCESS;
virtual StatusCode TObjectToDataObject(DataObject *&refpObject)
do the transformation from ROOT to TDS object
virtual StatusCode DataObjectToTObject(DataObject *obj, RootAddress *addr)
transformation from TDS object to ROOT
static const CLID & classID()
virtual StatusCode initialize()
Definition of a Root address, derived from IOpaqueAddress.
std::string getTreename() const
IDataProviderSvc * m_eds
pointer to eventdataservice
virtual StatusCode initialize()
RootInterface * m_rootInterface
pointer to the RootInterface
RootEventBaseCnv(const CLID &clid, ISvcLocator *svc)