1#ifndef DstHltInfCnv_CXX
2#define DstHltInfCnv_CXX 1
4#include "GaudiKernel/DataObject.h"
5#include "GaudiKernel/MsgStream.h"
7#include "TClonesArray.h"
9#include "EventModel/EventModel.h"
10#include "HltEvent/DstHltInf.h"
11#include "HltEvent/HltEvent.h"
12#include "Identifier/HltID.h"
13#include "RootCnvSvc/Hlt/DstHltInfCnv.h"
14#include "RootCnvSvc/Hlt/HltCnv.h"
15#include "RootCnvSvc/RootAddress.h"
16#include "RootEventData/TDstHltInf.h"
17#include "RootEventData/THltEvent.h"
25 MsgStream log(
msgSvc(),
"DstHltInfCnv" );
36 MsgStream log(
msgSvc(),
"DstHltInfCnv" );
37 log << MSG::DEBUG <<
"DstHltInfCnv::TObjectToDataObject" << endmsg;
38 StatusCode sc = StatusCode::SUCCESS;
42 refpObject = dstHltInfTds;
45 if ( !m_dstHltInf )
return sc;
48 int alg = m_dstHltInf->getAlgProcess();
49 int cri = m_dstHltInf->getCriteriaTable();
50 int ver = m_dstHltInf->getVersion();
51 float etot = m_dstHltInf->getTotalEnergy();
61 uint32_t nsub = m_dstHltInf->getNumber();
62 uint32_t ncon = m_dstHltInf->getNCON();
63 uint32_t nmdc = nsub & 0XFF;
64 uint32_t ntof = ( nsub >> 8 ) & 0XFF;
65 uint32_t nemc = ( nsub >> 16 ) & 0XFF;
66 uint32_t nmuc = nsub >> 24;
69 {
throw exception(); }
84 return StatusCode::SUCCESS;
89 MsgStream log(
msgSvc(),
"DstHltInfCnv" );
90 log << MSG::DEBUG <<
"DstHltInfCnv::DataObjectToTObject" << endmsg;
91 StatusCode sc = StatusCode::SUCCESS;
94 if ( !dstHltInfCnvTds )
96 log << MSG::ERROR <<
"Could not downcast to DstHltInf" << endmsg;
97 return StatusCode::FAILURE;
104 log << MSG::ERROR <<
"Could not get DstHltInf in TDS " << endmsg;
105 return StatusCode::FAILURE;
110 { log << MSG::ERROR <<
"DstHltInfCnv:Could not downcast to TDS DstHltInf" << endmsg; }
112 IOpaqueAddress* addr;
113 m_cnvSvc->getHltCnv()->createRep( evt, addr );
118 if ( !tHltInf )
return sc;
126 Int_t nsub = dstHltInfCnvTds->
getNumber();
127 Int_t ncon = dstHltInfCnvTds->
getNCON();
137 dstHltInfRoot->
setNCON( ncon );
141 return StatusCode::SUCCESS;
static const CLID & classID()
virtual StatusCode DataObjectToTObject(DataObject *obj, RootAddress *addr)
transformation to root
virtual StatusCode TObjectToDataObject(DataObject *&obj)
transformation from root
DstHltInfCnv(ISvcLocator *svc)
void setAlgProcess(const unsigned int i)
void setCriteriaTable(const unsigned int i)
float getTotalEnergy() const
uint32_t getCriteriaTable() const
void setNumber(const unsigned int i)
void setNCON(const unsigned int i)
uint32_t getVersion() const
uint32_t getNumber() const
uint32_t getEventType() const
uint32_t getAlgProcess() const
void setEventType(const unsigned int i)
void setTotalEnergy(const float etot)
void setVersion(const unsigned int i)
static unsigned int getID_MUC_MAX()
static unsigned int getID_EMC_MAX()
static unsigned int getID_MDC_MAX()
static unsigned int getID_TOF_MAX()
Definition of a Root address, derived from IOpaqueAddress.
IDataProviderSvc * m_eds
pointer to eventdataservice
std::vector< void * > m_adresses
each converter knows the corresponding adresses
std::string m_rootBranchname
root branchname (may be concatenated of severals)
RootEventBaseCnv(const CLID &clid, ISvcLocator *svc)
void setNCON(const Int_t i)
void setVersion(const Int_t i)
void setNumber(const Int_t i)
void setTotalEnergy(const Double_t etot)
void setEventType(const Int_t i)
void setCriteriaTable(const Int_t i)
void setAlgProcess(const Int_t i)
void addDstHltInf(TDstHltInf *dstHltInf)
const TDstHltInf * getDstHltInf() const
_EXTERN_ std::string Event