In file PlotSet/DataDesc.hh:

class HistDataDescriptor : public BasicDataDescriptor

Object for storing plotting data for a histogram

Inheritance:


Public Methods

HistDataDescriptor ()
Default constructor.
HistDataDescriptor (double* edge, double* content, int& nbinx, char* xlabel, char* nlabel, int& nent, double* stat, bool xydata)
Constructor.
HistDataDescriptor (double* edge, double* content, double* error, int& nbinx, char* xlabel, char* nlabel, int& nent, double* stat, bool xydata)
Constructor.
virtual ~HistDataDescriptor ()
Destructor.
virtual double* GetXBinEdges () const
Get bin edge array method.
virtual double* GetBinContents () const
Get bin content array method.
virtual double* GetBinErrors () const
Get bin error array method.
virtual int GetN () const
Get number of bins method.
virtual bool SetData (double* edge, double* content, int& nbinx, const char* xlabel, const char* nlabel, int& nent, double* stat, bool xydata)
Set data method.
virtual bool SetData (double* edge, double* content, double* error, int& nbinx, const char* xlabel, const char* nlabel, int& nent, double* stat, bool xydata)
Set data method.
virtual const char* GetXLabel () const
Get X-axis label method.
virtual const char* GetNLabel () const
Get bin content axis label method.
virtual int GetNEntries () const
Get number of data entries method.
virtual double* GetStats () const
Get histogram statistics array method.
virtual bool IsXY () const
Get histogram statistics array method.

Protected Fields

bool fXYData
false: fixed bin spacing, true: variable bin spacing
double* fXBins
bin edges
double* fContents
bin contents
double* fBinErrors
bin errors
int* fN
number of bins
const char* fXLabel
x label
const char* fNLabel
y label
int* fNEntries
number of data entries
double* fStats
histogram statistics array (sumw,sumw2,sumwx,sumwx2)

Inherited from BasicDataDescriptor:

Public Methods

virtual bool IsComplex() const
virtual void SetComplex(bool cmplx)
virtual bool IsDirty() const
virtual void SetDirty(bool set = true) const
virtual bool IsPersistent() const
virtual void SetPersistent(bool set = true)
virtual bool IsCalculated() const
virtual void SetCalculated(bool set = true)
virtual bool IsMarked() const
virtual void SetMarked(bool set = true) const
virtual float GetDX() const
virtual float* GetX() const
virtual float* GetY() const
virtual float* GetEX() const
virtual float* GetEXhigh() const
virtual float* GetEY() const
virtual float* GetEYhigh() const
virtual bool EraseData()

Protected Fields

bool fComplexData
mutable bool fDirty
bool fPersistent
bool fCalculated
mutable bool fMarked

Documentation

This data descriptor implements access to histogram data owned by someone else. Only pointers to the data array are stored. The data must stay valid while this data descriptor is used by a plot routine.

bool fXYData
false: fixed bin spacing, true: variable bin spacing

double* fXBins
bin edges

double* fContents
bin contents

double* fBinErrors
bin errors

int* fN
number of bins

const char* fXLabel
x label

const char* fNLabel
y label

int* fNEntries
number of data entries

double* fStats
histogram statistics array (sumw,sumw2,sumwx,sumwx2)

HistDataDescriptor()
Constructs a histogram data descriptor without data.
Returns:
void

HistDataDescriptor(double* edge, double* content, int& nbinx, char* xlabel, char* nlabel, int& nent, double* stat, bool xydata)
Constructs a histogram data descriptor by providing pointer to the data array (w/o bin error) and parameters.
Returns:
void
Parameters:
edge - Pointer to X bin edge array
content - Pointer to bin content array
nbinx - Number of bins
xlabel - X-axis label
nlabel - bin content axis label
nent - number of data entries to the histogram
stat - Pointer to the histogram statistics array
xydata - true: variable bin spacing, false: fixed bin spacing

HistDataDescriptor(double* edge, double* content, double* error, int& nbinx, char* xlabel, char* nlabel, int& nent, double* stat, bool xydata)
Constructs a histogram data descriptor by providing pointer to the data array (w/ bin error) and parameters.
Returns:
void
Parameters:
edge - Pointer to X bin edge array
content - Pointer to bin content array
error - Pointer to bin error array
nbinx - Number of bins
xlabel - X-axis label
nlabel - bin content axis label
nent - number of data entries to the histogram
stat - Pointer to the histogram statistics array
xydata - true: variable bin spacing, false: fixed bin spacing

virtual ~HistDataDescriptor()
Destructs the histogram data descriptor.
Returns:
void

virtual double* GetXBinEdges() const
Returns a pointer to the bin edge array.
Returns:
bin edge array

virtual double* GetBinContents() const
Returns a pointer to the bin content array.
Returns:
bin content array

virtual double* GetBinErrors() const
Returns a pointer to the bin error array.
Returns:
bin error array

virtual int GetN() const
Returns the number of bins in the histogram.
Returns:
number of bins

virtual bool SetData(double* edge, double* content, int& nbinx, const char* xlabel, const char* nlabel, int& nent, double* stat, bool xydata)
Sets a new data for descriptor (w/o bin error).
Returns:
void
Parameters:
edge - Pointer to X-axis edge array
content - Pointer to content array
nbinx - number of bins
xlabel - X-axis label
nlabel - bin content axis label
nent - number of data entries to the histogram
stat - Pointet to the histogram statistics
xydata - true: variable bin spacing, false: fixed bin spacing

virtual bool SetData(double* edge, double* content, double* error, int& nbinx, const char* xlabel, const char* nlabel, int& nent, double* stat, bool xydata)
Sets a new data for descriptor (w/ bin error).
Returns:
void
Parameters:
edge - Pointer to X-axis edge array
content - Pointer to content array
error - Pointer to bin error array
nbinx - number of bins
xlabel - X-axis label
nlabel - bin content axis label
nent - number of data entries to the histogram
stat - Pointet to the histogram statistics
xydata - true: variable bin spacing, false: fixed bin spacing

virtual const char* GetXLabel() const
Get X-axis label method.
Returns:
X-axis label

virtual const char* GetNLabel() const
Get bin content axis label method.
Returns:
bin content axis label

virtual int GetNEntries() const
Returns number of data entries to the histogram.
Returns:
number of data entries

virtual double* GetStats() const
Returns a pointer to histogram statistics array.
Returns:
bin histogram statistics array

virtual bool IsXY() const
Returns type of the histogram bin spacing.
Returns:
true: variable bin spacing, false: fixed bin spacing


Direct child classes:
HistDataRef
HistDataCopy
Author:
Written July 2001 by Masahiro Ito
Version:
1.0

alphabetic index hierarchy of classes


Please send questions and comments to zweizig_j@ligo.caltech.edu


generated by doc++