yoda is hosted by Hepforge, IPPP Durham
YODA - Yet more Objects for Data Analysis 2.0.2
YODA::FillableStorage< FillDim, BinContentT, AxisT > Class Template Reference

FillableStorage, introduces FillAdapterT on top of BinnedStorage base class. More...

#include <FillableStorage.h>

Inheritance diagram for YODA::FillableStorage< FillDim, BinContentT, AxisT >:
YODA::BinnedStorage< BinContentT, AxisT... >

Public Types

using FillType = FillCoordsT
 Type of the fill coordinates.
 
using FillDimension = std::integral_constant< size_t, FillDim >
 Fill dimension.
 
using FillAdapterT = std::function< void(BinT &, FillCoordsT &&, double, double)>
 Adapter type (type of lambda used to access stored object).
 
- Public Types inherited from YODA::BinnedStorage< BinContentT, AxisT... >
using BinningType = BinningT
 
using BinType = BinT
 
using BinDimension = std::integral_constant< size_t, sizeof...(AxisT)>
 

Public Member Functions

Constructors
 FillableStorage (FillAdapterT adapter=AdapterWrapperT()._adapter)
 Nullary constructor for unique pointers etc.
 
 FillableStorage (const BinningT &binning, FillAdapterT adapter=AdapterWrapperT()._adapter)
 Constructs FillableStorage from Binning.
 
 FillableStorage (BinningT &&binning, FillAdapterT adapter=AdapterWrapperT()._adapter)
 Constructs FillableStorage from Binning. Rvalue.
 
 FillableStorage (const std::vector< AxisT > &... edges, FillAdapterT adapter=AdapterWrapperT()._adapter)
 Constructs binning from an adapter and vectors of axes' edges.
 
 FillableStorage (std::vector< AxisT > &&... edges, FillAdapterT adapter=AdapterWrapperT()._adapter)
 Constructs binning from an adapter and Rvalue vectors of axes' edges.
 
 FillableStorage (const Axis< AxisT > &... axes, FillAdapterT adapter=AdapterWrapperT()._adapter)
 Constructs binning from an adapter and a sequence of axes.
 
 FillableStorage (Axis< AxisT > &&... axes, FillAdapterT adapter=AdapterWrapperT()._adapter)
 Constructs binning from an adapter and a sequence of Rvalue axes.
 
 FillableStorage (const FillableStorage &other)
 Copy constructor.
 
 FillableStorage (FillableStorage &&other)
 Move constructor.
 
Methods
template<size_t... Is>
int fill (FillCoordsT &&coords, std::index_sequence< Is... >, const double weight=1.0, const double fraction=1.0) noexcept
 Triggers fill adapter on the bin corresponding to coords.
 
int fill (FillCoordsT &&coords, const double weight=1.0, const double fraction=1.0) noexcept
 Triggers fill adapter on the bin corresponding to coords.
 
Utilities
size_t fillDim () const
 Returns the dimension of the filling tuple.
 
size_t nanCount () const
 
double nanSumW () const
 
double nanSumW2 () const
 
void setNanLog (size_t count, double sumw, double sumw2)
 
void reset () noexcept
 Reset the Fillable.
 
Operators
FillableStorageoperator= (const FillableStorage &other) noexcept
 Copy assignment.
 
FillableStorageoperator= (FillableStorage &&other) noexcept
 Move assignment.
 
FillableStorageoperator+= (const FillableStorage &other)
 Add another BinnedStorage to this one.
 
FillableStorageoperator-= (const FillableStorage &other)
 Subtract another BinnedStorage from this one.
 
