#include <lXDR.hh>

Definition at line 31 of file lXDR.hh.
Public Member Functions | |
| lXDR (const char *filename=0, bool open_for_write=false) | |
| virtual | ~lXDR () |
| void | setFileName (const char *filename, bool open_for_write=false) |
| const char * | getFileName (void) const |
| long | getError (void) const |
| long | readLong (void) |
| double | readFloat (void) |
| double | readDouble (void) |
| const char * | readString (long &length) |
| long * | readLongArray (long &length) |
| double * | readFloatArray (long &length) |
| double * | readDoubleArray (long &length) |
| long | writeLong (long data) |
| long | writeDouble (double data) |
| long | writeString (const char *data) |
| long | writeString (const char *data, long length) |
| long | writeLongArray (const long *data, long length) |
| long | writeDoubleArray (const double *data, long length) |
| void | setError (long error) |
| long | filePosition (long pos=-1) |
Static Public Member Functions | |
| static int | getMajor (void) |
| static int | getMinor (void) |
| static const char * | getText (void) |
Private Types | |
| enum | { MAJOR = 1, MINOR = 0, DAY = 23, MONTH = 10, YEAR = 2003 } |
Private Member Functions | |
| lXDR (const lXDR &) | |
| lXDR & | operator= (const lXDR &) |
| double | ntohd (double d) const |
| double | htond (double d) const |
| long | checkRead (long *) |
| long | checkRead (float *) |
| long | checkRead (double *) |
| long | checkWrite (long *) |
| long | checkWrite (double *) |
Private Attributes | |
| char * | _fileName |
| FILE * | _fp |
| long | _error |
| bool | _openForWrite |
| bool | _hasNetworkOrder |
anonymous enum [private] |
| lXDR::lXDR | ( | const char * | filename = 0, |
|
| bool | open_for_write = false | |||
| ) |
| lXDR::lXDR | ( | const lXDR & | ) | [private] |
| static int lXDR::getMajor | ( | void | ) | [inline, static] |
| static int lXDR::getMinor | ( | void | ) | [inline, static] |
| static const char* lXDR::getText | ( | void | ) | [inline, static] |
| void lXDR::setFileName | ( | const char * | filename, | |
| bool | open_for_write = false | |||
| ) |
Definition at line 46 of file lXDR.cc.
References _error, _fileName, _fp, _openForWrite, LXDR_OPENFAILURE, and LXDR_SUCCESS.
Referenced by lXDR().
| const char* lXDR::getFileName | ( | void | ) | const [inline] |
| long lXDR::getError | ( | void | ) | const [inline] |
Definition at line 75 of file lXDR.hh.
References _error.
Referenced by lStdHep::getEvent(), lStdHep::more(), slic::StdHepLoader::openStdHepFile(), lStdHep::Event::read(), lStdHep::EventTable::read(), lStdHep::readEvent(), lStdHep::readFileHeader(), and slic::StdHepLoader::readNextEvent().
| long lXDR::readLong | ( | void | ) |
Definition at line 141 of file lXDR.cc.
References checkRead().
Referenced by lStdHep::Event::read(), lStdHep::EventTable::read(), and lStdHep::readFileHeader().
| double lXDR::readFloat | ( | void | ) |
Definition at line 155 of file lXDR.cc.
References checkRead().
Referenced by lStdHep::Event::read().
| double lXDR::readDouble | ( | void | ) |
Definition at line 148 of file lXDR.cc.
References checkRead().
Referenced by lStdHep::Event::read().
| const char * lXDR::readString | ( | long & | length | ) |
Definition at line 162 of file lXDR.cc.
References _error, _fp, checkRead(), LXDR_READERROR, and LXDR_SUCCESS.
Referenced by lStdHep::Event::read(), lStdHep::EventTable::read(), and lStdHep::readFileHeader().
| long * lXDR::readLongArray | ( | long & | length | ) |
Definition at line 177 of file lXDR.cc.
References _error, _fp, _hasNetworkOrder, checkRead(), LXDR_READERROR, and LXDR_SUCCESS.
Referenced by lStdHep::Event::read(), lStdHep::EventTable::read(), and lStdHep::readFileHeader().
| double * lXDR::readFloatArray | ( | long & | length | ) |
Definition at line 205 of file lXDR.cc.
References _error, _fp, _hasNetworkOrder, checkRead(), LXDR_READERROR, and LXDR_SUCCESS.
| double * lXDR::readDoubleArray | ( | long & | length | ) |
Definition at line 191 of file lXDR.cc.
References _error, _fp, _hasNetworkOrder, checkRead(), LXDR_READERROR, LXDR_SUCCESS, and ntohd().
Referenced by lStdHep::Event::read().
| long lXDR::writeLong | ( | long | data | ) |
| long lXDR::writeDouble | ( | double | data | ) |
| long lXDR::writeString | ( | const char * | data, | |
| long | length | |||
| ) |
Definition at line 262 of file lXDR.cc.
References _error, _fp, checkWrite(), LXDR_SUCCESS, and LXDR_WRITEERROR.
| long lXDR::writeLongArray | ( | const long * | data, | |
| long | length | |||
| ) |
Definition at line 271 of file lXDR.cc.
References _error, _fp, _hasNetworkOrder, checkWrite(), LXDR_SUCCESS, and LXDR_WRITEERROR.
| long lXDR::writeDoubleArray | ( | const double * | data, | |
| long | length | |||
| ) |
Definition at line 285 of file lXDR.cc.
References _error, _fp, _hasNetworkOrder, checkWrite(), htond(), LXDR_SUCCESS, and LXDR_WRITEERROR.
| void lXDR::setError | ( | long | error | ) | [inline] |
Definition at line 113 of file lXDR.hh.
References _error.
Referenced by lStdHep::lStdHep(), lStdHep::Event::read(), lStdHep::EventTable::read(), lStdHep::readEvent(), and lStdHep::readFileHeader().
| long lXDR::filePosition | ( | long | pos = -1 |
) |
Definition at line 300 of file lXDR.cc.
References _error, _fp, LXDR_NOFILE, and LXDR_SEEKERROR.
Referenced by lStdHep::readEvent().
| double lXDR::ntohd | ( | double | d | ) | const [private] |
Definition at line 84 of file lXDR.cc.
References _hasNetworkOrder.
Referenced by checkRead(), htond(), and readDoubleArray().
| double lXDR::htond | ( | double | d | ) | const [inline, private] |
Definition at line 127 of file lXDR.hh.
References ntohd().
Referenced by checkWrite(), and writeDoubleArray().
| long lXDR::checkRead | ( | long * | l | ) | [private] |
Definition at line 107 of file lXDR.cc.
References _error, _fp, _openForWrite, LXDR_NOFILE, LXDR_READERROR, LXDR_READONLY, and LXDR_SUCCESS.
Referenced by readDouble(), readDoubleArray(), readFloat(), readFloatArray(), readLong(), readLongArray(), and readString().
| long lXDR::checkRead | ( | float * | f | ) | [private] |
Definition at line 130 of file lXDR.cc.
References _error, _fp, _openForWrite, LXDR_NOFILE, LXDR_READERROR, LXDR_READONLY, and LXDR_SUCCESS.
| long lXDR::checkRead | ( | double * | d | ) | [private] |
Definition at line 119 of file lXDR.cc.
References _error, _fp, _openForWrite, LXDR_NOFILE, LXDR_READERROR, LXDR_READONLY, LXDR_SUCCESS, and ntohd().
| long lXDR::checkWrite | ( | long * | l | ) | [private] |
Definition at line 225 of file lXDR.cc.
References _error, _fp, _openForWrite, LXDR_NOFILE, LXDR_SUCCESS, LXDR_WRITEERROR, and LXDR_WRITEONLY.
Referenced by writeDouble(), writeDoubleArray(), writeLong(), writeLongArray(), and writeString().
| long lXDR::checkWrite | ( | double * | d | ) | [private] |
Definition at line 236 of file lXDR.cc.
References _error, _fp, _openForWrite, htond(), LXDR_NOFILE, LXDR_SUCCESS, LXDR_WRITEERROR, and LXDR_WRITEONLY.
char* lXDR::_fileName [private] |
FILE* lXDR::_fp [private] |
Definition at line 121 of file lXDR.hh.
Referenced by checkRead(), checkWrite(), filePosition(), readDoubleArray(), readFloatArray(), readLongArray(), readString(), setFileName(), writeDoubleArray(), writeLongArray(), writeString(), and ~lXDR().
long lXDR::_error [private] |
Definition at line 122 of file lXDR.hh.
Referenced by checkRead(), checkWrite(), filePosition(), getError(), readDoubleArray(), readFloatArray(), readLongArray(), readString(), setError(), setFileName(), writeDoubleArray(), writeLongArray(), and writeString().
bool lXDR::_openForWrite [private] |
bool lXDR::_hasNetworkOrder [private] |
Definition at line 125 of file lXDR.hh.
Referenced by lXDR(), ntohd(), readDoubleArray(), readFloatArray(), readLongArray(), writeDoubleArray(), and writeLongArray().
1.5.4