6#ifndef EvtHeaderCnv_CXX
7#define EvtHeaderCnv_CXX
9#include "GaudiKernel/MsgStream.h"
10#include "GaudiKernel/DataObject.h"
11#include "GaudiKernel/SmartDataPtr.h"
12#include "GaudiKernel/RegistryEntry.h"
13#include "GaudiKernel/IDataProviderSvc.h"
14#include "GaudiKernel/ISvcLocator.h"
15#include "GaudiKernel/PropertyMgr.h"
17#include "GaudiKernel/IOpaqueAddress.h"
27using namespace DataSvcHelpers;
35 MsgStream log(
msgSvc(),
"EvtHeaderCnv");
36 log << MSG::DEBUG <<
" constructor of EvtHeaderCnv "<<endreq;
38 m_rootBranchname =
"m_runId:m_eventId:m_time:m_eventTag:m_flag1:m_flag2:m_etsT1:m_etsT2";
52 StatusCode sc=StatusCode::SUCCESS;
54 MsgStream log(
msgSvc(),
"EvtHeaderCnv");
55 log << MSG::DEBUG <<
"TObjectToDataObject" << endreq;
71 log << MSG::DEBUG <<
"TObjectToDataObject eventid = "<<m_eventId<<
" "<<m_runId
72 <<
" "<<std::hex<<
"0x"<<m_eventTag<<std::dec<<endreq;
83 MsgStream log(
msgSvc(),
"EvtHeaderCnv");
84 log << MSG::DEBUG <<
"EvtHeaderCnv::initialize"<< endreq;
97 MsgStream log(
msgSvc(),
"EvtHeaderCnv");
98 log << MSG::DEBUG <<
"EvtHeaderCnv::DataObjectToTObject" << endreq;
103 log << MSG::ERROR <<
"Could not downcast to TDS EventHeader" << endreq;
104 return StatusCode::FAILURE;
109 UInt_t time = devtTds->
time();
111 UInt_t flag1 = devtTds->
flag1();
112 UInt_t flag2 = devtTds->
flag2();
113 ULong_t etsT1 = devtTds->
etsT1();
114 ULong_t etsT2 = devtTds->
etsT2();
118 return StatusCode::SUCCESS;
125 log << MSG::DEBUG <<
"EvtHeaderCnv::DataObjectToTObject tree name: " <<rootaddr->
getTreename()<<endreq;
130 if (sc.isFailure()) {
132 log << MSG::ERROR <<
"Could not create branch TEvtHeader" << endreq;
133 return StatusCode::SUCCESS;
146 log << MSG::DEBUG <<
"EvtHeaderCnv::DataObjectToTObject eventid = "<<evtId<<
" "<<runId <<
" "<<std::hex<<evtTag<<std::dec<< endreq;
155 return StatusCode::SUCCESS;
Definition of a Root address, derived from IOpaqueAddress.
std::string getTreename() const
void setEvtHeaderCnv(EvtHeaderCnv *evtheadercnv)
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
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
static TEvtHeader * m_EvtHeader