- Public Member Functions inherited from YODA::BinnedStorage< BinContentT, AxisT... >
 BinnedStorage ()
 Nullary constructor for unique pointers etc.
 
 BinnedStorage (const BinningT &binning)
 Constructs BinnedStorage from Binning.
 
 BinnedStorage (BinningT &&binning)
 Constructs BinnedStorage from Binning. Rvalue.
 
 BinnedStorage (const std::vector< AxisT > &... edges)
 Constructs binning from an adapter and vectors of axes' edges.
 
 BinnedStorage (std::vector< AxisT > &&... edges)
 Constructs binning from an adapter and Rvalue vectors of axes' edges.
 
 BinnedStorage (std::initializer_list< AxisT > &&... edges)
 Constructs binning from an adapter and Rvalue initializer lists of axes' edges.
 
 BinnedStorage (const Axis< AxisT > &... axes)
 Constructs binning from an adapter and a sequence of axes.
 
 BinnedStorage (Axis< AxisT > &&... axes)
 Constructs binning from an adapter and a sequence of Rvalue axes.
 
 BinnedStorage (const BinnedStorage &other)
 Copy constructor.
 
 BinnedStorage (BinnedStorage &&other)
 Move constructor.
 
size_t dim () const noexcept
 Total dimension of the object ( = number of axes + content)
 
BinTbin (size_t idx) noexcept
 Returns reference to the bin at idx.
 
const BinTbin (size_t idx) const noexcept
 Returns Bin at idx.
 
BinTbin (const std::array< size_t, sizeof...(AxisT)> &idxLocal) noexcept
 Bin access using local bin indices.
 
const BinTbin (const std::array< size_t, sizeof...(AxisT)> &idxLocal) const noexcept
 Bin access using local bin indices.
 
BinTbinAt (typename BinningT::EdgeTypesTuple &&coords) noexcept
 Returns reference to the bin at coordinates.
 
const BinTbinAt (typename BinningT::EdgeTypesTuple &&coords) const noexcept
 Returns reference to the bin at coordinates (const version).
 
void set (typename BinningT::EdgeTypesTuple &&coords, BinContentT &&content) noexcept
 Sets the bin corresponding to coords with an rvalue content.
 
void set (typename BinningT::EdgeTypesTuple &&coords, const BinContentT &content) noexcept
 Sets the bin corresponding to coords with content.
 
void set (const size_t binIdx, BinContentT &&content) noexcept
 Sets the bin corresponding to binIndex with an rvalue content.
 
void set (const size_t binIdx, const BinContentT &content) noexcept
 Sets the bin corresponding to binIndex with content.
 
std::vector< size_t > calcIndicesToSkip (const bool includeOverflows, const bool includeMaskedBins) const noexcept
 Calculates indices of bins which are marked or located in the overflow.
 
BinsVecWrapper< BinsVecTbins (const bool includeOverflows=false, const bool includeMaskedBins=false) noexcept
 Returns bins vector wrapper, which skips masked elements when iterated over.
 
const BinsVecWrapper< const BinsVecTbins (const bool includeOverflows=false, const bool includeMaskedBins=false) const noexcept
 Const version.
 
const BinningTbinning () const noexcept
 Returns dimension underlying binning object reference.
 
size_t binDim () const noexcept
 Returns dimension of binning.
 
size_t numBins (const bool includeOverflows=false, const bool includeMaskedBins=false) const noexcept
 Number of bins in the BinnedStorage.
 
size_t numBinsAt (const size_t axisN, const bool includeOverflows=false) const noexcept
 Number of bins in the BinnedStorage.
 
void reset () noexcept
 Reset the BinnedStorage.
 
void clearBins () noexcept
 Deletes all bins and creates empty new ones.
 
void maskBins (const std::vector< size_t > &indicesToMask, const bool status=true) noexcept
 Mask a range of bins.
 
void maskBin (const size_t indexToMask, const bool status=true) noexcept
 Mask a bin at a given index.
 
void maskSlice (const size_t dim, const size_t idx, const bool status=true)
 Mask a slice of the binning at local bin index idx along axis dimesnion dim.
 
void maskBinAt (typename BinningT::EdgeTypesTuple &&coords, const bool status=true) noexcept
 Mask a bin at a given set of corrdinates.
 
bool isMasked (const size_t binIndex) const noexcept
 
std::vector< size_t > maskedBins () const noexcept
 
