126 {
127
128 MsgStream log(
msgSvc(),
"MdcTrackCnv");
129 log << MSG::DEBUG << "MdcTrackCnv::DataObjectToTObject" << endreq;
130 StatusCode sc=StatusCode::SUCCESS;
131
133 if (!mdcTrackColTds) {
134 log << MSG::ERROR << "Could not downcast to MdcTrackCol" << endreq;
135 return StatusCode::FAILURE;
136 }
137
138 DataObject *evt;
141 log << MSG::ERROR << "Could not get DstEvent in TDS " << endreq;
142 return StatusCode::FAILURE;
143 }
145 if (!devtTds) {
146 log << MSG::ERROR << "MdcTrackCnv:Could not downcast to TDS DstEvent" << endreq;
147 }
148 IOpaqueAddress *addr;
149
152
154 if (!m_mdcTrackCol) return sc;
156 DstMdcTrackCol::const_iterator mdcTrackTds;
157
158 for (mdcTrackTds = mdcTrackColTds->begin(); mdcTrackTds != mdcTrackColTds->end(); mdcTrackTds++) {
159 Int_t trackId =(*mdcTrackTds)->trackId();
160 Double_t helix[5];
161 for(int i=0;i<5;i++){
162 helix[i] = (*mdcTrackTds)->helix(i) ;
163 }
164 Int_t stat = (*mdcTrackTds)->stat();
165 Double_t chi = (*mdcTrackTds)->chi2();
166 Int_t ndof = (*mdcTrackTds)->ndof();
167 Double_t err[15];
168 for (Int_t i=0; i<15; i++){
169 err[i] = (*mdcTrackTds)->err(i);
170 }
171 Int_t
ns = (*mdcTrackTds)->nster();
172 Int_t fL = (*mdcTrackTds)->firstLayer();
173 Int_t lL = (*mdcTrackTds)->lastLayer();
174 Int_t nlayer = (*mdcTrackTds)->nlayer();
175
177
179
181 log<<MSG::INFO<<
"test,trackId: "<<mdcTrackRoot->
trackId()<<endreq;
182 log<<MSG::INFO<<
"test,px: "<<mdcTrackRoot->
px()
183 <<
"test,py: "<<mdcTrackRoot->
py()
184 <<
"test,pz: "<<mdcTrackRoot->
pz()<<endreq;
185
189 mdcTrackRoot->
setErr( err );
194
196 }
197
198 return StatusCode::SUCCESS;
199}
ObjectVector< DstMdcTrack > DstMdcTrackCol
static TDstEvent * getWriteObject()
returns object to be written (maintained here for all DIGI-converters)
IDataProviderSvc * m_eds
pointer to eventdataservice
virtual StatusCode createRep(DataObject *pObject, IOpaqueAddress *&refpAddress)
Convert the transient object to the requested representation.
void addMdcTrack(TMdcTrack *Track)
Add a TkrTrack into the Mdc data collection.
void clearMdcTrackCol()
clear the whole array (necessary because of the consts-s)
const TObjArray * getMdcTrackCol() const
retrieve the whole TObjArray of MdcTrack Data
void setLastLayer(const Int_t lL)
void setNster(const Int_t ns)
void setChi2(const Double_t chi)
void setNlayer(const Int_t nlayer)
void setNdof(const Int_t ndof)
void setTrackId(const Int_t trackId)
void setFirstLayer(const Int_t fL)
void setErr(const Double_t err[15])
void setStat(const Int_t stat)
void setHelix(const Double_t helix[5])
_EXTERN_ std::string Event