Project
Loading...
Searching...
No Matches
StepTHn Class Referenceabstract

#include <StepTHn.h>

Inherits TNamed.

Inherited by StepTHnT< TemplateArray >.

Public Member Functions

 StepTHn ()
 
 StepTHn (const Char_t *name, const Char_t *title, const Int_t nSteps, const Int_t nAxes)
 
 ~StepTHn () override
 
template<typename... Ts>
void Fill (int iStep, const Ts &... valuesAndWeight)
 
void Fill (int iStep, int nParams, double positionAndWeight[])
 
THnBase * getTHn (Int_t step, Bool_t sparse=kFALSE)
 
Int_t getNSteps ()
 
Int_t getNVar ()
 
TArray * getValues (Int_t step)
 
TArray * getSumw2 (Int_t step)
 
 StepTHn (const StepTHn &c)
 
StepTHnoperator= (const StepTHn &corr)
 
void Copy (TObject &c) const override
 
virtual Long64_t Merge (TCollection *list)=0
 
TAxis * GetAxis (int i)
 
void Sumw2 ()
 

Protected Member Functions

void init ()
 
virtual TArray * createArray (const TArray *src=nullptr) const =0
 
void createTarget (Int_t step, Bool_t sparse)
 
void deleteContainers ()
 
Long64_t getGlobalBinIndex (const Int_t *binIdx)
 

Protected Attributes

Long64_t mNBins
 
Int_t mNVars
 
Int_t mNSteps
 
TArray ** mValues
 
TArray ** mSumw2
 
THnBase ** mTarget
 
TAxis ** mAxisCache
 target histogram
 
Int_t * mNbinsCache
 cache axis pointers (about 50% of the time in Fill is spent in GetAxis otherwise)
 
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)
 
THnSparse * mPrototype
 caching of last used bins (in many loops some vars are the same for a while)
 

Detailed Description

Definition at line 30 of file StepTHn.h.

Constructor & Destructor Documentation

◆ StepTHn() [1/3]

StepTHn::StepTHn ( )

Definition at line 32 of file StepTHn.cxx.

◆ StepTHn() [2/3]

StepTHn::StepTHn ( const Char_t *  name,
const Char_t *  title,
const Int_t  nSteps,
const Int_t  nAxes 
)

Definition at line 47 of file StepTHn.cxx.

◆ ~StepTHn()

StepTHn::~StepTHn ( )
override

Definition at line 142 of file StepTHn.cxx.

◆ StepTHn() [3/3]

StepTHn::StepTHn ( const StepTHn c)

Definition at line 123 of file StepTHn.cxx.

Member Function Documentation

◆ Copy()

void StepTHn::Copy ( TObject c) const
override

Definition at line 191 of file StepTHn.cxx.

◆ createArray()

virtual TArray * StepTHn::createArray ( const TArray *  src = nullptr) const
protectedpure virtual

Implemented in StepTHnT< TemplateArray >.

◆ createTarget()

void StepTHn::createTarget ( Int_t  step,
Bool_t  sparse 
)
protected

Definition at line 296 of file StepTHn.cxx.

◆ deleteContainers()

void StepTHn::deleteContainers ( )
protected

Definition at line 158 of file StepTHn.cxx.

◆ Fill() [1/2]

template<typename... Ts>
void StepTHn::Fill ( int  iStep,
const Ts &...  valuesAndWeight 
)

Definition at line 117 of file StepTHn.h.

◆ Fill() [2/2]

void StepTHn::Fill ( int  iStep,
int  nParams,
double  positionAndWeight[] 
)

Definition at line 379 of file StepTHn.cxx.

◆ GetAxis()

TAxis * StepTHn::GetAxis ( int  i)
inline

Definition at line 60 of file StepTHn.h.

◆ getGlobalBinIndex()

Long64_t StepTHn::getGlobalBinIndex ( const Int_t *  binIdx)
protected

Definition at line 281 of file StepTHn.cxx.

◆ getNSteps()

Int_t StepTHn::getNSteps ( )
inline

Definition at line 48 of file StepTHn.h.

◆ getNVar()

Int_t StepTHn::getNVar ( )
inline

Definition at line 49 of file StepTHn.h.

◆ getSumw2()

TArray * StepTHn::getSumw2 ( Int_t  step)
inline

Definition at line 52 of file StepTHn.h.

◆ getTHn()

THnBase * StepTHn::getTHn ( Int_t  step,
Bool_t  sparse = kFALSE 
)
inline

Definition at line 41 of file StepTHn.h.

◆ getValues()

TArray * StepTHn::getValues ( Int_t  step)
inline

Definition at line 51 of file StepTHn.h.

◆ init()

void StepTHn::init ( )
protected

Definition at line 110 of file StepTHn.cxx.

◆ Merge()

virtual Long64_t StepTHn::Merge ( TCollection *  list)
pure virtual

Implemented in StepTHnT< TemplateArray >.

◆ operator=()

StepTHn & StepTHn::operator= ( const StepTHn corr)

Definition at line 180 of file StepTHn.cxx.

◆ Sumw2()

void StepTHn::Sumw2 ( )
inline

Definition at line 61 of file StepTHn.h.

Member Data Documentation

◆ mAxisCache

TAxis** StepTHn::mAxisCache
protected

target histogram

Definition at line 79 of file StepTHn.h.

◆ mLastBins

Int_t* StepTHn::mLastBins
protected

caching of last used bins (in many loops some vars are the same for a while)

Definition at line 82 of file StepTHn.h.

◆ mLastVars

Double_t* StepTHn::mLastVars
protected

cache Nbins per axis

Definition at line 81 of file StepTHn.h.

◆ mNBins

Long64_t StepTHn::mNBins
protected

Definition at line 71 of file StepTHn.h.

◆ mNbinsCache

Int_t* StepTHn::mNbinsCache
protected

cache axis pointers (about 50% of the time in Fill is spent in GetAxis otherwise)

Definition at line 80 of file StepTHn.h.

◆ mNSteps

Int_t StepTHn::mNSteps
protected

Definition at line 73 of file StepTHn.h.

◆ mNVars

Int_t StepTHn::mNVars
protected

Definition at line 72 of file StepTHn.h.

◆ mPrototype

THnSparse* StepTHn::mPrototype
protected

caching of last used bins (in many loops some vars are the same for a while)

Definition at line 84 of file StepTHn.h.

◆ mSumw2

TArray** StepTHn::mSumw2
protected

Definition at line 75 of file StepTHn.h.

◆ mTarget

THnBase** StepTHn::mTarget
protected

Definition at line 77 of file StepTHn.h.

◆ mValues

TArray** StepTHn::mValues
protected

Definition at line 74 of file StepTHn.h.


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