130 {
131
132 MsgStream log(
msgSvc(),
"MdcTrackCnv");
133 log << MSG::DEBUG << "MdcTrackCnv::DataObjectToTObject" << endreq;
134 StatusCode sc=StatusCode::SUCCESS;
135
137 if (!mdcTrackColTds) {
138 log << MSG::ERROR << "Could not downcast to MdcTrackCol" << endreq;
139 return StatusCode::FAILURE;
140 }
141
142 DataObject *evt;
144 if (evt==NULL) {
145 log << MSG::ERROR << "Could not get DstEvent in TDS " << endreq;
146 return StatusCode::FAILURE;
147 }
149 if (!devtTds) {
150 log << MSG::ERROR << "MdcTrackCnv:Could not downcast to TDS DstEvent" << endreq;
151 }
152 IOpaqueAddress *addr;
153
156
158 if (!m_mdcTrackCol) return sc;
160 DstMdcTrackCol::const_iterator mdcTrackTds;
161
162 for (mdcTrackTds = mdcTrackColTds->begin(); mdcTrackTds != mdcTrackColTds->end(); mdcTrackTds++) {
163 Int_t trackId =(*mdcTrackTds)->trackId();
164 Double_t helix[5];
165 for(int i=0;i<5;i++){
166 helix[i] = (*mdcTrackTds)->helix(i) ;
167 }
168 Int_t stat = (*mdcTrackTds)->stat();
169 Double_t chi = (*mdcTrackTds)->chi2();
170 Int_t ndof = (*mdcTrackTds)->ndof();
171 Double_t err[15];
172 for (Int_t i=0; i<15; i++){
173 err[i] = (*mdcTrackTds)->err(i);
174 }
175 Int_t
ns = (*mdcTrackTds)->nster();
176 Int_t fL = (*mdcTrackTds)->firstLayer();
177 Int_t lL = (*mdcTrackTds)->lastLayer();
178 Int_t nlayer = (*mdcTrackTds)->nlayer();
179 Int_t nCgemXCluster = (*mdcTrackTds)->nCgemXCluster();
180 Int_t nCgemVCluster = (*mdcTrackTds)->nCgemVCluster();
181
183
185
187 log<<MSG::INFO<<
"test,trackId: "<<mdcTrackRoot->
trackId()<<endreq;
188 log<<MSG::INFO<<
"test,px: "<<mdcTrackRoot->
px()
189 <<
"test,py: "<<mdcTrackRoot->
py()
190 <<
"test,pz: "<<mdcTrackRoot->
pz()<<endreq;
191
195 mdcTrackRoot->
setErr( err );
202
204 }
205
206 return StatusCode::SUCCESS;
207}
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
const Double_t py() const
void setNCgemVClusters(const Int_t n)
const Double_t pz() const
void setLastLayer(const Int_t lL)
const Double_t px() const
void setNster(const Int_t ns)
void setChi2(const Double_t chi)
void setNlayer(const Int_t nlayer)
const Int_t trackId() const
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 setNCgemXClusters(const Int_t n)
void setHelix(const Double_t helix[5])
_EXTERN_ std::string Event