ROOT logo
ROOT » HIST » HIST » THnSparseT<TArrayL>

class THnSparseT<TArrayL>: public THnSparse


 Templated implementation of the abstract base THnSparse.
 All functionality and the interfaces to be used are in THnSparse!

 THnSparse does not know how to store any bin content itself. Instead, this
 is delegated to the derived, templated class: the template parameter decides
 what the format for the bin content is. In fact it even defines the array
 itself; possible implementations probably derive from TArray.

 Typedefs exist for template parematers with ROOT's generic types:

   Templated name        Typedef       Bin content type
   THnSparseT<TArrayC>   THnSparseC    Char_t
   THnSparseT<TArrayS>   THnSparseS    Short_t
   THnSparseT<TArrayI>   THnSparseI    Int_t
   THnSparseT<TArrayL>   THnSparseL    Long_t
   THnSparseT<TArrayF>   THnSparseF    Float_t
   THnSparseT<TArrayD>   THnSparseD    Double_t

 We recommend to use THnSparseC wherever possible, and to map its value space
 of 256 possible values to e.g. float values outside the class. This saves an
 enourmous amount of memory. Only if more than 256 values need to be
 distinguished should e.g. THnSparseS or even THnSparseF be chosen.

 Implementation detail: the derived, templated class is kept extremely small
 on purpose. That way the (templated thus inlined) uses of this class will
 only create a small amount of machine code, in contrast to e.g. STL.

This class is also known as (typedefs to this class)

THnSparseL

Function Members (Methods)

