GRUTinizer
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
TRawEventByteSource Class Reference

#include <TRawEventSource.h>

Inheritance diagram for TRawEventByteSource:
TRawEventSource TRawEventFileSource TRawEventGZipSource TRawEventOnlineFileSource TRawEventPipeSource TRawEventBZipSource TRawEventRingSource

Public Member Functions

 TRawEventByteSource (kFileType file_type)
virtual std::string Status () const
kFileType GetFileType () const
long GetFileSize () const
- Public Member Functions inherited from TRawEventSource
 TRawEventSource ()
virtual ~TRawEventSource ()
int Read (TRawEvent &event)
 Reads the next event.
int Read (TRawEvent *event)
virtual std::string SourceDescription () const =0
virtual int GetLastErrno () const
virtual std::string GetLastError () const
bool IsFinished () const
size_t GetBytesGiven () const
double GetAverageRate () const

Protected Member Functions

void SetFileSize (long file_size)
- Protected Member Functions inherited from TRawEventSource
void SetLastErrno (int error)
void SetLastError (std::string error)

Private Member Functions

virtual int ReadBytes (char *buf, size_t size)=0
 Given a buffer, fill the buffer with at most size bytes.
virtual int GetEvent (TRawEvent &event)
int FillBuffer (size_t bytes_requested)
 ClassDef (TRawEventByteSource, 0)

Private Attributes

kFileType fFileType
TStopwatch clock
long fFileSize
TSmartBuffer fCurrentBuffer
size_t fDefaultBufferSize

Additional Inherited Members

- Static Public Member Functions inherited from TRawEventSource
static TRawEventSourceEventSource (const char *filename, bool is_online=false, bool is_ring=false, kFileType file_type=DefaultFileType())

Constructor & Destructor Documentation

TRawEventByteSource::TRawEventByteSource ( kFileType  file_type)

Member Function Documentation

TRawEventByteSource::ClassDef ( TRawEventByteSource  ,
 
)
private
int TRawEventByteSource::FillBuffer ( size_t  bytes_requested)
private
int TRawEventByteSource::GetEvent ( TRawEvent event)
privatevirtual
long TRawEventByteSource::GetFileSize ( ) const
inline
kFileType TRawEventByteSource::GetFileType ( ) const
inline
virtual int TRawEventByteSource::ReadBytes ( char *  buf,
size_t  size 
)
privatepure virtual

Given a buffer, fill the buffer with at most size bytes.

Parameters
bufThe buffer to be filled.
sizeThe maximum number of bytes to be read.
Returns
The number of bytes that were read. Should return zero at end of file. Should return a negative value in the case of error.

Implemented in TRawEventPipeSource, TRawEventGZipSource, TRawEventFileSource, and TRawEventOnlineFileSource.

void TRawEventByteSource::SetFileSize ( long  file_size)
inlineprotected
std::string TRawEventByteSource::Status ( ) const
virtual

Implements TRawEventSource.

Member Data Documentation

TStopwatch TRawEventByteSource::clock
mutableprivate
TSmartBuffer TRawEventByteSource::fCurrentBuffer
private
size_t TRawEventByteSource::fDefaultBufferSize
private
long TRawEventByteSource::fFileSize
private
kFileType TRawEventByteSource::fFileType
private

The documentation for this class was generated from the following files: