19 ATH_CHECK(m_scoreTool.retrieve( DisableTool{m_scoreTool.empty()} ));
20 ATH_CHECK(m_scoredTracksKey.initialize());
21 ATH_CHECK(m_originTracksKey.initialize());
22 return StatusCode::SUCCESS;
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);
40 if (m_scoreTool.isEnabled()){
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;
60 if (m_scoreTool.isEnabled()) {
61 m_scoreTool->statistics();
63 return StatusCode::SUCCESS;