bool isVisible (const size_t binIndex) const noexcept
 
auto mergeBins (std::decay_t< decltype(AxisNs, std::declval< std::pair< size_t, size_t > >())>... mergeRanges) noexcept -> std::enable_if_t< MetaUtils::is_detected_v< MetaUtils::operatorTraits::addition_assignment_t, BinContentT >, RetT >
 Merge bins from A to B at G axis.
 
auto mkBinnedSlices (Func &&how2add, const bool includeOverflows=false) const
 Split this BinnedStorage into a vector of BinnedStorages along axisN.
 
BinnedStorageoperator= (const BinnedStorage &other) noexcept
 Copy assignment.
 
BinnedStorageoperator= (BinnedStorage &&other) noexcept
 Move assignment.
 
bool operator== (const BinnedStorage &other) const noexcept
 Compares BinnedStorages for equality, e.g. dimensions of underlying binnings and all axes edges are equal.
 
bool operator!= (const BinnedStorage &other) const noexcept
 Compares BinnedStorages for inequality.
 

Protected Types

using BaseT = BinnedStorage< BinContentT, AxisT... >
 Convenience alias to be used in constructor.
 
using BinningT = typename BaseT::BinningT
 
using BinT = Bin< sizeof...(AxisT), BinContentT, BinningT >
 
using AdapterWrapperT = defaultAdapter< FillDim, BinT >
 
using FillableT = FillableStorage< FillDim, BinContentT, AxisT... >
 
using FillCoordsT = decltype(std::tuple_cat(std::declval< typename BinningT::EdgeTypesTuple >(), dblPadding(std::make_index_sequence< FillDim-sizeof...(AxisT)>{})))
 
- Protected Types inherited from YODA::BinnedStorage< BinContentT, AxisT... >
using BinningT = Binning< std::decay_t< decltype(std::declval< Axis< AxisT > >())>... >
 Convenience alias to be used in constructor.
 
using BinT = Bin< sizeof...(AxisT), BinContentT, BinningT >
 
using BinsVecT = std::vector< BinT >
 
using BaseT = BinnedStorage< BinContentT, AxisT... >
 

Additional Inherited Members

- Protected Member Functions inherited from YODA::BinnedStorage< BinContentT, AxisT... >
void fillBins () noexcept
 Fills bins with wrapped BinContent objects.
 
void fillBins (const BinsVecT &bins) noexcept
 
void fillBins (BinsVecT &&bins) noexcept
 

Detailed Description

template<size_t FillDim, typename BinContentT, typename... AxisT>
class YODA::FillableStorage< FillDim, BinContentT, AxisT >

FillableStorage, introduces FillAdapterT on top of BinnedStorage base class.

Note
The additional abstraction layer is necessary to distinguish between binned objects that are "live" (i.e. fillable/incrementable, like a Histo1D) and those that are "dead" (e.g. a binned set of cross-section measurement points).

Definition at line 86 of file FillableStorage.h.

Member Typedef Documentation

◆ AdapterWrapperT

template<size_t FillDim, typename BinContentT , typename... AxisT>
using YODA::FillableStorage< FillDim, BinContentT, AxisT >::AdapterWrapperT = defaultAdapter<FillDim, BinT>
protected

Definition at line 97 of file FillableStorage.h.

◆ BaseT

template<size_t FillDim, typename BinContentT , typename... AxisT>
using YODA::FillableStorage< FillDim, BinContentT, AxisT >::BaseT = BinnedStorage<BinContentT, AxisT...>
protected

Convenience alias to be used in constructor.

Definition at line 94 of file FillableStorage.h.

◆ BinningT

template<size_t FillDim, typename BinContentT , typename... AxisT>
using YODA::FillableStorage< FillDim, BinContentT, AxisT >::BinningT = typename BaseT::BinningT
protected

Definition at line 95 of file FillableStorage.h.

◆ BinT

