171 <<
"] I4MomentumContainer in StoreGate !" );
172 return StatusCode::RECOVERABLE;
175 const I4Moms_t * coll = 0;
176 if ( !
evtStore()->retrieve( coll, collName ).isSuccess() ||
180 << collName <<
"] !!" );
181 return StatusCode::RECOVERABLE;
184 std::ostringstream out;
186 const std::size_t iMax = coll->size();
187 out <<
"Retrieved [" << collName <<
"] ==> size = " << iMax <<
"\n";
188 if ( coll->empty() ) {
189 return StatusCode::SUCCESS;
193 typedef std::set<const I4Momentum*, P4Sorters::Descending::Pt> Coll_t;
194 Coll_t i4moms( coll->begin(), coll->end() );
197 out <<
"[e,eta,phi,m] ="
198 << std::right << std::scientific << std::setprecision(8);
199 for ( Coll_t::const_iterator itr = i4moms.begin(),
203 out << std::setw(16) << (*itr)->e()
204 << std::setw(16) << (*itr)->eta()
205 << std::setw(16) << (*itr)->phi()
206 << std::setw(16) << (*itr)->m()
211 out <<
"[ipt,cotTh,phi,m] ="
212 << std::right << std::scientific << std::setprecision(8);
213 for ( Coll_t::const_iterator itr = i4moms.begin(),
217 out << std::setw(16) << (*itr)->iPt()
218 << std::setw(16) << (*itr)->cotTh()
219 << std::setw(16) << (*itr)->phi()
220 << std::setw(16) << (*itr)->m()
225 out <<
"[pt,eta,phi,m] ="
226 << std::right << std::scientific << std::setprecision(8);
227 for ( Coll_t::const_iterator itr = i4moms.begin(),
231 out << std::setw(16) << (*itr)->pt()
232 << std::setw(16) << (*itr)->eta()
233 << std::setw(16) << (*itr)->phi()
234 << std::setw(16) << (*itr)->m()
238 out <<
"[px,py,pz,e] ="
239 << std::right << std::scientific << std::setprecision(8);
240 for ( Coll_t::const_iterator itr = i4moms.begin(),
244 out << std::setw(16) << (*itr)->px()
245 << std::setw(16) << (*itr)->py()
246 << std::setw(16) << (*itr)->pz()
247 << std::setw(16) << (*itr)->e()
253 if ( 0 !=
m_outputStream ) { (*m_outputStream) << out.str() << std::flush;
257 return StatusCode::SUCCESS;
306 std::transform( streamName.begin(), streamName.end(),
310 const std::string stdout =
"stdout";
311 const std::string stderr =
"stderr";
312 const std::string msgstream =
"msgstream";
314 if ( streamName == msgstream ) {
316 }
else if ( streamName == stdout ) {
318 }
else if ( streamName == stderr ) {
322 std::ios::out | std::ios::trunc );