Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-04-19 09:13:40

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