StRoot
1
|
#include <StRecord.h>
Public Member Functions | |
StRecord (const TxLogging::FieldList &fields) | |
StRecord (const StRecord &) | |
const StRecord & | operator= (const StRecord &) |
Copy constructor. | |
virtual | ~StRecord () |
Assignment. More... | |
const char * | toString () const |
Deconstructor. More... | |
StDbFieldI * | getField (const char *name) const |
StDbFieldI * | getField (unsigned int col) const |
void | removeField (const char *name) |
void | removeField (int col) |
TxLogging::FieldList & | getFields () |
const TxLogging::FieldList & | getFields () const |
void | printHeader () const |
void | print () const |
TxLogging::RecordList & | getRecords () |
const TxLogging::RecordList & | getRecords () const |
Abstraction for records in memory. TODO: Is the key information necessary for records as well as collections?
Definition at line 46 of file StRecord.h.
StRecord::StRecord | ( | const TxLogging::FieldList & | fields | ) |
Constructor: Creates a record from the provided vector of fields.
fields | The vector containing fields to set as the field list. |
StDataException | If the length of the vector is zero. |
Definition at line 49 of file StRecord.cxx.
StRecord::StRecord | ( | const StRecord & | r | ) |
Copying mechanisms. Copy constructor and operator= rely on the copy() method.
Definition at line 61 of file StRecord.cxx.
|
virtual |
StDbFieldI * StRecord::getField | ( | const char * | name | ) | const |
Returns the field from the sublist with the given name, or NULL if none is found.
name | The name of the field to retrieve. |
Definition at line 129 of file StRecord.cxx.
StDbFieldI * StRecord::getField | ( | unsigned int | col | ) | const |
Returns the field from the sublist which is in the given column. Column indexing begins at 1. Returns NULL if the column number is out of bounds.
col | The column number. |
Definition at line 142 of file StRecord.cxx.
FieldList & StRecord::getFields | ( | ) |
Returns the complete list of stored fields.
Definition at line 124 of file StRecord.cxx.
RecordList & StRecord::getRecords | ( | ) |
Returns the complete list of child records
Definition at line 153 of file StRecord.cxx.
void StRecord::removeField | ( | const char * | name | ) |
Removes the specified field from the record. This deletes the pointer, so any lists retrieved from BEFORE this operation should be considered UNSAFE. This is provided as a convenient way to remove unwanted field information when constructing patterns. TODO: Maybe make a TxPattern class which represents patterns?
name | The name of the field to delete. |
Definition at line 158 of file StRecord.cxx.
void StRecord::removeField | ( | int | col | ) |
Removes the specified field from the record. This deletes the pointer, so any lists retrieved from BEFORE this operation should be considered UNSAFE.
col | The column to delete. |
Definition at line 171 of file StRecord.cxx.
const char * StRecord::toString | ( | ) | const |
Deconstructor.
Returns a string representing the record. Primarily useful for debugging purposes.
Definition at line 105 of file StRecord.cxx.