template<size_t FillDim, typename BinContentT , typename... AxisT>
using YODA::FillableStorage< FillDim, BinContentT, AxisT >::BinT = Bin<sizeof...(AxisT), BinContentT, BinningT>
protected

Definition at line 96 of file FillableStorage.h.

◆ FillableT

template<size_t FillDim, typename BinContentT , typename... AxisT>
using YODA::FillableStorage< FillDim, BinContentT, AxisT >::FillableT = FillableStorage<FillDim, BinContentT, AxisT...>
protected

Definition at line 98 of file FillableStorage.h.

◆ FillAdapterT

template<size_t FillDim, typename BinContentT , typename... AxisT>
using YODA::FillableStorage< FillDim, BinContentT, AxisT >::FillAdapterT = std::function<void(BinT&, FillCoordsT&&, double, double)>

Adapter type (type of lambda used to access stored object).

BinT is a stored object type; FillCoordsT is a coordinates init list (or tuple) type; Doubles are for weight and fraction correspondingly.

Definition at line 115 of file FillableStorage.h.

◆ FillCoordsT

template<size_t FillDim, typename BinContentT , typename... AxisT>
using YODA::FillableStorage< FillDim, BinContentT, AxisT >::FillCoordsT = decltype(std::tuple_cat(std::declval<typename BinningT::EdgeTypesTuple>(), dblPadding(std::make_index_sequence<FillDim-sizeof...(AxisT)>{})))
protected

Definition at line 99 of file FillableStorage.h.

◆ FillDimension

template<size_t FillDim, typename BinContentT , typename... AxisT>
using YODA::FillableStorage< FillDim, BinContentT, AxisT >::FillDimension = std::integral_constant<size_t, FillDim>

Fill dimension.

Definition at line 108 of file FillableStorage.h.

◆ FillType

template<size_t FillDim, typename BinContentT , typename... AxisT>
using YODA::FillableStorage< FillDim, BinContentT, AxisT >::FillType = FillCoordsT

Type of the fill coordinates.

Definition at line 105 of file FillableStorage.h.

Constructor & Destructor Documentation

◆ FillableStorage() [1/9]

template<size_t FillDim, typename BinContentT , typename... AxisT>
YODA::FillableStorage< FillDim, BinContentT, AxisT >::FillableStorage ( FillAdapterT  adapter = AdapterWrapperT()._adapter)
inline

Nullary constructor for unique pointers etc.

Definition at line 121 of file FillableStorage.h.

122 : BaseT(), _fillAdapter(adapter), _nancount(0), _nansumw(0.), _nansumw2(0.) { }
BinnedStorage< BinContentT, AxisT... > BaseT
Convenience alias to be used in constructor.

◆ FillableStorage() [2/9]

template<size_t FillDim, typename BinContentT , typename... AxisT>
YODA::FillableStorage< FillDim, BinContentT, AxisT >::FillableStorage ( const BinningT binning,
FillAdapterT  adapter = AdapterWrapperT()._adapter 
)
inline

Constructs FillableStorage from Binning.

Definition at line 125 of file FillableStorage.h.

126 : BaseT(binning), _fillAdapter(adapter), _nancount(0), _nansumw(0.), _nansumw2(0.) { }
const BinningT & binning() const noexcept
Returns dimension underlying binning object reference.

◆ FillableStorage() [3/9]

template<size_t FillDim, typename BinContentT , typename... AxisT>
YODA::FillableStorage< FillDim, BinContentT, AxisT >::FillableStorage ( BinningT &&  binning,
FillAdapterT  adapter = AdapterWrapperT()._adapter 
)
inline

Constructs FillableStorage from Binning. Rvalue.

Definition at line 129 of file FillableStorage.h.

130 : BaseT(std::move(binning)), _fillAdapter(adapter), _nancount(0), _nansumw(0.), _nansumw2(0.) { }

◆ FillableStorage() [4/9]

template<size_t FillDim, typename BinContentT , typename... AxisT>
YODA::FillableStorage< FillDim, BinContentT, AxisT >::FillableStorage ( const std::vector< AxisT > &...  edges,
FillAdapterT  adapter = AdapterWrapperT()._adapter 
)
inline

