In file PlotSet/DataDesc.hh:

class DataRefCount : public DataDescriptor

Object for storing referenced plotting data

Inheritance:


Public Methods

DataRefCount ()
Default constructor.
DataRefCount (float* dat, int n, int m = 1, bool cmplx = false)
Constructor.
DataRefCount (float x0, float dx, float* dat, int n, int m = 1, bool cmplx = false)
Constructor.
virtual ~DataRefCount ()
Destructor.
virtual int GetM () const
Get M method.
virtual void AddRef ()
Add reference.
virtual void RemoveRef ()
Add reference.
virtual float* GetY () const
Get Y method.
virtual float* GetY (int i) const
Get Y method.

Protected Fields

int fRefCount
Reference count
int fNN
Number of rows
int fM
Number of columns

Inherited from DataDescriptor:

Public Methods

virtual bool SetData(float* x, float* y, int& n, bool cmplx = false)
virtual bool SetData(float x0, float dx, float* y, int& n, bool cmplx = false)
virtual bool IsXY() const
virtual float GetDX() const
virtual int GetN() const
virtual int& GetNRef() const
virtual float* GetX() const

Protected Fields

bool fXYData
float fdX
float fX0
float* fX
float* fY
int* fN

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* GetEX() const
virtual float* GetEXhigh() const
virtual float* GetEY() const
virtual float* GetEYhigh() const
virtual bool EraseData()
virtual double* GetXBinEdges() const
virtual double* GetBinContents() const
virtual double* GetBinErrors() const
virtual const char* GetXLabel() const
virtual const char* GetNLabel() const
virtual int GetNEntries() const
virtual double* GetStats() const

Protected Fields

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

Documentation

This data descriptor stores a data matrix---either m x n or (m + 1) x n (x-axis incluced). In general it is accessed through a DataRef descriptor. The supplied data matrix is adopted by the descriptor. It also keeps a reference count. Other data descriptors can refere to the data of this descriptor by increasing the ref count and They have to decrease the ref count when they no longer use the data. When the refernce count reaches zero, the object will automatically delete itslef. Since this object destructs itself it MUST NEVER be defined as a static object.

int fRefCount
Reference count

int fNN
Number of rows

int fM
Number of columns

DataRefCount()
Constructs a data descriptor without data.
Returns:
void

DataRefCount(float* dat, int n, int m = 1, bool cmplx = false)
Constructs a data descriptor by providing pointers to an (m+1) x n matrix. The data is adopted by the object. The first row must be the x array.
Returns:
void
Parameters:
data - Pointer to (m+1) x n matrix
n - Reference to array length
m - Number of Y arrays
cmplx - true if data is complex

DataRefCount(float x0, float dx, float* dat, int n, int m = 1, bool cmplx = false)
Constructs a data descriptor by providing a start and delta for the x data, a pointer to a m x n matrix and the array length. The data is adopted by the object.
Returns:
void
Parameters:
x0 - First X value
dx - X array spacing
y - Pointer to Y array
n - Reference to array length
cmplx - true if data is complex

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

virtual int GetM() const
Get the number of M dimensions (number of y arrays contained by this object).
Returns:
M

virtual void AddRef()
Add a reference. This will increase the reference count.
Returns:
void

virtual void RemoveRef()
Delete a reference. This will decrease the reference count. The object is deleted if the reference count reaches zero.
Returns:
void

virtual float* GetY() const
Returns a pointer to the Y data array with index 0.
Returns:
Y array

virtual float* GetY(int i) const
Returns a pointer to the Y data array with index i.
Returns:
Y array


This class has no child classes.
Author:
Written November 1999 by Daniel Sigg
Version:
1.0

alphabetic index hierarchy of classes


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


generated by doc++