9#include "GaudiKernel/MsgStream.h"
10#include "GaudiKernel/DataObject.h"
11#include "GaudiKernel/SmartDataPtr.h"
12#include "GaudiKernel/RegistryEntry.h"
13#include "GaudiKernel/IOpaqueAddress.h"
15#include "EventModel/EventHeader.h"
16#include "McTruth/McEvent.h"
17#include "EventModel/EventModel.h"
18#include "RootCnvSvc/Mc/McCnv.h"
19#include "RootCnvSvc/RootEvtSelector.h"
20#include "RootCnvSvc/RootAddress.h"
21#include "RootCnvSvc/Util.h"
23using namespace DataSvcHelpers;
37 MsgStream log(
msgSvc(),
"McCnv");
38 log << MSG::DEBUG <<
"McCnv::initialize"<< endreq;
52 StatusCode sc=StatusCode::SUCCESS;
54 MsgStream log(
msgSvc(),
"McCnv");
55 log << MSG::DEBUG <<
"TObjectToDataObject" << endreq;
57 SmartDataPtr<Event::EventHeader> evt(
m_eds, EventModel::EventHeader);
59 log << MSG::ERROR <<
"Failed to retrieve McEvent" << endreq;
60 return StatusCode::FAILURE;
71 MsgStream log(
msgSvc(),
"McCnv");
72 log << MSG::DEBUG <<
"McCnv::DataObjectToTObject" << endreq;
76 if (m_common.
m_mcEvt != NULL)
return StatusCode::SUCCESS;
88 log << MSG::ERROR <<
"Could not downcast to TDS McEvent" << endreq;
89 return StatusCode::FAILURE;
100 log << MSG::ERROR <<
"Could not create branch TMcEvent" << endreq;
110 std::cout<<
"******************************"<<std::endl;
111 std::cout<<
" eveId: "<<evtId<<std::endl;
112 std::cout<<
" runId: "<<runId<<std::endl;
113 std::cout<<
"******************************"<<std::endl;
117 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
virtual StatusCode initialize()
Definition of a Root address, derived from IOpaqueAddress.
std::string getTreename() const
void setMcCnv(McCnv *mccnv)
Base class for all Root Converters.
IDataProviderSvc * m_eds
pointer to eventdataservice
virtual StatusCode initialize()
RootInterface * m_rootInterface
pointer to the RootInterface
virtual StatusCode createBranch(const std::string &tree, const std::string &branch, const char *classname, void *addr, int &branchnr)
create a branch in this tree
static TMcEvent * m_mcEvt
Provide access to the ROOT event pointers.