In file ColumnType.hh:

struct ColumnType

Defines the event column types

[more]enum Enum
Column value type (enum value is column order!) Update Value when changing
[more]static const int kNum
Number of supported types
[more]typedef void* data_ptr
Pointer to generic data type
[more]typedef const void* const_data_ptr
Const pointer to generic data type
[more]typedef int Int
Integer type
[more]typedef double Real
Floating point type
[more]typedef std::complex<double> Complex
Complex type
[more]typedef Time type: :Time Time
[more]typedef std::string String
String type (within an event a string is stored as a char[])
[more]typedef events::Event Event
Event type
[more]typedef Int ColumnNumber_t
Column number type
[more]typedef Int ColumnName_t
Column event sub ID type
[more]typedef Time ColumnTime_t
Column time type
[more]typedef Int ColumnIfo_t
Column ifo set type
[more]struct Common_t
Structure for common fixed columns
[more]static const char* const kColumnNumberName
Column name of event column number
[more]static const char* const kColumnNameName
Column name of event subtype id
[more]static const char* const kColumnTimeName
Column name of event time
[more]static const char* const kColumnIfoName
Column name of event interferometer set
[more]static inline data_ptr Address(data_ptr p, int ofs)
Calculates the address of a column value
[more]static inline const_data_ptr Address(const_data_ptr p, int ofs)
Calculates the address of a column value
[more]static std::string TypeName(Enum type)
Get the type name
[more]static int TypeSize(Enum type)
Get the type size
[more]static int AlignmentSize(Enum type)
Get the alignment size
[more]static bool ConstructValue(Enum type, data_ptr data, const_data_ptr init = 0)
Constructs a column value
[more]static bool DestructValue(Enum type, data_ptr data)
Destructs a column value
[more]static bool CopyValue(Enum type, data_ptr d1, const_data_ptr d2)
Copy column value
[more]static bool CompareValue(Enum type, const_data_ptr d1, const_data_ptr d2)
Compares two column values
[more]static bool IsZeroValue(Enum type, const_data_ptr data)
Compares column value against zero


Documentation

Event column types. This class describes the supported column types. Currently the following types are supported:
    Time - GPS time in sec and nsec (2 x unsigned 32 bit integer)
    Real - A double precision floating point value
    Complex - A double precision complex floating point value
    Int - A 32 bit signed integer value
    String - A null terminated character array
    Event - Useful for composite events such as coincidences
    
In the current implementation only simple types which don't have virtual methods and don't contain pointers are suppored. This is due to the fact that when an event is created no constructors are called but rather the whole data block is initialized with zeros. Upon creation of a new event data block the only non-zero element is the number of columns.

oenum Enum
Column value type (enum value is column order!) Update Value when changing

o kInvalid
Inavlid

o kComplex
Complex double (128 bit)

o kTime
Time (stored as (uint,uint))

o kReal
Double (64 bit)

o kInt
Int (32 bit)

o kString
String (stored as char[])

o kEvent
Event

ostatic const int kNum
Number of supported types

otypedef void* data_ptr
Pointer to generic data type

otypedef const void* const_data_ptr
Const pointer to generic data type

otypedef int Int
Integer type

otypedef double Real
Floating point type

otypedef std::complex<double> Complex
Complex type

otypedef Time type: :Time Time
Time type

otypedef std::string String
String type (within an event a string is stored as a char[])

otypedef events::Event Event
Event type

otypedef Int ColumnNumber_t
Column number type

otypedef Int ColumnName_t
Column event sub ID type

otypedef Time ColumnTime_t
Column time type

otypedef Int ColumnIfo_t
Column ifo set type

ostruct Common_t
Structure for common fixed columns

oColumnNumber_t mColumns
Column number

oColumnName_t mName
Event subtype

oColumnTime_t mTime
Event time

oColumnIfo_t mIfo
Interferometer set

ostatic const char* const kColumnNumberName
Column name of event column number

ostatic const char* const kColumnNameName
Column name of event subtype id

ostatic const char* const kColumnTimeName
Column name of event time

ostatic const char* const kColumnIfoName
Column name of event interferometer set

ostatic inline data_ptr Address(data_ptr p, int ofs)
Calculates the address of a column value

ostatic inline const_data_ptr Address(const_data_ptr p, int ofs)
Calculates the address of a column value

ostatic std::string TypeName(Enum type)
Get the name of the column type.
Parameters:
type - Value type
Returns:
Type name

ostatic int TypeSize(Enum type)
Get the size of the column type (in bytes).
Parameters:
type - Value type
Returns:
Type size

ostatic int AlignmentSize(Enum type)
Get the required alignment size of the column type (in bytes).
Parameters:
type - Value type
Returns:
Alignment size

ostatic bool ConstructValue(Enum type, data_ptr data, const_data_ptr init = 0)
Constructs a column value. If no initialization object is specified, writes zeros for simple types and calls the constructor for complex types. If an initialization object is specified, copies the mmeory region for simple types and calls the copt constructor for complex types.
Parameters:
type - Value type
data - Pointer to column data
init - Initialization object if non zero
Returns:
True if successful

ostatic bool DestructValue(Enum type, data_ptr data)
Destructs a column value. Does does nothing for simple types and calls the Destructor for complex types.

Parameters:
type - Value type
data - Pointer to column data
Returns:
True if successful

ostatic bool CopyValue(Enum type, data_ptr d1, const_data_ptr d2)
Copies a value form destinmation to source.
Parameters:
type - Value type
d1 - Destination
d2 - Source
Returns:
True if successful

ostatic bool CompareValue(Enum type, const_data_ptr d1, const_data_ptr d2)
Compares two column values.
Parameters:
type - Value type
d1 - Pointer to first column data
d2 - Pointer to second column data
Returns:
True if equal

ostatic bool IsZeroValue(Enum type, const_data_ptr data)
Compares column value against zero.
Parameters:
type - Value type
data - Pointer to event data
Returns:
True if zero

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