Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

SIO::LCSIO Class Reference

#include <LCSIO.h>

List of all members.

Static Public Member Functions

void checkVersion (int versionID)
unsigned int read (SIO_stream *stream, char **c)
unsigned int write (SIO_stream *stream, int i)
unsigned int write (SIO_stream *stream, unsigned int i)
unsigned int write (SIO_stream *stream, EVENT::long64 i)
unsigned int write (SIO_stream *stream, float f)
unsigned int write (SIO_stream *stream, const std::string &s)
std::string getValidSIOName (const std::string &aName)

Static Public Attributes

const char * RUNRECORDNAME = "LCRunHeader"
const char * RUNBLOCKNAME = "RunHeader"
const char * EVENTRECORDNAME = "LCEvent"
const char * EVENTBLOCKNAME = "Event"
const char * HEADERRECORDNAME = "LCEventHeader"
const char * HEADERBLOCKNAME = "EventHeader"
const char * FILE_EXTENSION = ".slcio"
const bool COMPRESSION = true

Static Private Attributes

char * dummy = new char[ LCSIO::dummy_initial_size ]
int dummy_size = LCSIO::dummy_initial_size
const int dummy_initial_size = 1024


Detailed Description

Collection of static helper functions for reading and writing data with SIO. Could go to the SIO_functions class. Also defines some constant names for lcio-SIO.

Author:
gaede
Version:
Mar 6, 2003

Definition at line 24 of file LCSIO.h.


Member Function Documentation

void SIO::LCSIO::checkVersion int  versionID  )  [static]
 

Checks the version of the file - oldefile (version < v00-08) are no longer supported

Definition at line 25 of file LCSIO.cc.

References SIO_VERSION_MAJOR, and SIO_VERSION_MINOR.

std::string SIO::LCSIO::getValidSIOName const std::string &  aName  )  [static]
 

Creates a valid SIO name (basically equivalent to a valid C++ name) by replacing every [.], [\] and [/] with underscores and removing all nonalphanumeric characters and adding an 'A' to the beginning, if necessary.

Definition at line 157 of file LCSIO.cc.

unsigned int SIO::LCSIO::read SIO_stream stream,
char **  c
[static]
 

Read a string from the stream into a dummy buffer. Warning the same buffer is used for each call. So the return value needs to be copied to its final memory destination.

Definition at line 62 of file LCSIO.cc.

References SIO_functions::data(), dummy, and dummy_size.

unsigned int SIO::LCSIO::write SIO_stream stream,
const std::string &  s
[static]
 

Write a string to the stream. Writes the length of the string first and adds '' to the end.

Definition at line 125 of file LCSIO.cc.

References SIO_functions::data().

unsigned int SIO::LCSIO::write SIO_stream stream,
float  f
[static]
 

Write a float to the stream.

Definition at line 118 of file LCSIO.cc.

References SIO_functions::data().

unsigned int SIO::LCSIO::write SIO_stream stream,
EVENT::long64  i
[static]
 

Write a 64bit integer to the stream

Definition at line 111 of file LCSIO.cc.

References SIO_functions::data(), and EVENT::long64.

unsigned int SIO::LCSIO::write SIO_stream stream,
unsigned int  i
[static]
 

Write an unsigned int to the stream.

Definition at line 94 of file LCSIO.cc.

References SIO_functions::data().

unsigned int SIO::LCSIO::write SIO_stream stream,
int  i
[static]
 

Write an int to the stream.

Definition at line 88 of file LCSIO.cc.

References SIO_functions::data().


Member Data Documentation

const bool SIO::LCSIO::COMPRESSION = true [static]
 

the compression mode for SIO

Definition at line 39 of file LCSIO.h.

char * SIO::LCSIO::dummy = new char[ LCSIO::dummy_initial_size ] [static, private]
 

Definition at line 13 of file LCSIO.cc.

Referenced by read().

const int SIO::LCSIO::dummy_initial_size = 1024 [static, private]
 

Definition at line 98 of file LCSIO.h.

int SIO::LCSIO::dummy_size = LCSIO::dummy_initial_size [static, private]
 

Definition at line 12 of file LCSIO.cc.

Referenced by read().

const char * SIO::LCSIO::EVENTBLOCKNAME = "Event" [static]
 

Definition at line 18 of file LCSIO.cc.

const char * SIO::LCSIO::EVENTRECORDNAME = "LCEvent" [static]
 

Definition at line 17 of file LCSIO.cc.

const char * SIO::LCSIO::FILE_EXTENSION = ".slcio" [static]
 

Definition at line 22 of file LCSIO.cc.

const char * SIO::LCSIO::HEADERBLOCKNAME = "EventHeader" [static]
 

Definition at line 20 of file LCSIO.cc.

const char * SIO::LCSIO::HEADERRECORDNAME = "LCEventHeader" [static]
 

Definition at line 19 of file LCSIO.cc.

const char * SIO::LCSIO::RUNBLOCKNAME = "RunHeader" [static]
 

Definition at line 16 of file LCSIO.cc.

const char * SIO::LCSIO::RUNRECORDNAME = "LCRunHeader" [static]
 

Definition at line 15 of file LCSIO.cc.


The documentation for this class was generated from the following files:
Generated on Sun Jun 3 06:32:32 2007 for A TPC Tracking Environment by  doxygen 1.3.9.1