npstat is hosted by Hepforge, IPPP Durham
NPStat  5.10.0
npstat::NtHistoFill< Histogram, useFillC > Class Template Reference

#include <NtHistoFill.hh>

Public Types

typedef Histogram histo_type
 

Public Member Functions

 NtHistoFill (Histogram *histo, const std::vector< unsigned long > &coordColumns, const unsigned long weightColumn=ULONG_MAX)
 
template<typename T >
void accumulate (const T *rowContents, const unsigned long nCols) const
 

Static Public Member Functions

static bool callsFillC ()
 
static const char * histoClassname ()
 

Detailed Description

template<class Histogram, bool useFillC = false>
class npstat::NtHistoFill< Histogram, useFillC >

This convenience class fills a histogram using ntuple contents. For use inside "cycleOverRows", "conditionalCycleOverRows", and other similar methods of AbsNtuple.

The second template parameter switches between use of "fill" and "fillC" methods of the Histogram class

Constructor & Destructor Documentation

◆ NtHistoFill()

template<class Histogram , bool useFillC = false>
npstat::NtHistoFill< Histogram, useFillC >::NtHistoFill ( Histogram *  histo,
const std::vector< unsigned long > &  coordColumns,
const unsigned long  weightColumn = ULONG_MAX 
)
inline

This constructor assumes that correctness of the ntuple column numbers has already been verified. Column numbers "coordColumns" which map ntuple column numbers into histogram axes are thus best generated with AbsNtuple methods "columnIndices". Column number coordColumns[0] will be mapped into the first histogram axis, coordColumns[1] into the second, etc. Ntuple method "validColumn" can be used to generate the weight column number. If the weight column is not specified, 1 will be used as the weight.


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