In file Event.hh:

namespace events class Event : public ColumnType

Defines an event

Inheritance:


Public Methods

Event ()
Default constructor
explicit Event (const Time& time)
Constructor
explicit Event (const Layout& layout)
Constructor
explicit Event (const Type& type)
Constructor
explicit Event (const char* name)
Constructor
explicit Event (const std::string& name)
Constructor
Event (const Event& event)
Copy constructor
~Event ()
Destructor
Event& operator= (const Event& event)
Assignment operator
bool IsValid () const
Valid event?
Event* Copy () const
Copy the event
bool operator== (const Event& event) const
Equality operator
bool operator!= (const Event& event) const
Inequality operator
bool operator< (const Event& event) const
Default sort order
bool operator> (const Event& event) const
Inverse sort order
const Layout& GetLayout () const
Get the event layout
bool Update ()
Update the event
void Swap (Event& e)
Swap an event
Name GetName () const
Gets the event time
void SetName (const Name& name)
Sets the event time
Time GetTime () const
Gets the event time
void SetTime (const Time& time)
Sets the event time
ColumnType::ColumnIfo_t GetIfo () const
Gets the ifo set
void SetIfo (const ColumnType::ColumnIfo_t& ifo)
Sets the event ifo set
std::string GetIfoStr () const
Gets the ifo set
void SetIfoStr (const char* ifo)
Sets the event ifo set
bool GetValue (const char* name, Value& val) const
Gets the column value of an event
bool SetValue (const char* name, const Value& val)
Sets the column value of an event
data_ptr GetData ()
Get the data pointer
const data_ptr GetData () const
Get the data pointer
void Dump (std::ostream& os, int indent = 0) const
Dump Event data to the specified output stream
void Dump (int indent = 0) const
Dump Event data to the specified output stream
void DumpColumn (const char* name, std::ostream& os) const
Dump column data to the specified output stream
void DumpColumn (const char* name) const
Dump column data to the specified output stream
static const Event& Default ()
Get default event

Protected Methods

bool Init (const Layout& layout, const_data_ptr init = 0)
Initialize event
void Destroy ()
Destroy event

Documentation

An event is characterized by a type, a time stamp and a set of parameters. This is the basic container to store a simple event.

Event()
Creates an empty event.

explicit Event(const Time& time)
Creates an event which consists of minimum number of rows: type = "simple", type subid = 0, ifoset = "" and the specified time.

explicit Event(const Layout& layout)
Creates an event using a specified layout. The layout must be registered!

explicit Event(const Type& type)
Creates an event using a specified type. The type must correspond to a registerd layout.

explicit Event(const char* name)
Creates an event using a specified type name. The type must exist and correspond to a registerd layout.

explicit Event(const std::string& name)
Creates an event using a specified type name. The type must exist and correspond to a registerd layout.

Event(const Event& event)
Copy constructor

~Event()
Destroys an event.

Event& operator= (const Event& event)
Assignment operator

bool IsValid() const
Is a valid event? A valid event must have a registered layout.

Event* Copy() const
Returns a copy of the event. This method must be overriden by all descendents.
Returns:
event copy

bool operator== (const Event& event) const
Equality operator. Compares the layout and the full data.

bool operator!= (const Event& event) const
Inequality operator. Compares the layout and the full data.

bool operator< (const Event& event) const
Default sort order (by time).

bool operator> (const Event& event) const
Inverse sort order (by time).

const Layout& GetLayout() const
Get the event layout

bool Update()
Updates the event, if columns have been added. Fills additonal columns with default values.

void Swap(Event& e)
Swap a event with the current

Name GetName() const
Returns the name of the event

void SetName(const Name& name)
Sets the time of the event

Time GetTime() const
Returns the time of the event

void SetTime(const Time& time)
Sets the time of the event

ColumnType::ColumnIfo_t GetIfo() const
Returns the ifo set of the event

void SetIfo(const ColumnType::ColumnIfo_t& ifo)
Sets the ifo set of the event

std::string GetIfoStr() const
Returns the ifo set string of the event

void SetIfoStr(const char* ifo)
Sets the ifo set of the event

bool GetValue(const char* name, Value& val) const
Returns the data value of the specified column

bool SetValue(const char* name, const Value& val)
Sets the data value of the specified column

data_ptr GetData()
Get the data pointer

const data_ptr GetData() const
Get the data pointer

void Dump(std::ostream& os, int indent = 0) const
Dump Event data to the specified output stream
Parameters:
os - output stream
indent - indent level (number of tabs)

void Dump(int indent = 0) const
Dump Event data to the specified output stream
Parameters:
indent - indent level (number of tabs)

void DumpColumn(const char* name, std::ostream& os) const
Dump column data to the specified output stream
Parameters:
name - column name
os - output stream

void DumpColumn(const char* name) const
Dump column data to the specified output stream
Parameters:
name - column name

static const Event& Default()
Gets a pointer to a default event

bool Init(const Layout& layout, const_data_ptr init = 0)
Initialize event

void Destroy()
Destroy method.


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