#include <XMLUtils.h>
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 | |
StorageWrap & | in |
unsigned int | pos |
Definition at line 166 of file XMLUtils.h.
Definition at line 169 of file XMLUtils.h.
lhef::StorageInputStream::StorageInputStream | ( | StorageWrap & | in | ) |
Definition at line 205 of file XMLUtils.cc.
lhef::StorageInputStream::~StorageInputStream | ( | ) | [virtual] |
Definition at line 210 of file XMLUtils.cc.
{ }
virtual unsigned int lhef::StorageInputStream::curPos | ( | ) | const [inline, virtual] |
unsigned int lhef::StorageInputStream::readBytes | ( | XMLByte *const | buf, |
const unsigned int | size | ||
) | [virtual] |
Definition at line 214 of file XMLUtils.cc.
References Storage::CURRENT, in, pos, and SiPixelLorentzAngle_cfi::read.
{ void *rawBuf = reinterpret_cast<void*>(buf); unsigned int bytes = size * sizeof(XMLByte); unsigned int readBytes = in->read(rawBuf, bytes); unsigned int read = (unsigned int)(readBytes / sizeof(XMLByte)); unsigned int rest = (unsigned int)(readBytes % sizeof(XMLByte)); if (rest) in->position(-(IOOffset)rest, Storage::CURRENT); pos += read; return read; }
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().