Constructs binning from an adapter and vectors of axes' edges.

Definition at line 133 of file FillableStorage.h.

134 : BaseT(edges...), _fillAdapter(adapter), _nancount(0), _nansumw(0.), _nansumw2(0.) { }

◆ FillableStorage() [5/9]

template<size_t FillDim, typename BinContentT , typename... AxisT>
YODA::FillableStorage< FillDim, BinContentT, AxisT >::FillableStorage ( std::vector< AxisT > &&...  edges,
FillAdapterT  adapter = AdapterWrapperT()._adapter 
)
inline

Constructs binning from an adapter and Rvalue vectors of axes' edges.

Definition at line 137 of file FillableStorage.h.

138 : BaseT(std::move(edges)...), _fillAdapter(adapter), _nancount(0), _nansumw(0.), _nansumw2(0.) { }

◆ FillableStorage() [6/9]

template<size_t FillDim, typename BinContentT , typename... AxisT>
YODA::FillableStorage< FillDim, BinContentT, AxisT >::FillableStorage ( const Axis< AxisT > &...  axes,
FillAdapterT  adapter = AdapterWrapperT()._adapter 
)
inline

Constructs binning from an adapter and a sequence of axes.

Definition at line 141 of file FillableStorage.h.

142 : BaseT(axes...), _fillAdapter(adapter), _nancount(0), _nansumw(0.), _nansumw2(0.) { }

◆ FillableStorage() [7/9]

template<size_t FillDim, typename BinContentT , typename... AxisT>
YODA::FillableStorage< FillDim, BinContentT, AxisT >::FillableStorage ( Axis< AxisT > &&...  axes,
FillAdapterT  adapter = AdapterWrapperT()._adapter 
)
inline

Constructs binning from an adapter and a sequence of Rvalue axes.

Definition at line 145 of file FillableStorage.h.

146 : BaseT(std::move(axes)...), _fillAdapter(adapter), _nancount(0), _nansumw(0.), _nansumw2(0.) { }

◆ FillableStorage() [8/9]

template<size_t FillDim, typename BinContentT , typename... AxisT>
YODA::FillableStorage< FillDim, BinContentT, AxisT >::FillableStorage ( const FillableStorage< FillDim, BinContentT, AxisT > &  other)
inline

Copy constructor.

Definition at line 149 of file FillableStorage.h.

150 : BaseT(other), _fillAdapter(other._fillAdapter),
151 _nancount(other._nancount), _nansumw(other._nansumw), _nansumw2(other._nansumw2) { }

◆ FillableStorage() [9/9]

template<size_t FillDim, typename BinContentT , typename... AxisT>
YODA::FillableStorage< FillDim, BinContentT, AxisT >::FillableStorage ( FillableStorage< FillDim, BinContentT, AxisT > &&  other)
inline

Move constructor.

Definition at line 154 of file FillableStorage.h.

155 : BaseT(std::move(other)), _fillAdapter(std::move(other._fillAdapter)),
156 _nancount(std::move(other._nancount)), _nansumw(std::move(other._nansumw)),
157 _nansumw2(std::move(other._nansumw2)) { }

Member Function Documentation

◆ fill() [1/2]

template<size_t FillDim, typename BinContentT , typename... AxisT>
int YODA::FillableStorage< FillDim, BinContentT, AxisT >::fill ( FillCoordsT &&  coords,
const double  weight = 1.0,
const double  fraction = 1.0 
)
inlinenoexcept

Triggers fill adapter on the bin corresponding to coords.

Definition at line 188 of file FillableStorage.h.

188 {
189 return fill(std::move(coords), std::make_index_sequence<sizeof...(AxisT)>{}, weight, fraction);
190 }
int fill(FillCoordsT &&coords, std::index_sequence< Is... >, const double weight=1.0, const double fraction=1.0) noexcept
Triggers fill adapter on the bin corresponding to coords.