public:
THnSparseT<TArrayL>()
THnSparseT<TArrayL>(const char* name, const char* title, Int_t dim, const Int_t* nbins, const Double_t* xmin = 0, const Double_t* xmax = 0, Int_t chunksize = 1024*16)
~THnSparseT<TArrayL>()
voidTObject::AbstractMethod(const char* method) const
voidTHnBase::Add(const THnBase* h, Double_t c = 1.)
voidTHnBase::Add(const TH1* hist, Double_t c = 1.)
voidTHnSparse::AddBinContent(const Int_t* idx, Double_t v = 1.)
virtual voidTHnSparse::AddBinContent(Long64_t bin, Double_t v = 1.)
virtual voidTHnSparse::AddBinError2(Long64_t bin, Double_t e2)
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTHnBase::Browse(TBrowser* b)
voidTHnBase::CalculateErrors(Bool_t calc = kTRUE)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTNamed::Clear(Option_t* option = "")
virtual TObject*TNamed::Clone(const char* newname = "") const
virtual Int_tTNamed::Compare(const TObject* obj) const
Double_tTHnBase::ComputeIntegral()
virtual voidTNamed::Copy(TObject& named) const
virtual ROOT::THnBaseBinIter*THnSparse::CreateIter(Bool_t respectAxisRange) const
static THnSparse*THnSparse::CreateSparse(const char* name, const char* title, const TH1* h1, Int_t chunkSize = 1024*16)
static THnSparse*THnSparse::CreateSparse(const char* name, const char* title, const THnBase* hn, Int_t chunkSize = 1024*16)
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
voidTHnBase::Divide(const THnBase* h)
voidTHnBase::Divide(const THnBase* h1, const THnBase* h2, Double_t c1 = 1., Double_t c2 = 1., Option_t* option = "")
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
Long64_tTHnBase::Fill(const Double_t* x, Double_t w = 1.)
Long64_tTHnBase::Fill(const char** name, Double_t w = 1.)
virtual voidTNamed::FillBuffer(char*& buffer)
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
TFitResultPtrTHnBase::Fit(TF1* f1, Option_t* option = "", Option_t* goption = "")
virtual TArray*GenerateArray() const
TAxis*THnBase::GetAxis(Int_t dim) const
virtual Long64_tTHnSparse::GetBin(const Int_t* idx) const
virtual Long64_tTHnSparse::GetBin(const Double_t* x) const
virtual Long64_tTHnSparse::GetBin(const char** name) const
virtual Long64_tTHnSparse::GetBin(const Int_t* idx, Bool_t allocate = kTRUE)
virtual Long64_tTHnSparse::GetBin(const Double_t* x, Bool_t allocate = kTRUE)
virtual Long64_tTHnSparse::GetBin(const char** name, Bool_t allocate = kTRUE)
Double_tTHnSparse::GetBinContent(const Int_t* idx) const
virtual Double_tTHnSparse::GetBinContent(Long64_t bin, Int_t* idx = 0) const
Double_tTHnBase::GetBinError(const Int_t* idx) const
Double_tTHnBase::GetBinError(Long64_t linidx) const
virtual Double_tTHnSparse::GetBinError2(Long64_t linidx) const
Bool_tTHnBase::GetCalculateErrors() const
Int_tTHnSparse::GetChunkSize() const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
Double_tTHnBase::GetEntries() const
virtual const char*TObject::GetIconName() const
TObjArray*THnBase::GetListOfAxes()
const TObjArray*THnBase::GetListOfAxes() const
TList*THnBase::GetListOfFunctions()
virtual const char*TNamed::GetName() const
virtual Long64_tTHnSparse::GetNbins() const
Int_tTHnSparse::GetNChunks() const
Int_tTHnBase::GetNdimensions() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
voidTHnBase::GetRandom(Double_t* rand, Bool_t subBinRandom = kTRUE)
Double_tTHnSparse::GetSparseFractionBins() const
Double_tTHnSparse::GetSparseFractionMem() const
Double_tTHnBase::GetSumw() const
Double_tTHnBase::GetSumw2() const
Double_tTHnBase::GetSumwx(Int_t dim) const
Double_tTHnBase::GetSumwx2(Int_t dim) const
virtual const char*TNamed::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
Double_tTHnBase::GetWeightSum() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTHnBase::IsFolder() const
Bool_tTHnBase::IsInRange(Int_t* coord) const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTNamed::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTNamed::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
Long64_tTHnBase::Merge(TCollection* list)
voidTHnBase::Multiply(const THnBase* h)
voidTHnBase::Multiply(TF1* f, Double_t c = 1.)
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
TNamed&TNamed::operator=(const TNamed& rhs)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTHnBase::Print(Option_t* option = "") const
voidTHnBase::PrintBin(Int_t* coord, Option_t* options) const
voidTHnBase::PrintBin(Long64_t idx, Option_t* options) const
voidTHnBase::PrintEntries(Long64_t from = 0, Long64_t howmany = -1, Option_t* options = 0) const
TH1D*THnSparse::Projection(Int_t xDim, Option_t* option = "") const
TH2D*THnSparse::Projection(Int_t yDim, Int_t xDim, Option_t* option = "") const
THnSparse*THnSparse::Projection(Int_t ndim, const Int_t* dim, Option_t* option = "") const
TH3D*THnSparse::Projection(Int_t xDim, Int_t yDim, Int_t zDim, Option_t* option = "") const
THnBase*THnBase::ProjectionND(Int_t ndim, const Int_t* dim, Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
THnSparse*THnSparse::Rebin(Int_t group) const
THnSparse*THnSparse::Rebin(const Int_t* group) const
voidTHnBase::RebinnedAdd(const THnBase* h, Double_t c = 1.)
virtual voidTObject::RecursiveRemove(TObject* obj)
virtual voidTHnSparse::Reset(Option_t* option = "")
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
voidTHnBase::Scale(Double_t c)
voidTHnSparse::SetBinContent(const Int_t* idx, Double_t v)
virtual voidTHnSparse::SetBinContent(Long64_t bin, Double_t v)
voidTHnBase::SetBinEdges(Int_t idim, const Double_t* bins)
voidTHnBase::SetBinError(const Int_t* idx, Double_t e)
voidTHnBase::SetBinError(Long64_t bin, Double_t e)
virtual voidTHnSparse::SetBinError2(Long64_t bin, Double_t e2)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidTHnBase::SetEntries(Double_t entries)
virtual voidTHnSparse::SetFilledBins(Long64_t nbins)
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTHnBase::SetTitle(const char* title)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector&)
virtual Int_tTNamed::Sizeof() const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTHnSparse::Sumw2()
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
THnSparseArrayChunk*THnSparse::AddChunk()
voidTHnBase::AddInternal(const THnBase* h, Double_t c, Bool_t rebinned)
Bool_tTHnBase::CheckConsistency(const THnBase* h, const char* tag) const
THnBase*THnBase::CloneEmpty(const char* name, const char* title, const TObjArray* axes, Bool_t keepTargetAxis) const
TH1*THnBase::CreateHist(const char* name, const char* title, const TObjArray* axes, Bool_t keepTargetAxis) const
static THnBase*THnBase::CreateHnAny(const char* name, const char* title, const TH1* h1, Bool_t sparse, Int_t chunkSize = 1024*16)
static THnBase*THnBase::CreateHnAny(const char* name, const char* title, const THnBase* hn, Bool_t sparse, Int_t chunkSize = 1024*16)
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
virtual voidTHnSparse::FillBin(Long64_t bin, Double_t w)
voidTHnBase::FillBinBase(Double_t w)
voidTHnSparse::FillExMap()
Long64_tTHnSparse::GetBinIndexForCurrentBin(Bool_t allocate)
THnSparseArrayChunk*THnSparse::GetChunk(Int_t idx) const
THnSparseCompactBinCoord*THnSparse::GetCompactCoord() const
voidTHnBase::Init(const char* name, const char* title, const TObjArray* axes, Bool_t keepTargetAxis, Int_t chunkSize = 1024*16)
virtual voidTHnSparse::InitStorage(Int_t* nbins, Int_t chunkSize)
voidTObject::MakeZombie()
Bool_tTHnBase::PrintBin(Long64_t idx, Int_t* coord, Option_t* options) const
TObject*THnBase::ProjectionAny(Int_t ndim, const Int_t* dim, Bool_t wantNDim, Option_t* option = "") const
THnBase*THnBase::RebinBase(Int_t group) const
THnBase*THnBase::RebinBase(const Int_t* group) const
virtual voidTHnSparse::Reserve(Long64_t nbins)
voidTHnBase::ResetBase(Option_t* option = "")
voidTHnBase::UpdateXStat(const Double_t* x, Double_t w = 1.)

Data Members

protected:
TObjArrayTHnBase::fAxesaxes of the histogram
TObjArrayTHnBase::fBrowsables! browser-helpers for each axis
Double_tTHnBase::fEntriesnumber of entries, spread over chunks
Double_t*THnBase::fIntegral! array with bin weight sums
enum THnBase::THnBase::fIntegralStatus! status of integral
TStringTNamed::fNameobject identifier
Int_tTHnBase::fNdimensionsnumber of dimensions
TStringTNamed::fTitleobject title
Double_tTHnBase::fTsumwtotal sum of weights
Double_tTHnBase::fTsumw2total sum of weights squared; -1 if no errors are calculated
TArrayDTHnBase::fTsumwxtotal sum of weight*X for each dimension
TArrayDTHnBase::fTsumwx2total sum of weight*X*X for each dimension

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TArray* GenerateArray() const