File indexing completed on 2025-01-18 10:10:26
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef ROOT_ROOFIT_TESTSTATISTICS_SHAREDOFFSET_H
0014 #define ROOT_ROOFIT_TESTSTATISTICS_SHAREDOFFSET_H
0015
0016 #include <Math/Util.h>
0017 #include <vector>
0018 #include <memory> // shared_ptr
0019
0020 class SharedOffset {
0021 public:
0022 SharedOffset();
0023 using OffsetVec = std::vector<ROOT::Math::KahanSum<double>>;
0024
0025 void clear();
0026 void swap(const std::vector<std::size_t> &component_keys);
0027
0028 inline OffsetVec &offsets() { return *offsets_; };
0029 inline OffsetVec &offsets_save() { return *offsets_save_; };
0030
0031 private:
0032 std::shared_ptr<OffsetVec> offsets_;
0033 std::shared_ptr<OffsetVec> offsets_save_;
0034 };
0035
0036 #endif