DataColumn Class Reference

#include <DataColumn.h>

Collaboration diagram for DataColumn:

Collaboration graph
[legend]

List of all members.


Detailed Description

A class to hold data and its attributes.

Author:
Paul F. Kunz <Paul_Kunz@slac.stanford.edu>

Definition at line 31 of file DataColumn.h.


Public Types

enum  Type {
  Double, Float, Int, UInt,
  ULong64
}

Public Member Functions

void clear ()
 Clears the data array.
 DataColumn ()
 The default constructor.
double * doubleArrayAt (unsigned int row)
 Returns pointer to the sub-array at row row.
const std::vector
< double > & 
getData () const
 Returns the data.
std::vector< double > & getData ()
 Returns the data.
unsigned int getRank () const
 Gives the dimensionality of the data stored in each row of this branch.
const std::vector
< intptr_t > & 
getShape ()
 Vector of the number of entries in the multidimensional data.
void setShape (const std::vector< intptr_t > &shape)
 Sets the shape of the data column.
std::size_t size () const
 Returns the size of the column.
 ~DataColumn ()
 The destructor.

Private Member Functions

 DataColumn (const DataColumn &)
 The copy constructor not usable.

Private Attributes

std::vector< double > m_double_data
 The data.
std::vector< intptr_t > m_shape
 In case the data quantity we are dealing with is a vector/matrix store its dimensions of each axis in this vector.
Type m_type
 The type for this column.

Member Enumeration Documentation

enum Type

Enumerator:
Double  double type.
Float  float type.
Int  int type.
UInt  unsigned int type.
ULong64  unsigned 64 bit long.

Definition at line 35 of file DataColumn.h.


Constructor & Destructor Documentation

DataColumn ( const DataColumn  )  [private]

The copy constructor not usable.

DataColumn (  ) 

The default constructor.

Definition at line 19 of file DataColumn.cxx.

~DataColumn (  ) 

The destructor.

Definition at line 24 of file DataColumn.cxx.


Member Function Documentation

void clear (  ) 

Clears the data array.

Definition at line 80 of file DataColumn.cxx.

References DataColumn::m_double_data.

Referenced by FitsNTuple::clear().

double * doubleArrayAt ( unsigned int  row  ) 

Returns pointer to the sub-array at row row.

Definition at line 87 of file DataColumn.cxx.

References DataColumn::m_double_data, DataColumn::m_shape, num_util::rank(), and DataColumn::size().

const std::vector< double > & getData (  )  const

Returns the data.

Definition at line 37 of file DataColumn.cxx.

References DataColumn::m_double_data.

std::vector< double > & getData (  ) 

Returns the data.

Definition at line 30 of file DataColumn.cxx.

References DataColumn::m_double_data.

unsigned int getRank (  )  const

Gives the dimensionality of the data stored in each row of this branch.

A scalar entry in each row means we're dealing with rank 0 data, A Vector entry in each row means we're dealing with rank 1 data, A Matrix entry in each row means we're dealing with rank 2 data, so on and so forth.

Definition at line 44 of file DataColumn.cxx.

References DataColumn::m_shape, and DataColumn::size().

const std::vector< intptr_t > & getShape (  ) 

Vector of the number of entries in the multidimensional data.

Note:
Chose vector of int to be compatible num_util.

Definition at line 53 of file DataColumn.cxx.

References DataColumn::m_shape.

void setShape ( const std::vector< intptr_t > &  shape  ) 

Sets the shape of the data column.

Note:
Chose vector of int to be compatible num_util.

Definition at line 60 of file DataColumn.cxx.

References DataColumn::m_shape.

std::size_t size (  )  const

Returns the size of the column.

Returns the total size of the column. If the column contains an array object, then the size is the product of its dimensions, otherwise it is the number of elements.

Definition at line 67 of file DataColumn.cxx.

References DataColumn::m_shape, and num_util::rank().

Referenced by DataColumn::doubleArrayAt(), and DataColumn::getRank().


Member Data Documentation

std::vector< double > m_double_data [private]

The data.

Requests:
Support data types other than double.

Definition at line 48 of file DataColumn.h.

Referenced by DataColumn::clear(), DataColumn::doubleArrayAt(), and DataColumn::getData().

std::vector< intptr_t > m_shape [private]

In case the data quantity we are dealing with is a vector/matrix store its dimensions of each axis in this vector.

Definition at line 53 of file DataColumn.h.

Referenced by DataColumn::doubleArrayAt(), DataColumn::getRank(), DataColumn::getShape(), DataColumn::setShape(), and DataColumn::size().

Type m_type [private]

The type for this column.

Definition at line 57 of file DataColumn.h.


The documentation for this class was generated from the following files:
Generated for HippoDraw Class Library by doxygen