![]() |
AliRoot Core
3abf5b4 (3abf5b4)
|
A very memory compact histogram to hold some tracker distributions. More...
#include <AliMUONSparseHisto.h>
Public Types | |
enum | { kUnderflow = BIT(20), kOverflow = BIT(21) } |
Public Member Functions | |
AliMUONSparseHisto (Double_t xmin=0.0, Double_t xmax=4096.0) | |
AliMUONSparseHisto (const AliMUONSparseHisto &rhs) | |
AliMUONSparseHisto & | operator= (const AliMUONSparseHisto &rhs) |
virtual | ~AliMUONSparseHisto () |
Bool_t | Add (const AliMUONSparseHisto &h) |
Bool_t | HasUnderflow () const |
Bool_t | HasOverflow () const |
Int_t | Fill (Double_t value) |
Int_t | GetNbins () const |
Return number of bins we hold. More... | |
Double_t | GetBinCenter (Int_t bin) const |
Int_t | GetBinContent (Int_t bin) const |
virtual void | Print (Option_t *opt="") const |
virtual void | Clear (Option_t *opt="") |
Int_t | Find (Int_t binCenter) const |
virtual void | Copy (TObject &object) const |
Double_t | Xmax () const |
Return max value of bincenter. More... | |
Double_t | Xmin () const |
Return min value of bincenter. More... | |
Int_t | Nbits () const |
Number of bits used to code the x-value of the histogram. More... | |
Private Member Functions | |
UInt_t | Encode (Int_t binCenter, Int_t binContent) const |
Double_t | DecodeValue (Int_t value) const |
Int_t | EncodeValue (Double_t value) const |
UInt_t | GetBin (Int_t i) const |
Int_t | BinCenter (UInt_t x) const |
Int_t | BinContent (UInt_t x) const |
void | Expand () |
Double_t | Factor () const |
Conversion factor to go from float to int value (for bin content) More... | |
Private Attributes | |
Int_t | fNbins |
number of bins we hold More... | |
UInt_t * | fArray |
compacted content = (bin,value) More... | |
Double_t | fXmin |
min value of bincenter More... | |
Double_t | fXmax |
max value of bincenter More... | |
Double_t | fFactor |
to go from double to int More... | |
A very memory compact histogram to hold some tracker distributions.
Tiny histogram-like class to hold some distributions of tracker data. Only intent of this class is to minimize memory consumption, in order to fit a maximum number of channel histograms into memory. The rest is not supported ;-)
Definition at line 19 of file AliMUONSparseHisto.h.
anonymous enum |
Enumerator | |
---|---|
kUnderflow | |
kOverflow |
Definition at line 23 of file AliMUONSparseHisto.h.
AliMUONSparseHisto::AliMUONSparseHisto | ( | Double_t | xmin = 0.0 , |
Double_t | xmax = 4096.0 |
||
) |
ctor
Definition at line 42 of file AliMUONSparseHisto.cxx.
AliMUONSparseHisto::AliMUONSparseHisto | ( | const AliMUONSparseHisto & | rhs | ) |
copy ctor
Definition at line 56 of file AliMUONSparseHisto.cxx.
|
virtual |
dtor
Definition at line 81 of file AliMUONSparseHisto.cxx.
Bool_t AliMUONSparseHisto::Add | ( | const AliMUONSparseHisto & | h | ) |
Add h to this
Definition at line 89 of file AliMUONSparseHisto.cxx.
Referenced by AliMUONTrackerData::Add().
|
private |
Extract binCenter part from x
Definition at line 159 of file AliMUONSparseHisto.cxx.
Referenced by GetBinCenter().
|
private |
Extract binContent part from x
Definition at line 168 of file AliMUONSparseHisto.cxx.
Referenced by GetBinContent().
|
virtual |
Reset the content
Definition at line 109 of file AliMUONSparseHisto.cxx.
|
virtual |
Copy this to *object
Definition at line 119 of file AliMUONSparseHisto.cxx.
Referenced by AliMUONSparseHisto(), and operator=().
|
private |
From internal integer to "original" double
Definition at line 143 of file AliMUONSparseHisto.cxx.
Referenced by GetBinCenter().
|
private |
Convert (binCenter,binContent) into a single value
Definition at line 177 of file AliMUONSparseHisto.cxx.
Referenced by Fill().
|
private |
From original double value to internal integer
Definition at line 151 of file AliMUONSparseHisto.cxx.
Referenced by Fill().
|
private |
|
inlineprivate |
Conversion factor to go from float to int value (for bin content)
Definition at line 88 of file AliMUONSparseHisto.h.
Referenced by Copy(), DecodeValue(), and EncodeValue().
Int_t AliMUONSparseHisto::Fill | ( | Double_t | value | ) |
Fill
Definition at line 210 of file AliMUONSparseHisto.cxx.
Referenced by Add(), and AliMUONTrackerData::FillHisto().
Int_t AliMUONSparseHisto::Find | ( | Int_t | binCenter | ) | const |
Return the index in fArray of value, or -1 if not found
Definition at line 251 of file AliMUONSparseHisto.cxx.
Referenced by Fill().
|
private |
Get bin, which is a compacted form of two integers : (binCenter,binContent) where binCenter itself might be an integer-fied double value.
Definition at line 264 of file AliMUONSparseHisto.cxx.
Referenced by Copy(), GetBinCenter(), GetBinContent(), and Print().
Double_t AliMUONSparseHisto::GetBinCenter | ( | Int_t | bin | ) | const |
Get bin center
Definition at line 273 of file AliMUONSparseHisto.cxx.
Referenced by AliMUONTrackerDataHistogrammer::Add(), Find(), and Print().
Int_t AliMUONSparseHisto::GetBinContent | ( | Int_t | bin | ) | const |
Get bin content
Definition at line 286 of file AliMUONSparseHisto.cxx.
Referenced by Add(), AliMUONTrackerDataHistogrammer::Add(), Fill(), and Print().
|
inline |
Return number of bins we hold.
Definition at line 48 of file AliMUONSparseHisto.h.
Referenced by Add(), AliMUONTrackerDataHistogrammer::Add(), Copy(), Find(), GetBinCenter(), GetBinContent(), and Print().
|
inline |
Whether this histogram has overflow values (no way to know the number of underflow, though)
Definition at line 43 of file AliMUONSparseHisto.h.
Referenced by AliMUONTrackerDataHistogrammer::Add(), and Print().
|
inline |
Whether this histogram has underflow values (no way to know the number of underflow, though)
Definition at line 39 of file AliMUONSparseHisto.h.
Referenced by AliMUONTrackerDataHistogrammer::Add(), and Print().
|
inline |
Number of bits used to code the x-value of the histogram.
Definition at line 69 of file AliMUONSparseHisto.h.
Referenced by AliMUONTrackerDataHistogrammer::CreateChannelHisto().
AliMUONSparseHisto & AliMUONSparseHisto::operator= | ( | const AliMUONSparseHisto & | rhs | ) |
assignment operator
Definition at line 70 of file AliMUONSparseHisto.cxx.
|
virtual |
Printout
Definition at line 299 of file AliMUONSparseHisto.cxx.
|
inline |
Return max value of bincenter.
Definition at line 63 of file AliMUONSparseHisto.h.
|
inline |
Return min value of bincenter.
Definition at line 66 of file AliMUONSparseHisto.h.
Referenced by Add(), Copy(), DecodeValue(), EncodeValue(), and Fill().
|
private |
compacted content = (bin,value)
Definition at line 95 of file AliMUONSparseHisto.h.
Referenced by Clear(), Copy(), Expand(), Fill(), GetBin(), and ~AliMUONSparseHisto().
|
private |
to go from double to int
Definition at line 100 of file AliMUONSparseHisto.h.
|
private |
number of bins we hold
Definition at line 92 of file AliMUONSparseHisto.h.
Referenced by Clear(), Copy(), Expand(), Fill(), and GetNbins().
|
private |
max value of bincenter
Definition at line 98 of file AliMUONSparseHisto.h.
|
private |
min value of bincenter
Definition at line 97 of file AliMUONSparseHisto.h.