1#include "GaudiKernel/MsgStream.h"
3#include "EventModel/EventModel.h"
4#include "EvtRecEvent/EvtRecEvent.h"
5#include "EvtRecEvent/EvtRecObject.h"
6#include "RootCnvSvc/EvtRec/EvtRecCnv.h"
7#include "RootCnvSvc/EvtRec/EvtRecEventCnv.h"
8#include "RootCnvSvc/RootAddress.h"
17 MsgStream log(
msgSvc(),
"EvtRecEventCnv" );
18 log << MSG::DEBUG <<
"EvtRecEventCnv::TObjectToDataObject" << endmsg;
22 refpObject = evtRecEvent;
24 if ( !m_evtRecEvent )
return StatusCode::SUCCESS;
35 return StatusCode::SUCCESS;
40 MsgStream log(
msgSvc(),
"EvtRecEventCnv" );
41 log << MSG::DEBUG <<
"EvtRecEventCnv::DataObjectToTObject" << endmsg;
46 log << MSG::ERROR <<
"Could not downcast to EvtRecEvent" << endmsg;
47 return StatusCode::FAILURE;
50 DataObject* evt = NULL;
54 log << MSG::ERROR <<
"Could not get EvtRecObject in TDS" << endmsg;
55 return StatusCode::FAILURE;
60 { log << MSG::ERROR <<
"EvtRecEventCnv: Could not downcast to TDS EvtRecObject" << endmsg; }
63 m_cnvSvc->getEvtRecCnv()->createRep( evt, addr );
69 m_evtRecEvent->setTotalCharged( evtRecEvent->
totalCharged() );
70 m_evtRecEvent->setTotalNeutral( evtRecEvent->
totalNeutral() );
71 m_evtRecEvent->setNumberOfVee( evtRecEvent->
numberOfVee() );
72 m_evtRecEvent->setNumberOfPi0( evtRecEvent->
numberOfPi0() );
74 return StatusCode::SUCCESS;
EvtRecEventCnv(ISvcLocator *svc)
virtual StatusCode TObjectToDataObject(DataObject *&obj)
transformation from root
static const CLID & classID()
virtual StatusCode DataObjectToTObject(DataObject *obj, RootAddress *addr)
transformation to root
void setTotalTracks(const int tottks)
void setNumberOfPi0(const int npi0)
void setNumberOfVee(const int nvee)
void setTotalNeutral(const int nneu)
void setTotalCharged(const int nchrg)
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 setTotalTracks(const int tottks)
const TEvtRecEvent * getEvtRecEvent() const
_EXTERN_ std::string Event