In file ColumnType.hh:

struct ColumnType

Defines the event column types

enum Enum
Column value type (enum value is column order!) Update Value when changing
kInvalid
Inavlid
kComplex
Complex double (128 bit)
kTime
Time (stored as (uint,uint))
kReal
Double (64 bit)
kInt
Int (32 bit)
kString
String (stored as char[])
kEvent
Event
static const int kNum
Number of supported types
typedef void* data_ptr
Pointer to generic data type
typedef const void* const_data_ptr
Const pointer to generic data type
typedef int Int
Integer type
typedef double Real
Floating point type
typedef std::complex <double> Complex
Complex type
typedef ::Time Time
Time type
typedef std::string String
String type (within an event a string is stored as a char[])
typedef events::Event Event
Event type
typedef Int ColumnNumber_t
Column number type
typedef Int ColumnName_t
Column event sub ID type
typedef Time ColumnTime_t
Column time type
typedef Int ColumnIfo_t
Column ifo set type
struct Common_t
Structure for common fixed columns
ColumnNumber_t mColumns
Column number
ColumnName_t mName
Event subtype
ColumnTime_t mTime
Event time
ColumnIfo_t mIfo
Interferometer set
static const char* const kColumnNumberName
Column name of event column number
static const char* const kColumnNameName
Column name of event subtype id
static const char* const kColumnTimeName
Column name of event time
static const char* const kColumnIfoName
Column name of event interferometer set
static inline data_ptr Address(data_ptr p, int ofs)
Calculates the address of a column value
static inline const_data_ptr Address(const_data_ptr p, int ofs)
Calculates the address of a column value
static std::string TypeName(Enum type)
Get the type name
static int TypeSize(Enum type)
Get the type size
static int AlignmentSize(Enum type)
Get the alignment size
static bool ConstructValue(Enum type, data_ptr data, const_data_ptr init = 0)
Constructs a column value
static bool DestructValue(Enum type, data_ptr data)
Destructs a column value
static bool CopyValue(Enum type, data_ptr d1, const_data_ptr d2)
Copy column value
static bool CompareValue(Enum type, const_data_ptr d1, const_data_ptr d2)
Compares two column values
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.

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

kInvalid
Inavlid

kComplex
Complex double (128 bit)

kTime
Time (stored as (uint,uint))

kReal
Double (64 bit)

kInt
Int (32 bit)

kString
String (stored as char[])

kEvent
Event

static const int kNum
Number of supported types

typedef void* data_ptr
Pointer to generic data type

typedef const void* const_data_ptr
Const pointer to generic data type

typedef int Int
Integer type

typedef double Real
Floating point type

typedef std::complex <double> Complex
Complex type

typedef ::Time Time
Time type

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

typedef events::Event Event
Event type

typedef Int ColumnNumber_t
Column number type

typedef Int ColumnName_t
Column event sub ID type

typedef Time ColumnTime_t
Column time type

typedef Int ColumnIfo_t
Column ifo set type

struct Common_t
Structure for common fixed columns

ColumnNumber_t mColumns
Column number

ColumnName_t mName
Event subtype

ColumnTime_t mTime
Event time

ColumnIfo_t mIfo
Interferometer set

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

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

static const char* const kColumnTimeName
Column name of event time

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

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

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

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

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

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

static 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.
Returns:
True if successful
Parameters:
type - Value type
data - Pointer to column data
init - Initialization object if non zero

static bool DestructValue(Enum type, 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:
type - Value type
data - Pointer to column data

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

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

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

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++