123 {
124
125 MsgStream log(
msgSvc(),
"RecCgemKalHelixSegCnv");
126 log << MSG::DEBUG << "RecCgemKalHelixSegCnv::DataObjectToTObject" << endreq;
127
129 if (!cgemHitColTds) {
130 log << MSG::ERROR << "Could not downcast to RecCgemKalHelixSegCol" << endreq;
131 return StatusCode::FAILURE;
132 }
133
134 DataObject *evt;
136 if (evt==NULL) {
137 log << MSG::ERROR << "Could not get ReconEvent in TDS " << endreq;
138 return StatusCode::FAILURE;
139 }
140
142 if (!devtTds) {
143 log << MSG::ERROR << "RecCgemKalHelixSegCnv:Could not downcast to TDS ReconEvent" << endreq;
144 }
145
146 IOpaqueAddress *addr;
147
150
152 if (!m_recCgemKalHelixSegCol) return StatusCode::SUCCESS;
154
155 RecCgemKalHelixSegCol::const_iterator recCgemKalHelixSeg;
156 for (recCgemKalHelixSeg = cgemHitColTds->begin(); recCgemKalHelixSeg != cgemHitColTds->end(); recCgemKalHelixSeg++) {
157 Int_t trackId =(*recCgemKalHelixSeg)->getTrackId();
158
159
160 UInt_t cgemId = (*recCgemKalHelixSeg)->getCgemId().get_value();
161 Double_t tdc = (*recCgemKalHelixSeg)->getTdc();
162 Double_t adc = (*recCgemKalHelixSeg)->getAdc();
163 Double_t zhit = (*recCgemKalHelixSeg)->getZhit();
164 Double_t tof = (*recCgemKalHelixSeg)->getTof();
165 Double_t docaIncl = (*recCgemKalHelixSeg)->getDocaIncl();
166 Double_t docaExcl = (*recCgemKalHelixSeg)->getDocaExcl();
167 Double_t entra = (*recCgemKalHelixSeg)->getEntra();
168
169
170
171
172
173
174
175
176
177
178
179 HepVector helixIncl_vct = (*recCgemKalHelixSeg)->getHelixIncl();
180 HepVector helixExcl_vct = (*recCgemKalHelixSeg)->getHelixExcl();
181
182
183
184 Double_t helixIncl[5], helixExcl[5];
185 for(Int_t i=0; i<5; i++){
186 helixIncl[i] = helixIncl_vct[i];
187 helixExcl[i] = helixExcl_vct[i];
188 }
189
190
191
192
193
194
195
197
198
199 recCgemKalHelixSegRoot->
setTrackId( trackId );
200
201
202 recCgemKalHelixSegRoot->
setCgemId( cgemId );
203 recCgemKalHelixSegRoot->
setTdc( tdc );
204 recCgemKalHelixSegRoot->
setAdc( adc );
205 recCgemKalHelixSegRoot->
setZhit( zhit );
206 recCgemKalHelixSegRoot->
setTof( tof );
209 recCgemKalHelixSegRoot->
setEntra( entra );
210
211
212
213
214
215
216
217
218
219
220
223
224
225
227 }
228 return StatusCode::SUCCESS;
229}
ObjectVector< RecCgemKalHelixSeg > RecCgemKalHelixSegCol
static TRecTrackEvent * getWriteObject()
returns object to be written (maintained here for all DIGI-converters)
RecTrackCnv * getRecTrackCnv()
IDataProviderSvc * m_eds
pointer to eventdataservice
virtual StatusCode createRep(DataObject *pObject, IOpaqueAddress *&refpAddress)
Convert the transient object to the requested representation.
void setZhit(Double_t zhit)
void setDocaIncl(Double_t docaincl)
void setHelixIncl(const Double_t helix[5])
void setEntra(Double_t entra)
void setDocaExcl(Double_t docaexcl)
void setHelixExcl(const Double_t helix[5])
void setTof(Double_t tof)
void setCgemId(UInt_t cgemid)
void setTdc(Double_t tdc)
void setTrackId(Int_t trkid)
void setAdc(Double_t adc)
const TObjArray * getRecCgemKalHelixSegCol() const
void clearRecCgemKalHelixSegCol()
void addRecCgemKalHelixSeg(TRecCgemKalHelixSeg *Track)
_EXTERN_ std::string Event