65 {
66
67 MsgStream log(
msgSvc(),
"EvtRecPrimaryVertexCnv");
68 log << MSG::DEBUG << "EvtRecPrimaryVertexCnv::DataObjectToTObject" << endreq;
69
71 if ( ! evtRecPrimaryVertex ) {
72 log << MSG::ERROR << "Could not downcast to EvtRecPrimaryVertex" << endreq;
73 return StatusCode::FAILURE;
74 }
75
76 DataObject* evt =
NULL;
78 if ( sc.isFailure() ) {
79 log << MSG::ERROR << "Could not get EvtRecObject in TDS" << endreq;
80 return StatusCode::FAILURE;
81 }
82
84 if ( ! devtTds ) {
85 log << MSG::ERROR << "EvtRecPrimaryVertexCnv: Could not downcast to TDS EvtRecObject" << endreq;
86 }
87
88 IOpaqueAddress* addr;
91
92
93
95
99 m_evtRecPrimaryVertex->
setChi2 (evtRecPrimaryVertex->
chi2() );
100 m_evtRecPrimaryVertex->
setNdof (evtRecPrimaryVertex->
ndof() );
102
103 Double_t vtx[3];
104 for (Int_t i = 0; i < 3; i++) {
105 vtx[i] = evtRecPrimaryVertex->
vertex()[i];
106 }
107 Double_t Evtx[6];
108 Evtx[0] = evtRecPrimaryVertex->
errorVertex()[0][0];
109 Evtx[1] = evtRecPrimaryVertex->
errorVertex()[0][1];
110 Evtx[2] = evtRecPrimaryVertex->
errorVertex()[0][2];
111 Evtx[3] = evtRecPrimaryVertex->
errorVertex()[1][1];
112 Evtx[4] = evtRecPrimaryVertex->
errorVertex()[1][2];
113 Evtx[5] = evtRecPrimaryVertex->
errorVertex()[2][2];
116
117 return StatusCode::SUCCESS;
118}
static TEvtRecObject * getWriteObject()
const HepVector & vertex() const
const std::vector< int > & trackIdList() const
const HepSymMatrix & errorVertex() const
EvtRecCnv * getEvtRecCnv()
IDataProviderSvc * m_eds
pointer to eventdataservice
virtual StatusCode createRep(DataObject *pObject, IOpaqueAddress *&refpAddress)
Convert the transient object to the requested representation.
const TEvtRecPrimaryVertex * getEvtRecPrimaryVertex() const
void setChi2(Double_t chi2)
void setTrackIdList(const std::vector< Int_t > &trackIdList)
void setErrorVertex(Double_t Evtx[6])
void setIsValid(Bool_t isValid)
void setFitMethod(Int_t fitMethod)
void setVertex(Double_t vtx[3])
void setNTracks(Int_t nTracks)
_EXTERN_ std::string Event