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 "RawEvent/DigiEvent.h"
18#include "RootCnvSvc/Digi/DigiCnv.h"
19#include "RootCnvSvc/RootAddress.h"
20#include "RootCnvSvc/RootEvtSelector.h"
23using namespace DataSvcHelpers;
36 MsgStream log(
msgSvc(),
"DigiCnv" );
37 log << MSG::DEBUG <<
"DigiCnv::initialize" << endmsg;
49 StatusCode sc = StatusCode::SUCCESS;
51 MsgStream log(
msgSvc(),
"DigiCnv" );
52 log << MSG::DEBUG <<
"TObjectToDataObject" << endmsg;
70 MsgStream log(
msgSvc(),
"DigiCnv" );
71 log << MSG::DEBUG <<
"DigiCnv::DataObjectToTObject" << endmsg;
76 if ( m_common.m_recEvt != NULL )
return StatusCode::SUCCESS;
89 log << MSG::ERROR <<
"Could not downcast to TDS RecEvent" << endmsg;
90 return StatusCode::FAILURE;
94 m_common.m_recEvt = m_objWrite;
102 m_objWrite->ClassName(), &m_objWrite,
m_branchNr );
103 if ( sc.isFailure() )
105 log << MSG::ERROR <<
"Could not create branch TDigiEvent" << endmsg;
113 Bool_t fromMc = devtTds->
fromMc();
118 std::cout <<
"******************************" << std::endl;
119 std::cout <<
" eveId: " << evtId << std::endl;
120 std::cout <<
" runId: " << runId << std::endl;
121 std::cout <<
" fromMc: " << fromMc << std::endl;
122 std::cout <<
"******************************" << std::endl;
124 m_objWrite->initialize( fromMc );
126 return StatusCode::SUCCESS;
static const CLID & classID()
virtual StatusCode initialize()
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
DigiCnv(ISvcLocator *svc)
void initialize(bool fromMc)
bool fromMc() const
Retrieve flag of origin.
Definition of a Root address, derived from IOpaqueAddress.
std::string getTreename() const
virtual StatusCode initialize()
std::vector< void * > m_adresses
each converter knows the corresponding adresses
int m_branchNr
the branchNr of this converter for writing
RootInterface * m_rootInterface
pointer to the RootInterface
std::string m_rootBranchname
root branchname (may be concatenated of severals)
RootEventBaseCnv(const CLID &clid, ISvcLocator *svc)