StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | List of all members
TxLogging::StRecord Class Reference

#include <StRecord.h>

Inheritance diagram for TxLogging::StRecord:
TxLogging::StUcmEvent TxLogging::StUcmJob TxLogging::StUcmEvents TxLogging::StUcmJobs TxLogging::StUcmTask TxLogging::StUcmTasks

Public Member Functions

 StRecord (const TxLogging::FieldList &fields)
 
 StRecord (const StRecord &)
 
const StRecordoperator= (const StRecord &)
 Copy constructor.
 
virtual ~StRecord ()
 Assignment. More...
 
const char * toString () const
 Deconstructor. More...
 
StDbFieldIgetField (const char *name) const
 
StDbFieldIgetField (unsigned int col) const
 
void removeField (const char *name)
 
void removeField (int col)
 
TxLogging::FieldListgetFields ()
 
const TxLogging::FieldListgetFields () const
 
void printHeader () const
 
void print () const
 
TxLogging::RecordListgetRecords ()
 
const TxLogging::RecordListgetRecords () const
 

Detailed Description

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.

Constructor & Destructor Documentation

StRecord::StRecord ( const TxLogging::FieldList fields)

Constructor: Creates a record from the provided vector of fields.

Parameters
fieldsThe vector containing fields to set as the field list.
Exceptions
StDataExceptionIf 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.

StRecord::~StRecord ( )
virtual

Assignment.

Destructor: Deletes sublist.

Definition at line 66 of file StRecord.cxx.

Member Function Documentation

StDbFieldI * StRecord::getField ( const char *  name) const

Returns the field from the sublist with the given name, or NULL if none is found.

Parameters
nameThe 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.

Parameters
colThe 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?

Parameters
nameThe 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.

Parameters
colThe 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.


The documentation for this class was generated from the following files: