#include <iostream>
#include <algorithm>
#include "FPGATrackSimObjects/FPGATrackSimMultiTruth.h"
Go to the source code of this file.
◆ operator<<()
Definition at line 74 of file FPGATrackSimMultiTruth.cxx.
75{
76 size_t count = std::count_if(mt.
begin(), mt.
end(), [](
auto){return true;});
77 o <<
"FPGATrackSimMultiTruth (event index,barcode) <=> weight, entries: " <<
count <<
"\n";
78
79 if (
count == 0)
return o;
80
81 for ( auto& truth : mt)
82 o << " " << (truth.first).first << "," << (truth.first).second << " <=> " << truth.second << "\n";
83
84 o << " best: \n";
85
88
89 if (!mt.best(code, weight)) o << "N/A\n";
90 else o << code.first <<
"," << code.second <<
" " <<
weight <<
"\n";
91 return o;
92
93}
std::pair< unsigned long, unsigned long > Barcode
int count(std::string s, const std::string ®x)
count how many occurances of a regx are in a string