28 if (!event) {
throw std::runtime_error(
"No event to match"); }
30 LOG(info) <<
"Event: " <<
event->GetNumber() <<
" t_start = " <<
event->GetStartTime()
31 <<
" t_end = " <<
event->GetEndTime() <<
" Msts = " <<
event->GetNofStsTracks();
35 const int n_sts_tracks =
event->GetNofStsTracks();
36 for (
short i_track = 0; i_track < n_sts_tracks; ++i_track) {
37 const auto track_index =
event->GetStsTrackIndex(i_track);
40 if (match->GetNofLinks() == 0) {
continue; }
42 const auto& link = match->GetMatchedLink();
43 auto file = link.GetFile();
44 auto entry = link.GetEntry();
57 auto weight = float(match.second) / n_sts_tracks;
58 match_event->AddLink(weight, i++, match.first.entry, match.first.file);
59 LOG(info) <<
" matched to " << match.first.entry <<
" " << match.second <<
" weight = " << weight;
62 if (match_event->GetNofLinks() > 0)
event->SetMatch(match_event);