ATLAS Offline Software
Loading...
Searching...
No Matches
FPGATrackSimMultiTruth.cxx File Reference
#include <iostream>
#include <algorithm>
#include "FPGATrackSimObjects/FPGATrackSimMultiTruth.h"
Include dependency graph for FPGATrackSimMultiTruth.cxx:

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &o, const FPGATrackSimMultiTruth &mt)

Function Documentation

◆ operator<<()

std::ostream & operator<< ( std::ostream & o,
const FPGATrackSimMultiTruth & mt )

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 &regx)
count how many occurances of a regx are in a string
Definition hcg.cxx:146