CMS 3D CMS Logo

lhef::StorageInputStream Class Reference

#include <GeneratorInterface/LHEInterface/src/XMLUtils.h>

List of all members.

Public Types

typedef StorageWrap Stream_t

Public Member Functions

virtual unsigned int curPos () const
virtual unsigned int readBytes (XMLByte *const buf, const unsigned int size)
 StorageInputStream (StorageWrap &in)
virtual ~StorageInputStream ()

Private Attributes

StorageWrapin
unsigned int pos


Detailed Description

Definition at line 166 of file XMLUtils.h.


Member Typedef Documentation

typedef StorageWrap lhef::StorageInputStream::Stream_t

Definition at line 169 of file XMLUtils.h.


Constructor & Destructor Documentation

lhef::StorageInputStream::StorageInputStream ( StorageWrap in  ) 

Definition at line 204 of file XMLUtils.cc.

00204                                                       :
00205         in(in)
00206 {
00207 }

lhef::StorageInputStream::~StorageInputStream (  )  [virtual]

Definition at line 209 of file XMLUtils.cc.

00210 {
00211 }


Member Function Documentation

virtual unsigned int lhef::StorageInputStream::curPos (  )  const [inline, virtual]

Definition at line 174 of file XMLUtils.h.

References pos.

00174 { return pos; }

unsigned int lhef::StorageInputStream::readBytes ( XMLByte *const   buf,
const unsigned int  size 
) [virtual]

Definition at line 213 of file XMLUtils.cc.

References Storage::CURRENT, in, int, pos, and SiStripLorentzAngle_cfi::read.

00215 {
00216         void *rawBuf = reinterpret_cast<void*>(buf);
00217         unsigned int bytes = size * sizeof(XMLByte);
00218         unsigned int readBytes = in->read(rawBuf, bytes);
00219 
00220         unsigned int read = (unsigned int)(readBytes / sizeof(XMLByte));
00221         unsigned int rest = (unsigned int)(readBytes % sizeof(XMLByte));
00222         if (rest)
00223                 in->position(-(IOOffset)rest, Storage::CURRENT);
00224 
00225         pos += read;
00226         return read;
00227 }


Member Data Documentation

StorageWrap& lhef::StorageInputStream::in [private]

Definition at line 180 of file XMLUtils.h.

Referenced by readBytes().

unsigned int lhef::StorageInputStream::pos [private]

Definition at line 181 of file XMLUtils.h.

Referenced by curPos(), and readBytes().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:48:53 2009 for CMSSW by  doxygen 1.5.4