28 std::vector<SG::ReadHandle<TrackCollection>> handles =
m_originTracksKey.makeHandles(ctx);
30 if (handles.size() > 1){
31 ATH_MSG_WARNING(
"More than one collection has been requested. Only the first collection is taken");
33 auto & theTrackCollectionHandle = handles.at(0);
34 if (not theTrackCollectionHandle.isValid()){
35 ATH_MSG_FATAL(
"Could not retrieve tracks from "<< theTrackCollectionHandle.key() );
36 return StatusCode::FAILURE;
38 const auto & theTrackCollection = *theTrackCollectionHandle;
39 std::unique_ptr<TracksScores> scoredTracks(
new TracksScores);
41 m_scoreTool->process(theTrackCollection, scoredTracks.get());
43 scoredTracks->reserve(theTrackCollection.size());
44 for(
const Track* trk: theTrackCollection ){
45 scoredTracks->push_back( std::pair<const Track*, float>(trk, 0));
51 return StatusCode::SUCCESS;