PandaRoot
PndTrackingQASummary.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
20 #pragma once
21 
22 #include "PndTrackingQA.h"
24 
25 #include <TObject.h>
26 
27 #include <map>
28 #include <iostream>
29 
30 class PndTrackingQASummary : public TObject {
31  public:
33  virtual ~PndTrackingQASummary(){};
34 
35  void AddResult(int quality) { fMapTrackingQAResults[quality]++; }
36 
37  void AddResult(int quality, int value) { fMapTrackingQAResults[quality] += value; }
38  int GetResult(int quality) { return fMapTrackingQAResults[quality]; }
39 
42  int GetAllTracks();
45 
48 
50 
52 
54 
56 
57  friend std::ostream &operator<<(std::ostream &os, const PndTrackingQASummary &summary)
58  {
59  os << "MapResults:" << std::endl;
60  for (auto val : summary.fMapTrackingQAResults) {
61  os << TrackingQA::qualityNumbers::QualityNumberToString(val.first) << " : " << val.second << std::endl;
62  }
63  os << std::endl;
64  return os;
65  }
66 
67  private:
68  std::map<int, int> fMapTrackingQAResults; //<qualityNumbers, counts> see PndTrackingQA.h for qualityNumbers
69 
70  ClassDef(PndTrackingQASummary, 1);
71 };
int GetResult(int quality)
int GetAllTracksWithHitsNotFound()
friend std::ostream & operator<<(std::ostream &os, const PndTrackingQASummary &summary)
static std::string QualityNumberToString(int qNumber)
void AddResult(int quality)
void AddResult(int quality, int value)
int GetAllTracksWithAtLeast3Hits()