ATLAS Offline Software
Classes | Functions
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 75 of file FPGATrackSimMultiTruth.cxx.

76 {
77  size_t count = std::count_if(mt.begin(), mt.end(), [](auto){return true;});
78  o << "FPGATrackSimMultiTruth (event index,barcode) <=> weight, entries: " << count << "\n";
79 
80  if (count == 0) return o;
81 
82  for ( auto& truth : mt)
83  o << " " << (truth.first).first << "," << (truth.first).second << " <=> " << truth.second << "\n";
84 
85  o << " best: \n";
86 
89 
90  if (!mt.best(code, weight)) o << "N/A\n";
91  else o << code.first << "," << code.second << " " << weight << "\n";
92  return o;
93 
94 }
FPGATrackSimMultiTruth::Weight
float Weight
Definition: FPGATrackSimMultiTruth.h:50
FPGATrackSimMultiTruth::begin
auto begin()
Definition: FPGATrackSimMultiTruth.h:65
XMLtoHeader.count
count
Definition: XMLtoHeader.py:85
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:200
FPGATrackSimMultiTruth::Barcode
std::pair< unsigned long, unsigned long > Barcode
Definition: FPGATrackSimMultiTruth.h:49
pmontree.code
code
Definition: pmontree.py:443
DeMoScan.first
bool first
Definition: DeMoScan.py:534
FPGATrackSimMultiTruth::end
auto end()
Definition: FPGATrackSimMultiTruth.h:66