References YODA::FillableStorage< FillDim, BinContentT, AxisT >::fill().

◆ fill() [2/2]

template<size_t FillDim, typename BinContentT , typename... AxisT>
template<size_t... Is>
int YODA::FillableStorage< FillDim, BinContentT, AxisT >::fill ( FillCoordsT &&  coords,
std::index_sequence< Is... >  ,
const double  weight = 1.0,
const double  fraction = 1.0 
)
inlinenoexcept

Triggers fill adapter on the bin corresponding to coords.

Note
Accepts coordinates only as rvalue tuple. The tuple members are then moved (bringing tuple member to unspecified state) later in adapters.

Definition at line 169 of file FillableStorage.h.

170 {
171
172 // make sure the user isn't trying to fill with NaN ...
173 // include all fill coordinates here
174 if (containsNan(coords)) {
175 _nancount += 1;
176 _nansumw += weight*fraction;
177 _nansumw2 += sqr(weight*fraction);
178 return -1;
179 }
180 // select binned coordinates (possibly a subset of fill coordinates)
181 auto binCoords = std::tuple<AxisT...>(std::get<Is>(coords)...);
182 const size_t binIdx = FillableT::_binning.globalIndexAt(binCoords);
183 _fillAdapter(BaseT::bin(binIdx), std::move(coords), weight, fraction);
184 return int(binIdx);
185 }
BinT & bin(size_t idx) noexcept
Returns reference to the bin at idx.
bool containsNan(const std::tuple< Args... > &coords)
Checks if a coordinate tuple has a nan.
Definition Binning.h:30
NUM sqr(NUM a)
Named number-type squaring operation.
Definition MathUtils.h:216

References YODA::BinnedStorage< BinContentT, AxisT... >::bin(), YODA::containsNan(), and YODA::sqr().

Referenced by YODA::FillableStorage< FillDim, BinContentT, AxisT >::fill().

◆ fillDim()

template<size_t FillDim, typename BinContentT , typename... AxisT>
size_t YODA::FillableStorage< FillDim, BinContentT, AxisT >::fillDim ( ) const
inline

Returns the dimension of the filling tuple.

Definition at line 197 of file FillableStorage.h.

197{ return FillDim; }

◆ nanCount()

template<size_t FillDim, typename BinContentT , typename... AxisT>
size_t YODA::FillableStorage< FillDim, BinContentT, AxisT >::nanCount ( ) const
inline

Definition at line 199 of file FillableStorage.h.

199{ return _nancount; }

◆ nanSumW()

template<size_t FillDim, typename BinContentT , typename... AxisT>
double YODA::FillableStorage< FillDim, BinContentT, AxisT >::nanSumW ( ) const
inline

Definition at line 201 of file FillableStorage.h.

201{ return _nansumw; }

◆ nanSumW2()

template<size_t FillDim, typename BinContentT , typename... AxisT>
double YODA::FillableStorage< FillDim, BinContentT, AxisT >::nanSumW2 ( ) const
inline

Definition at line 203 of file FillableStorage.h.

203{ return _nansumw2; }

◆ operator+=()

template<size_t FillDim, typename BinContentT , typename... AxisT>
FillableStorage & YODA::FillableStorage< FillDim, BinContentT, AxisT >::operator+= ( const FillableStorage< FillDim, BinContentT, AxisT > &  other)
inline

Add another BinnedStorage to this one.

Definition at line 250 of file FillableStorage.h.

250 {
251 if (*this != other)
252 throw std::logic_error("YODA::BinnedStorage<" + std::to_string(sizeof...(AxisT)) +\
253 ">: Cannot add BinnedStorages with different binnings.");
254 size_t i = 0;
255 for (auto& bin : FillableT::bins(true)) {
256 bin += other.bin(i++);
257 }
258
259 return *this;
260 }
BinsVecWrapper< BinsVecT > bins(const bool includeOverflows=false, const bool includeMaskedBins=false) noexcept
Returns bins vector wrapper, which skips masked elements when iterated over.
FillableStorage< FillDim, BinContentT, AxisT... > FillableT

