45 MsgStream log(
msgSvc(), name() );
46 log << MSG::INFO <<
"in execute()" << endmsg;
50 SmartDataPtr<Event::EventHeader> eventHeader( eventSvc(),
"/Event/EventHeader" );
53 log << MSG::FATAL <<
"Could not find Event Header" << endmsg;
54 return ( StatusCode::FAILURE );
57 int eventId = eventHeader->eventNumber();
58 int runId = eventHeader->runNumber();
59 log << MSG::INFO <<
"event: " << eventId <<
" run: " << runId << endmsg;
61 StatusCode sc = StatusCode::SUCCESS;
65 SmartDataPtr<RecMdcTrackCol> recMdcTrackCol( eventSvc(),
"/Event/Recon/RecMdcTrackCol" );
66 if ( !recMdcTrackCol )
68 log << MSG::INFO <<
"Could not find RecMdcTrackCol" << endmsg;
69 SmartDataPtr<DstMdcTrackCol> dstMdcTrackCol( eventSvc(),
"/Event/Dst/DstMdcTrackCol" );
70 if ( !dstMdcTrackCol ) { log << MSG::INFO <<
"Could not find DstMdcTrackCol" << endmsg; }
74 DstMdcTrackCol::iterator iter_mdc = dstMdcTrackCol->begin();
76 for ( ; iter_mdc != dstMdcTrackCol->end(); iter_mdc++, trackID++ )
79 *recMdcTrack = **iter_mdc;
80 ( *recMdcTrackCol ).push_back( recMdcTrack );
81 log << MSG::INFO <<
" Mdc Track ID = " << trackID
82 <<
" Mdc Track Nster = " << ( *iter_mdc )->
nster() << endmsg;
89 SmartDataPtr<RecMdcKalTrackCol> recMdcKalTrackCol( eventSvc(),
90 "/Event/Recon/RecMdcKalTrackCol" );
91 if ( !recMdcKalTrackCol )
93 log << MSG::INFO <<
"Could not find RecMdcKalTrackCol" << endmsg;
94 SmartDataPtr<DstMdcKalTrackCol> dstMdcKalTrackCol( eventSvc(),
95 "/Event/Dst/DstMdcKalTrackCol" );
96 if ( !dstMdcKalTrackCol )
97 { log << MSG::INFO <<
"Could not find DstMdcKalTrackCol" << endmsg; }
101 DstMdcKalTrackCol::iterator iter_mdc = dstMdcKalTrackCol->begin();
103 for ( ; iter_mdc != dstMdcKalTrackCol->end(); iter_mdc++, trackID++ )
106 *recMdcKalTrack = **iter_mdc;
107 ( *recMdcKalTrackCol ).push_back( recMdcKalTrack );
108 log << MSG::INFO <<
" MdcKalTrack ID = " << trackID
109 <<
" MdcKalTrack Nster = " << ( *iter_mdc )->
nster()
110 <<
" MdcKalTrack poca = " << ( *iter_mdc )->poca() << endmsg;
118 SmartDataPtr<RecMdcDedxCol> recMdcDedxCol( eventSvc(),
"/Event/Recon/RecMdcDedxCol" );
119 if ( !recMdcDedxCol )
121 log << MSG::INFO <<
"Could not find RecMdcDedxCol" << endmsg;
122 SmartDataPtr<DstMdcDedxCol> dstMdcDedxCol( eventSvc(),
"/Event/Dst/DstMdcDedxCol" );
123 if ( !dstMdcDedxCol ) { log << MSG::INFO <<
"Could not find DstMdcDedxCol" << endmsg; }
127 DstMdcDedxCol::iterator iter_mdc = dstMdcDedxCol->begin();
129 for ( ; iter_mdc != dstMdcDedxCol->end(); iter_mdc++, trackID++ )
132 *recMdcDedx = **iter_mdc;
133 ( *recMdcDedxCol ).push_back( recMdcDedx );
134 log << MSG::INFO <<
" MdcDedx ID = " << trackID <<
" MdcDedx " << endmsg;
141 SmartDataPtr<RecExtTrackCol> recExtTrackCol( eventSvc(),
"/Event/Recon/RecExtTrackCol" );
142 if ( !recExtTrackCol )
144 log << MSG::INFO <<
"Could not find RecExtTrackCol" << endmsg;
145 SmartDataPtr<DstExtTrackCol> dstExtTrackCol( eventSvc(),
"/Event/Dst/DstExtTrackCol" );
146 if ( !dstExtTrackCol ) { log << MSG::INFO <<
"Could not find DstExtTrackCol" << endmsg; }
150 DstExtTrackCol::iterator iter_ext = dstExtTrackCol->begin();
152 for ( ; iter_ext != dstExtTrackCol->end(); iter_ext++, trackID++ )
155 *recExtTrack = **iter_ext;
156 ( *recExtTrackCol ).push_back( recExtTrack );
157 log << MSG::INFO <<
" ExtTrack ID = " << trackID << endmsg;
164 SmartDataPtr<RecTofTrackCol> tofTrackCol( eventSvc(),
"/Event/Recon/RecTofTrackCol" );
167 log << MSG::INFO <<
"Could not find TofTrackCol" << endmsg;
168 SmartDataPtr<DstTofTrackCol> dstTofTrackCol( eventSvc(),
"/Event/Dst/DstTofTrackCol" );
169 if ( !dstTofTrackCol ) { log << MSG::INFO <<
"Could not find DstTofTrackCol" << endmsg; }
173 DstTofTrackCol::iterator iter_tof = dstTofTrackCol->begin();
174 for ( ; iter_tof != dstTofTrackCol->end(); iter_tof++ )
177 *recTofTrack = **iter_tof;
178 ( *recTofTrackCol ).push_back( recTofTrack );
179 log << MSG::INFO <<
"Tof Track ID = " << ( *iter_tof )->
tofTrackID()
180 <<
" Track ID = " << ( *iter_tof )->trackID()
181 <<
" Tof Counter ID = " << ( *iter_tof )->tofID()
182 <<
" Quality = " << ( *iter_tof )->quality() << endmsg;
189 SmartDataPtr<RecEmcShowerCol> recEmcShowerCol( eventSvc(),
"/Event/Recon/RecEmcShowerCol" );
190 if ( !recEmcShowerCol )
192 log << MSG::INFO <<
"Could not find RecEmcShowerCol" << endmsg;
193 SmartDataPtr<DstEmcShowerCol> dstEmcShowerCol( eventSvc(),
"/Event/Dst/DstEmcShowerCol" );
194 if ( !dstEmcShowerCol ) { log << MSG::INFO <<
"Could not find DstEmcShowerCol" << endmsg; }
198 DstEmcShowerCol::iterator iter_emc = dstEmcShowerCol->begin();
200 for ( ; iter_emc != dstEmcShowerCol->end(); iter_emc++, trackID++ )
203 *recEmcShower = **iter_emc;
204 ( *recEmcShowerCol ).push_back( recEmcShower );
205 log << MSG::INFO <<
" EmcShower ID = " << trackID
206 <<
" EmcShower energy = " << ( *iter_emc )->
energy() << endmsg;
213 SmartDataPtr<RecMucTrackCol> recMucTrackCol( eventSvc(),
"/Event/Recon/RecMucTrackCol" );
214 if ( !recMucTrackCol )
216 log << MSG::INFO <<
"Could not find RecMucTrackCol" << endmsg;
217 SmartDataPtr<DstMucTrackCol> dstMucTrackCol( eventSvc(),
"/Event/Dst/DstMucTrackCol" );
218 if ( !dstMucTrackCol ) { log << MSG::INFO <<
"Could not find DstMucTrackCol" << endmsg; }
222 DstMucTrackCol::iterator iter_muc = dstMucTrackCol->begin();
224 for ( ; iter_muc != dstMucTrackCol->end(); iter_muc++, trackID++ )
227 *recMucTrack = **iter_muc;
228 ( *recMucTrackCol ).push_back( recMucTrack );
229 log << MSG::INFO <<
" MucTrack ID = " << trackID << endmsg;