34 StepTHn(
const Char_t*
name,
const Char_t* title,
const Int_t nSteps,
const Int_t nAxes);
37 template <
typename... Ts>
38 void Fill(
int iStep,
const Ts&... valuesAndWeight);
39 void Fill(
int iStep,
int nParams,
double positionAndWeight[]);
41 THnBase*
getTHn(Int_t step, Bool_t sparse = kFALSE)
89template <
class TemplateArray>
94 StepTHnT(
const Char_t*
name,
const Char_t* title,
const Int_t nSteps,
const Int_t nAxes, Int_t* nBins, std::vector<Double_t> binEdges[],
const char** axisTitles);
95 StepTHnT(
const char*
name,
const char* title,
const int nSteps,
const int nAxes,
const int* nBins,
const double* xmin,
const double* xmax);
98 Long64_t
Merge(TCollection*
list)
override;
103 if (
src ==
nullptr) {
104 return new TemplateArray(
mNBins);
106 return new TemplateArray(*((TemplateArray*)
src));
116template <
typename... Ts>
119 constexpr int nArgs =
sizeof...(Ts);
120 double tempArray[] = {
static_cast<double>(valuesAndWeight)...};
121 Fill(iStep, nArgs, tempArray);
StepTHnT< TArrayF > StepTHnF
StepTHnT< TArrayD > StepTHnD
TArray * createArray(const TArray *src=nullptr) const override
~StepTHnT() override=default
Long64_t Merge(TCollection *list) override
Double_t * mLastVars
cache Nbins per axis
Int_t * mLastBins
caching of last used bins (in many loops some vars are the same for a while)
void Fill(int iStep, const Ts &... valuesAndWeight)
TAxis ** mAxisCache
target histogram
Long64_t getGlobalBinIndex(const Int_t *binIdx)
StepTHn & operator=(const StepTHn &corr)
virtual TArray * createArray(const TArray *src=nullptr) const =0
Int_t * mNbinsCache
cache axis pointers (about 50% of the time in Fill is spent in GetAxis otherwise)
virtual Long64_t Merge(TCollection *list)=0
void createTarget(Int_t step, Bool_t sparse)
TArray * getValues(Int_t step)
THnBase * getTHn(Int_t step, Bool_t sparse=kFALSE)
THnSparse * mPrototype
caching of last used bins (in many loops some vars are the same for a while)
TArray * getSumw2(Int_t step)
GLuint const GLchar * name