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"
19#include "EventModel/EventHeader.h"
20#include "EventModel/EventModel.h"
21#include "RootEventData/TEvtHeader.h"
22#include "RootCnvSvc/EvtHeaderCnv.h"
23#include "RootCnvSvc/RootEvtSelector.h"
24#include "RootCnvSvc/RootAddress.h"
25#include "RootCnvSvc/Util.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";
40 m_adresses.push_back(&m_runId);
41 m_adresses.push_back(&m_eventId);
42 m_adresses.push_back(&m_time);
43 m_adresses.push_back(&m_eventTag);
44 m_adresses.push_back(&m_flag1);
45 m_adresses.push_back(&m_flag2);
50 StatusCode sc=StatusCode::SUCCESS;
52 MsgStream log(
msgSvc(),
"EvtHeaderCnv");
53 log << MSG::DEBUG <<
"TObjectToDataObject" << endreq;
67 log << MSG::DEBUG <<
"TObjectToDataObject eventid = "<<m_eventId<<
" "<<m_runId
68 <<
" "<<std::hex<<
"0x"<<m_eventTag<<std::dec<<endreq;
79 MsgStream log(
msgSvc(),
"EvtHeaderCnv");
80 log << MSG::DEBUG <<
"EvtHeaderCnv::initialize"<< endreq;
93 MsgStream log(
msgSvc(),
"EvtHeaderCnv");
94 log << MSG::DEBUG <<
"EvtHeaderCnv::DataObjectToTObject" << endreq;
99 log << MSG::ERROR <<
"Could not downcast to TDS EventHeader" << endreq;
100 return StatusCode::FAILURE;
107 UInt_t flag1 = devtTds->
flag1();
108 UInt_t flag2 = devtTds->
flag2();
112 return StatusCode::SUCCESS;
119 log << MSG::DEBUG <<
"EvtHeaderCnv::DataObjectToTObject tree name: " <<rootaddr->
getTreename()<<endreq;
124 if (sc.isFailure()) {
126 log << MSG::ERROR <<
"Could not create branch TEvtHeader" << endreq;
127 return StatusCode::SUCCESS;
138 log << MSG::DEBUG <<
"EvtHeaderCnv::DataObjectToTObject eventid = "<<evtId<<
" "<<runId <<
" "<<std::hex<<evtTag<<std::dec<< endreq;
145 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.
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 TEvtHeader * m_EvtHeader