Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RBinWithError.hxx
Go to the documentation of this file.
1/// \file
2/// \warning This is part of the %ROOT 7 prototype! It will change without notice. It might trigger earthquakes.
3/// Feedback is welcome!
4
5#ifndef ROOT_RBinWithError
6#define ROOT_RBinWithError
7
8namespace ROOT {
9namespace Experimental {
10
11/**
12A special bin content type to compute the bin error in weighted filling.
13
14\warning This is part of the %ROOT 7 prototype! It will change without notice. It might trigger earthquakes.
15Feedback is welcome!
16*/
18 double fSum = 0;
19 double fSum2 = 0;
20
22 {
23 fSum++;
24 fSum2++;
25 return *this;
26 }
27
29 {
30 RBinWithError old = *this;
31 operator++();
32 return old;
33 }
34
36 {
37 fSum += w;
38 fSum2 += w * w;
39 return *this;
40 }
41
43 {
44 fSum += rhs.fSum;
45 fSum2 += rhs.fSum2;
46 return *this;
47 }
48};
49
50} // namespace Experimental
51} // namespace ROOT
52
53#endif
A special bin content type to compute the bin error in weighted filling.
RBinWithError & operator+=(double w)
RBinWithError & operator+=(const RBinWithError &rhs)