Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-18 09:38:45

0001 // -*- C++ -*-
0002 //
0003 // This file is part of YODA -- Yet more Objects for Data Analysis
0004 // Copyright (C) 2008-2025 The YODA collaboration (see AUTHORS for details)
0005 //
0006 #ifndef YODA_Fillable_h
0007 #define YODA_Fillable_h
0008 
0009 #include "YODA/AnalysisObject.h"
0010 
0011 namespace YODA {
0012 
0013 
0014   /// A base class for all fillable objects
0015   class Fillable {
0016   public:
0017 
0018     /// @name Constructors
0019     //@{
0020 
0021     /// Virtual destructor for inheritance
0022     virtual ~Fillable() = default;
0023 
0024 
0025     //@}
0026 
0027     /// @name Modifiers
0028     //@{
0029 
0030     /// Reset
0031     virtual void reset() = 0;
0032 
0033     /// Rescale as if all fill weights had been different by factor @a scalefactor
0034     virtual void scaleW(double scalefactor) = 0;
0035 
0036     //@}
0037 
0038     /// @name Whole histo data
0039     //@{
0040 
0041     /// Fill-dimension of this data object
0042     virtual size_t fillDim() const noexcept = 0;
0043 
0044     /// Get the number of fills
0045     virtual double numEntries(const bool includeoverflows=true) const = 0;
0046 
0047     /// Get the effective number of fills
0048     virtual double effNumEntries(const bool includeoverflows=true) const = 0;
0049 
0050     /// Get sum of weights in histo
0051     virtual double sumW(const bool includeoverflows=true) const = 0;
0052 
0053     /// Get sum of squared weights in histo
0054     virtual double sumW2(const bool includeoverflows=true) const = 0;
0055 
0056     //@}
0057 
0058   };
0059 
0060 
0061 }
0062 
0063 #endif