24 if (histo.histo->GetName() == name) {
return histo.histo; }
32 if (histo.histo->GetName() == name) {
return histo.path; }
40 auto otherHisto = other.
GetHisto(histo.histo->GetName());
42 throw std::runtime_error(
43 fmt::format(
"Cannot divide histograms, because they do not match: No histogram with name "
44 "{} found in other collection.",
45 histo.histo->GetName()));
47 histo.histo->Divide(otherHisto);
53 fFolders.push_back({.path = path, .name = name});
virtual ~HistogramCollection()
std::vector< Histo > fHistos
std::vector< Folder > fFolders
void CreateFolder(const char *path, const char *name)
TH1 * GetHisto(const std::string &name) const
std::string GetHistoPath(const std::string &name) const
void Reset()
Clear all histograms.
void Div(const HistogramCollection &other)