ATLAS Offline Software
Loading...
Searching...
No Matches
HistogramMerger.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef HDF5Utils_HistogramMerger_H
6#define HDF5Utils_HistogramMerger_H
7
8#include "H5Cpp.h"
9
10#include <map>
11#include <memory>
12#include <string>
13
14namespace H5Utils::hist {
15
16 class IHistogram; // forward declaration — full type in .cxx
17
31 public:
33
39 void add(const std::string& path, const H5::Group& src);
40
45 void write(H5::Group& root) const;
46
47 private:
48 std::map<std::string, std::unique_ptr<IHistogram>> m_hists;
49
52 std::unique_ptr<IHistogram> make(const H5::Group& src);
53 };
54
55} //> end namespace H5Utils::hist
56
57#endif //> !HDF5Utils_HistogramMerger_H
Accumulates UHI histogram groups from multiple source files and writes the merged result once all inp...
std::unique_ptr< IHistogram > make(const H5::Group &src)
Factory: read the storage type from src and return a zero-initialised concrete IHistogram of the appr...
std::map< std::string, std::unique_ptr< IHistogram > > m_hists
void add(const std::string &path, const H5::Group &src)
Accumulate one UHI histogram group.
void write(H5::Group &root) const
Write every accumulated histogram into the output file.
Abstract interface for a mergeable histogram.
Definition IHistogram.h:20