File indexing completed on 2025-12-14 10:31:08
0001
0002
0003
0004
0005 #ifndef ROOT_RBinWithError
0006 #define ROOT_RBinWithError
0007
0008 namespace ROOT {
0009 namespace Experimental {
0010
0011
0012
0013
0014
0015
0016
0017 struct RBinWithError final {
0018 double fSum = 0;
0019 double fSum2 = 0;
0020
0021 RBinWithError &operator++()
0022 {
0023 fSum++;
0024 fSum2++;
0025 return *this;
0026 }
0027
0028 RBinWithError operator++(int)
0029 {
0030 RBinWithError old = *this;
0031 operator++();
0032 return old;
0033 }
0034
0035 RBinWithError &operator+=(double w)
0036 {
0037 fSum += w;
0038 fSum2 += w * w;
0039 return *this;
0040 }
0041
0042 RBinWithError &operator+=(const RBinWithError &rhs)
0043 {
0044 fSum += rhs.fSum;
0045 fSum2 += rhs.fSum2;
0046 return *this;
0047 }
0048 };
0049
0050 }
0051 }
0052
0053 #endif