In file ColumnInfo.hh:

namespace events class ColumnInfo : public ColumnType

Defines an event column

Inheritance:


Public Methods

explicit ColumnInfo (const char* name = 0, Enum type = kInvalid)
Default constructor
explicit ColumnInfo (const std::string& name, Enum type = kInvalid)
Constructor
bool operator== (const ColumnInfo& desc) const
Equality operator
bool operator!= (const ColumnInfo& desc) const
Inequality operator
bool operator< (const ColumnInfo& desc) const
Less operator
bool SetNameType (const char* name, Enum type)
Set the column name
const char* GetName () const
Get the column name
Enum GetType () const
Get the column type
std::string GetTypeName () const
Get the column type name
int GetTypeSize () const
Get the type size
int GetTypeAlignment () const
Get the alignment size
void SetColumn (int col)
Set column number
int GetColumn () const
Get column number
void SetOffset (int offset)
Set column data offset
int GetOffset () const
Get column data offset
bool IsFixed () const
Fixed column?
bool Construct (data_ptr data, const_data_ptr init = 0)
Constructs a column value
bool Destruct (data_ptr data)
Destructs a column value
bool Compare (const_data_ptr d1, const_data_ptr d2) const
Compares two column values
bool IsZero (const_data_ptr data) const
Compares column value against zero
static bool CheckName (const char* name)
Check name

Protected Methods

void Init (const char* name, Enum type)
Initializes the column information record

Documentation

Event column information. This class describes the columns of an event. This class is used the event layout. Event columns are separated between fixed and varying. Fixed columns are identical for every event, whereas varying columns are specific to the layout of the event. By default fixed columns are the event time, the event subtype and the interferometer set. A forth column describing the number of actual column allocated for the event is needed to add columns to an event layout at run-time.

The column names within an event layout have to be unique. Column names can not contain the characters "[", "]" or ".". They can not contain "(", ")" unless they are of the event type and contain the string "Event" together with a positive index.

A column information contains the following information:

    Name - The name of the column (case insensitive)
    Type - The column type, i.e., Real, Time, Int, Complex or String.
    CharSize - The maximum length of a string type
    Fixed - True if a fixed column
    Column - The column index of this column within an event layout
    Offset - The byte offset of column value within an event data block
    

explicit ColumnInfo(const char* name = 0, Enum type = kInvalid)
Creates an empty event column information record.
Parameters:
name - Column name
type - Column type

explicit ColumnInfo(const std::string& name, Enum type = kInvalid)
Creates an event column.
Parameters:
name - Column name
type - Column type

bool operator== (const ColumnInfo& desc) const
Equality operator. Compares the column names only (case-insensitive).

bool operator!= (const ColumnInfo& desc) const
Inequality operator. Compares the column names only (case-insensitive).

bool operator< (const ColumnInfo& desc) const
Less operator. Orders the columns by type and name. The type order is Complex < Time < Real < Int < String.

bool SetNameType(const char* name, Enum type)
Set the column name and type. This will reintialize the object and reset column number and offset.
Returns:
True if valid name

const char* GetName() const
Get the column name.

Enum GetType() const
Get the column type.

std::string GetTypeName() const
Get the type name of the column.

int GetTypeSize() const
Get the size of the column type (in bytes).

int GetTypeAlignment() const
Get the required alignment size of the column type (in bytes).

void SetColumn(int col)
Set the column number.

int GetColumn() const
Get the column number.

void SetOffset(int offset)
Set the column data offset.

int GetOffset() const
Get the column data offset.

bool IsFixed() const
Is this a fixed column.

bool Construct(data_ptr data, const_data_ptr init = 0)
Constructs a column value. Writes zeros for simple types and calls the constructor for complex types.
Returns:
True if successful
Parameters:
data - Pointer to event data

bool Destruct(data_ptr data)
Destructs a column value. Does does nothing for simple types and calls the Destructor for complex types.
Returns:
True if successful
Parameters:
data - Pointer to event data

bool Compare(const_data_ptr d1, const_data_ptr d2) const
Compares two column values
Returns:
True if equal
Parameters:
d1 - Pointer to first column data
d2 - Pointer to second column data

bool IsZero(const_data_ptr data) const
Compares column value against zero
Returns:
True if zero
Parameters:
data - Pointer to event data

static bool CheckName(const char* name)
Check if a valid column name is specified.
Returns:
True if valid
Parameters:
name - Column name

void Init(const char* name, Enum type)
Initializes the column information record
Parameters:
name - Column name
type - Column type


This class has no child classes.
Author:
Written June 2001 by Masahiro Ito and Daniel Sigg
Version:
1.0

alphabetic index hierarchy of classes


Please send questions and comments to sigg_d@ligo-wa.caltech.edu


generated by doc++