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 "RawEvent/DigiEvent.h"
17#include "EventModel/EventModel.h"
18#include "RootCnvSvc/Digi/DigiCnv.h"
19#include "RootCnvSvc/RootEvtSelector.h"
20#include "RootCnvSvc/RootAddress.h"
21#include "RootCnvSvc/Util.h"
23using namespace DataSvcHelpers;
30 m_rootBranchname =
"m_fromMc";
32 m_adresses.push_back(&m_fromMc);
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.
virtual StatusCode initialize()
int m_branchNr
the branchNr of this converter for writing
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
void initialize(Bool_t fromMc=true)
static TDigiEvent * m_recEvt
Provide access to the ROOT event pointers.