Defines an event column
Column () Default constructor | |
Column (const char* name) Constructor | |
Column (const std::string& name) Constructor | |
Column (const char* name, int eindex) Constructor | |
Column (const Column& col) Copy constructor | |
virtual | ~Column () Denstructor |
Column& | operator= (const Column& col) Assignment operator |
virtual Column* | Copy () const Copy the event column |
bool | IsValid () const Is valid? |
virtual bool | Get (const Event& event, Value& val) const Get column value |
virtual bool | Set (Event& event, const Value& val) Set column value |
virtual const Event* | GetEvent (const Argument& arg) const Get column event |
virtual const Event* | GetEvent (const Argument& arg, int index) const Get column event |
virtual Event* | GetEvent (Event& event) Get column event |
virtual const Event* | GetEvent (const Event& event) const Get column event |
virtual bool | Evaluate (const Argument& arg, Value& val) const Column value |
void | SetName (const char* name) Set column name |
void | SetName (const std::string& name) Set column name |
const char* | GetName () const Get column name |
void | SetIndex (int index) Set event index |
int | GetIndex () const Get event index |
void | ResetCache () const Clear cache |
An event column represents a column value of an event. The basic tag of a column is its name. The column class will look up the name in the column information list assciated with the event and extract the corresponding column value from the event data block.A column name is typically just an ASCII string. Example:
Column ("Time")will pick up the even time. A column can also specifiy an event index--denoted by index brackets--which is used in a coincidence analysis to determine which event to use. Example:Column ("Time[1]") - Column ("Time[0]")will calculate the time difference bewteen the two coincidence events.A special case are columns which are themselves events. If one want to access the amplitude of an event column with name "Event(1)", one can simply specify:
Column ("Event(1).Amplitutde")For the above case a short for exists:Column ("Amplitutde(1)")will be expanded to the same column amplitude value. The short form can be used if the name of the event column has a name of the format "Event(n)", with n an non-zero positive integer. The index 0 is reserved for the original event, i.e., "Amplitude(0)" and "Amplitue" correspond to identical columns.Even so not a likely case, it is possible to have an event with an event column which contains yet another event column with its own event. These columns can be access through:
Column ("Event(m).Event(n).Amplitutde") or Column ("Event(m).Amplitutde(n)") or Column ("Amplitutde(m,n)") or Column ("Event(m,n).Amplitutde")with m and n the event column indices of the original and the sub event, respectively. The first form is the canonical representation which is used for internal storage.If an event column of an event with non-zero index has to be accessed, they can both be specified simultanously, but the index must be specifed last. For example:
Column ("Event(1).Time[1]") Column ("Time(1)[1]")represent the time of the event stored at column "Event(1)".Column names can not contain the characters "[", "]", ".", "*" or "?". They should not contain "(", ")" unless they are of the event type and contain the string "Event". Using something like "Amplitude(1)" as a column name is confusing. In case such a name has been used, the column name specification has to be "Amplitude(1)." with a dot at the end. Using a double index in any column name is forbidden, i.e., "Amplitude(1,2)" is not allowed, nor is "Event(1,2)".
A column can also be used to access the column value of an event. If a series of events with identical column layout is processed, this is more efficient than calling the SetValue method of the event. The event SetValue method requires a string search in the column table for every access, whereas the column class uses a caching algorithm to increase performance. Example:
// Create a new coincidence event from two events represented by // i->Current(0) and i->Current(1) Column col0 ("Event(0)"); Column col1 ("Event(1)"); Column ifo ("Ifo"); // loop over events here for (; i != end; ++i) { Event ne ("Coincidence", "2"); if (ne.IsValid()) { col0.Set (ne, i->Current(0)); col1.Set (ne, i->Current(1)); ne.SetTime (i->GetTime()); Value ifo0, ifo1; ifo.Get (i->Current(0), ifo0); ifo.Get (i->Current(1), ifo1); ifo.Set (ne, ifo0 | ifo1); } }
eindex - Event index (for coincidence)
val - Column value (return)
val - New column value
Column name Returns
Amplitude current event
Amplitude(1) Event(1)
Event(2) Event(2)
Event(2).Event(1).E Event(2).Event(1)
All array indices are resolved and the last event is returned.
If the event column does not exists, NULL is returned.
index - Event index
val - Column value (return)
alphabetic index hierarchy of classes
Please send questions and comments to sigg_d@ligo-wa.caltech.edu
generated by doc++