SIO::LCSIO Class Reference

Collection of static helper functions for reading and writing data with SIO. More...

#include <SIO/LCSIO.h>

List of all members.

Static Public Member Functions

static SIORecordsrecords ()
static void checkVersion (int versionID)
 Checks the version of the file - oldefile (version < v00-08) are no longer supported.
static unsigned int read (SIO_stream *stream, char **c, int *len=0)
 Read a string from the stream into a dummy buffer.
static unsigned int write (SIO_stream *stream, int i)
 This version checks the versionId to be able to read 'old' files with trailing '' (version <= 00-02).
static unsigned int write (SIO_stream *stream, unsigned int i)
 Write an unsigned int to the stream.
static unsigned int write (SIO_stream *stream, EVENT::long64 i)
 Write a vector size to the stream (needed for AMD64 architectures).
static unsigned int write (SIO_stream *stream, float f)
 Write a float to the stream.
static unsigned int write (SIO_stream *stream, const std::string &s)
 Write a string to the stream.
static std::string getValidSIOName (const std::string &aName)
 Creates a valid SIO name (basically equivalent to a valid C++ name) by replacing every [.
static void seekStream (SIO_stream *stream, EVENT::long64 pos)
 Seek stream to the given absolute position - if pos<0 from end of file.

Static Public Attributes

static const char * FILE_EXTENSION = ".slcio"
static const bool COMPRESSION = true
 the compression mode for SIO

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

Member Function Documentation

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.

Referenced by SIO::SIOWriter::open(), and SIO::SIOReader::open().

unsigned int SIO::LCSIO::read ( SIO_stream *  stream,
char **  c,
int *  len = 0 
) [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. len holds the length of the string (can contain '').

static void SIO::LCSIO::seekStream ( SIO_stream *  stream,
EVENT::long64  pos 
) [static]
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.

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

Write a vector size to the stream (needed for AMD64 architectures).

Write a 64bit integer to the stream

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

This version checks the versionId to be able to read 'old' files with trailing '' (version <= 00-02).

Remove this method after a reasonable transition period... Write an int to the stream.


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Friends

Generated on 6 Mar 2020 for LCIO by  doxygen 1.6.1