yoda is hosted by Hepforge, IPPP Durham
YODA - Yet more Objects for Data Analysis  1.9.4
Fillable.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // This file is part of YODA -- Yet more Objects for Data Analysis
4 // Copyright (C) 2008-2020 The YODA collaboration (see AUTHORS for details)
5 //
6 #ifndef YODA_Fillable_h
7 #define YODA_Fillable_h
8 
9 #include "YODA/AnalysisObject.h"
10 #include "YODA/Exceptions.h"
11 
12 namespace YODA {
13 
14 
16  class Fillable {
17  public:
18 
20 
21 
23  virtual ~Fillable() = default;
24 
25 
27  virtual size_t fillDim() const = 0;
28 
29 
31 
32 
34  virtual void reset() = 0;
35 
37  virtual void scaleW(double scalefactor) = 0;
38  // setAnnotation("ScaledBy", annotation<double>("ScaledBy", 1.0) * scalefactor);
39 
40 
42 
43 
45  virtual double numEntries(bool includeoverflows=true) const = 0;
46 
48  virtual double effNumEntries(bool includeoverflows=true) const = 0;
49 
51  virtual double sumW(bool includeoverflows=true) const = 0;
52 
54  virtual double sumW2(bool includeoverflows=true) const = 0;
55 
57 
58  };
59 
60 
61 }
62 
63 #endif
virtual size_t fillDim() const =0
Fill-dimension of this data object.
virtual void scaleW(double scalefactor)=0
Rescale as if all fill weights had been different by factor scalefactor.
A base class for all fillable objects.
Definition: Fillable.h:16
virtual double numEntries(bool includeoverflows=true) const =0
Get the number of fills.
virtual ~Fillable()=default
Virtual destructor for inheritance.
virtual void reset()=0
Reset.
virtual double sumW2(bool includeoverflows=true) const =0
Get sum of squared weights in histo.
virtual double sumW(bool includeoverflows=true) const =0
Get sum of weights in histo.
virtual double effNumEntries(bool includeoverflows=true) const =0
Get the effective number of fills.