ATLAS Offline Software
Loading...
Searching...
No Matches
FPGATrackSimMultiTruth.h File Reference
#include <TObject.h>
#include <algorithm>
#include <cassert>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <string>
#include <utility>
#include <vector>

Go to the source code of this file.

Classes

class  FPGATrackSimMultiTruth
struct  FPGATrackSimMultiTruth::AddAccumulator
struct  FPGATrackSimMultiTruth::MaxAccumulator
struct  FPGATrackSimMultiTruth::TruthMapWeightAcc
struct  FPGATrackSimMultiTruth::TruthMapWeightLt

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