1#ifndef RecEvTimeCnv_CXX
2#define RecEvTimeCnv_CXX 1
4#include "GaudiKernel/MsgStream.h"
5#include "GaudiKernel/DataObject.h"
6#include "GaudiKernel/ObjectVector.h"
8#include "TClonesArray.h"
37 MsgStream log(
msgSvc(),
"RecEvTimeCnv");
48MsgStream log(
msgSvc(),
"RecEvTimeCnv");
49 log << MSG::DEBUG <<
"RecEvTimeCnv::TObjectToDataObject" << endreq;
50 StatusCode sc=StatusCode::SUCCESS;
54 refpObject=evTimeTdsCol;
56 if (!m_recEvTimeCol)
return sc;
57 TIter evTimeIter(m_recEvTimeCol);
59 while ((evTimeRoot = (
TRecEvTime*)evTimeIter.Next())) {
60 double estime=evTimeRoot->
estime();
61 int status=evTimeRoot->
status();
62 double quality=evTimeRoot->
quality();
71 evTimeTdsCol->push_back(evTimeTds);
73 delete m_recEvTimeCol;
76 return StatusCode::SUCCESS;
80 MsgStream log(
msgSvc(),
"RecEvTimeCnv");
81 log << MSG::DEBUG <<
"RecEvTimeCnv::DataObjectToTObject" << endreq;
82 StatusCode sc=StatusCode::SUCCESS;
86 log << MSG::ERROR <<
"Could not downcast to RecEsTimeCol" << endreq;
87 return StatusCode::FAILURE;
93 log << MSG::ERROR <<
"Could not get RecEvent in TDS " << endreq;
94 return StatusCode::FAILURE;
98 log << MSG::ERROR <<
"RecEvTimeCnv:Could not downcast to TDS ReconEvent" << endreq;
100 IOpaqueAddress *addr;
104 const TObjArray *m_recEvTimeCol = recEvt->
getEvTimeCol();
105 if (!m_recEvTimeCol)
return sc;
107 RecEsTimeCol::const_iterator evTimeTds;
108 for (evTimeTds = evTimeColTds->begin(); evTimeTds != evTimeColTds->end(); evTimeTds++) {
111 Double_t estime = (*evTimeTds)->getTest();
112 Int_t status = (*evTimeTds)->getStat();
113 Double_t quality = (*evTimeTds)->getQuality();
124 return StatusCode::SUCCESS;
ObjectVector< RecEsTime > RecEsTimeCol
void setTest(double Test)
void setQuality(double Quality)
virtual StatusCode DataObjectToTObject(DataObject *obj, RootAddress *addr)
transformation to root
RecEvTimeCnv(ISvcLocator *svc)
virtual StatusCode TObjectToDataObject(DataObject *&obj)
transformation from root
static TRecTrackEvent * getWriteObject()
returns object to be written (maintained here for all DIGI-converters)
Definition of a Root address, derived from IOpaqueAddress.
RecTrackCnv * getRecTrackCnv()
Base class for all Root Converters.
std::vector< void * > m_adresses
each converter knows the corresponding adresses
IDataProviderSvc * m_eds
pointer to eventdataservice
std::string m_rootBranchname
root branchname (may be concatenated of severals)
virtual StatusCode createRep(DataObject *pObject, IOpaqueAddress *&refpAddress)
Convert the transient object to the requested representation.
void setStats(Int_t status)
void setQuality(Double_t quality)
void setTest(Double_t estime)
const TObjArray * getEvTimeCol() const
void addEvTime(TRecEvTime *Track)
static std::map< const TObject *, const RecEsTime * > m_rootRecEvTimeMap
_EXTERN_ std::string Event