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"
23using namespace DataSvcHelpers;
39 MsgStream log(
msgSvc(),
"DigiCnv");
40 log << MSG::DEBUG <<
"DigiCnv::initialize"<< endreq;
53 StatusCode sc=StatusCode::SUCCESS;
55 MsgStream log(
msgSvc(),
"DigiCnv");
56 log << MSG::DEBUG <<
"TObjectToDataObject" << endreq;
74 MsgStream log(
msgSvc(),
"DigiCnv");
75 log << MSG::DEBUG <<
"DigiCnv::DataObjectToTObject" << endreq;
79 if (m_common.
m_recEvt !=
NULL)
return StatusCode::SUCCESS;
91 log << MSG::ERROR <<
"Could not downcast to TDS RecEvent" << endreq;
92 return StatusCode::FAILURE;
102 if (sc.isFailure()) {
103 log << MSG::ERROR <<
"Could not create branch TDigiEvent" << endreq;
111 Bool_t fromMc = devtTds->
fromMc();
116 std::cout<<
"******************************"<<std::endl;
117 std::cout<<
" eveId: "<<evtId<<std::endl;
118 std::cout<<
" runId: "<<runId<<std::endl;
119 std::cout<<
" fromMc: "<<fromMc<<std::endl;
120 std::cout<<
"******************************"<<std::endl;
124 return StatusCode::SUCCESS;
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
void setDigiCnv(DigiCnv *reccnv)
Base class for all Root Converters.
std::vector< void * > m_adresses
each converter knows the corresponding adresses
virtual StatusCode initialize()
RootInterface * m_rootInterface
pointer to the RootInterface
int m_branchNr
the branchNr of this converter for writing
std::string m_rootBranchname
root branchname (may be concatenated of severals)
virtual StatusCode createBranch(const std::string &tree, const std::string &branch, const char *classname, void *addr, int &branchnr)
create a branch in this tree
void initialize(Bool_t fromMc=true)
static TDigiEvent * m_recEvt
Provide access to the ROOT event pointers.