In file ColumnInfo.hh:

class ColumnInfo

Defines an event column

Inheritance:


Public Methods

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

Protected Methods

[more]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
    

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

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

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

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

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

obool 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

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

oEnum GetType() const
Get the column type.

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

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

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

ovoid SetColumn(int col)
Set the column number.

oint GetColumn() const
Get the column number.

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

oint GetOffset() const
Get the column data offset.

obool IsFixed() const
Is this a fixed column.

obool 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.
Parameters:
data - Pointer to event data
Returns:
True if successful

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

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

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

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

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


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

Alphabetic index HTML hierarchy of classes or Java


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