149 {
150
151 MsgStream log(
msgSvc(),
"RecEmcClusterCnv");
152 log << MSG::DEBUG << "RecEmcClusterCnv::DataObjectToTObject" << endreq;
153
154 StatusCode sc=StatusCode::SUCCESS;
155
157 if (!emcClusterColTds) {
158 log << MSG::ERROR << "Could not downcast to RecEmcClusterCol" << endreq;
159 return StatusCode::FAILURE;
160 }
161
162 DataObject *evt;
165 log << MSG::ERROR << "Could not get RecEvent in TDS " << endreq;
166 return StatusCode::FAILURE;
167 }
169 if (!devtTds) {
170 log << MSG::ERROR << "RecEmcClusterCnv:Could not downcast to TDS DstEvent" << endreq;
171 }
172 IOpaqueAddress *addr;
173
176
178 if (!m_emcClusterCol) return sc;
179
180
182
183 RecEmcClusterCol::const_iterator emcClusterTds;
184
185 for(emcClusterTds = emcClusterColTds->begin();
186 emcClusterTds != emcClusterColTds->end();
187 emcClusterTds++) {
188 Int_t clusterId = (*emcClusterTds)->getClusterId();
189
190 vector<Int_t> vecHits;
191 RecEmcHitMap::const_iterator iHitMap;
192 for(iHitMap=(*emcClusterTds)->Begin();
193 iHitMap!=(*emcClusterTds)->End();
194 iHitMap++) {
195 vecHits.push_back(iHitMap->first);
196 }
197
198 vector<Int_t> vecSeeds;
199 RecEmcHitMap::const_iterator iSeedMap;
200 for(iSeedMap=(*emcClusterTds)->BeginSeed();
201 iSeedMap!=(*emcClusterTds)->EndSeed();
202 iSeedMap++) {
203 vecSeeds.push_back(iSeedMap->first);
204 }
205
206 vector<RecEmcID> vecShowerId=(*emcClusterTds)->getShowerIdVec();
207 vector<RecEmcID>::iterator iShowerId;
208 vector<Int_t> vecShowers;
209 for(iShowerId=vecShowerId.begin();
210 iShowerId!=vecShowerId.end();
211 iShowerId++) {
212 vecShowers.push_back(*iShowerId);
213 }
214
215
216
218
219
224
226 }
227
228 return StatusCode::SUCCESS;
229}
ObjectVector< RecEmcCluster > RecEmcClusterCol
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 setVecSeeds(const vector< Int_t > &vecSeeds)
void setVecShowers(const vector< Int_t > &vecShowers)
void setVecHits(const vector< Int_t > &vecHits)
void setClusterId(const Int_t id)
void addEmcCluster(TRecEmcCluster *Track)
Add a TkrTrack into the Emc data collection */.
const TObjArray * getEmcClusterCol() const
retrieve the whole TObjArray of EmcCluster Data
void clearEmcClusterCol()
clear the whole array (necessary because of the consts-s) */
_EXTERN_ std::string Event