References YODA::BinnedStorage< BinContentT, AxisT >::bin(), YODA::BinnedStorage< BinContentT, AxisT... >::bin(), and YODA::BinnedStorage< BinContentT, AxisT... >::bins().

◆ operator-=()

template<size_t FillDim, typename BinContentT , typename... AxisT>
FillableStorage & YODA::FillableStorage< FillDim, BinContentT, AxisT >::operator-= ( const FillableStorage< FillDim, BinContentT, AxisT > &  other)
inline

Subtract another BinnedStorage from this one.

Definition at line 263 of file FillableStorage.h.

263 {
264 if (*this != other)
265 throw std::logic_error("YODA::FillableStorage<" + std::to_string(sizeof...(AxisT)) +\
266 ">: Cannot substract FillableStorages with different binnings.");
267
268 size_t i = 0;
269 for (auto& bin : FillableT::bins(true)) {
270 bin -= other.bin(i++);
271 }
272
273 return *this;
274 }

References YODA::BinnedStorage< BinContentT, AxisT >::bin(), YODA::BinnedStorage< BinContentT, AxisT... >::bin(), and YODA::BinnedStorage< BinContentT, AxisT... >::bins().

◆ operator=() [1/2]

template<size_t FillDim, typename BinContentT , typename... AxisT>
FillableStorage & YODA::FillableStorage< FillDim, BinContentT, AxisT >::operator= ( const FillableStorage< FillDim, BinContentT, AxisT > &  other)
inlinenoexcept

Copy assignment.

Definition at line 226 of file FillableStorage.h.

226 {
227 if (this != &other) {
228 _fillAdapter = other._fillAdapter;
229 _nancount = other._nancount;
230 _nansumw = other._nansumw;
231 _nansumw2 = other._nansumw2;
232 BaseT::operator=(other);
233 }
234 return *this;
235 }
BinnedStorage & operator=(const BinnedStorage &other) noexcept
Copy assignment.

References YODA::BinnedStorage< BinContentT, AxisT... >::operator=().

◆ operator=() [2/2]

template<size_t FillDim, typename BinContentT , typename... AxisT>
FillableStorage & YODA::FillableStorage< FillDim, BinContentT, AxisT >::operator= ( FillableStorage< FillDim, BinContentT, AxisT > &&  other)
inlinenoexcept

Move assignment.

Definition at line 238 of file FillableStorage.h.

238 {
239 if (this != &other) {
240 _fillAdapter = std::move(other._fillAdapter);
241 _nancount = std::move(other._nancount);
242 _nansumw = std::move(other._nansumw);
243 _nansumw2 = std::move(other._nansumw2);
244 BaseT::operator=(std::move(other));
245 }
246 return *this;
247 }

References YODA::BinnedStorage< BinContentT, AxisT... >::operator=().

◆ reset()

template<size_t FillDim, typename BinContentT , typename... AxisT>
void YODA::FillableStorage< FillDim, BinContentT, AxisT >::reset ( )
inlinenoexcept

Reset the Fillable.

Keep the binning but set all bin contents and related quantities to zero

Definition at line 214 of file FillableStorage.h.

214 {
215 _nancount = 0;
216 _nansumw = _nansumw2 = 0.;
218 }
void clearBins() noexcept
Deletes all bins and creates empty new ones.

References YODA::BinnedStorage< BinContentT, AxisT... >::clearBins().

◆ setNanLog()

template<size_t FillDim, typename BinContentT , typename... AxisT>
void YODA::FillableStorage< FillDim, BinContentT, AxisT >::setNanLog ( size_t  count,
double  sumw,
double  sumw2 
)
inline

Definition at line 205 of file FillableStorage.h.

205 {
206 _nancount = count;
207 _nansumw = sumw;
208 _nansumw2 = sumw2;
209 }

The documentation for this class was generated from the following file: