/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Private Member Functions
DybDaq::FileBuffer Class Reference

#include <FileBuffer.h>

Inheritance diagram for DybDaq::FileBuffer:
Inheritance graph
[legend]
Collaboration diagram for DybDaq::FileBuffer:
Collaboration graph
[legend]

List of all members.

Public Types

typedef std::pair< const char
*, unsigned int > 
OutputBuffer
typedef std::vector< OutputBufferOutputBufferList
typedef std::vector
< ByteInspector * > 
Bytes
typedef std::vector
< BitsInspector * > 
Bits

Public Member Functions

virtual ~FileBuffer ()
 Destroy this instance of the class.
const FileTraitsfileTraits () const
 Returns the FileTraits instance used to parse this object's buffer.
virtual bool isMarked (unsigned int marker) const =0
 Returns true if this object contains the specified marker.
unsigned int marker () const
 Returns the marker for this FileBuffer.
unsigned int size () const
 Returns the length of this record in 4-byte words.
virtual unsigned int bufferSize () const
 Returns the size, in 4-bytes,, of this object's contents in the buffer.
bool hasDaqTraits () const
virtual const DaqTraitsdaqTraits () const
virtual unsigned int gather (OutputBufferList &outputBuffers) const
virtual unsigned int inspect (DaqBuffer::Bytes &inspectors) const

Static Public Attributes

static const unsigned int kBytesInInt
static const unsigned int kUndefinedFormatComponent

Protected Member Functions

 FileBuffer (char *buffer, const FileTraits &traits, const unsigned int marker)
 Creates an instance of this class.
 FileBuffer (const ByteBuffer &byteBuffer, const FileTraits &traits)
 Creates an instance of this class.
void setMarker (const unsigned int marker)
 Sets the marker for this FileBuffer.
void setSize (const unsigned int size)
 Sets the size, in 4-bytes,, of this object's contents in the buffer.
const char * buffer () const
char * buffer ()
bool hasByteBuffer () const
const ByteBufferbyteBuffer () const
unsigned int fillInspectors (DaqBuffer::Bytes &inspectors, unsigned int component, unsigned int cursor) const
virtual bool readBool (const unsigned int field) const
virtual int readInt (const unsigned int field) const
virtual unsigned char readUnsignedChar (const unsigned int field) const
virtual unsigned int readUnsignedInt (const unsigned int field) const
virtual void writeField (const bool value, const unsigned int field)
virtual void writeField (const int value, const unsigned int field)
virtual void writeField (const unsigned int value, const unsigned int field)
virtual unsigned int formatComponent () const

Private Member Functions

 FileBuffer ()
 Suppress default.
 FileBuffer (FileBuffer &rhs)
 Suppress default.
FileBufferoperator= (FileBuffer &rhs)
 Suppress default.

Detailed Description

Definition at line 20 of file FileBuffer.h.


Constructor & Destructor Documentation

FileBuffer::~FileBuffer ( ) [virtual]

Destroy this instance of the class.

Definition at line 37 of file FileBuffer.cc.

                        {
}
FileBuffer::FileBuffer ( char *  buffer,
const FileTraits traits,
const unsigned int  marker 
) [protected]

Creates an instance of this class.

Definition at line 19 of file FileBuffer.cc.

                                                  :
DaqBuffer(buffer,
          traits,
          traits.recordSize(marker)) {
    setMarker(traits.marker(marker));
    setSize(traits.recordSize(marker));
}
FileBuffer::FileBuffer ( const ByteBuffer byteBuffer,
const FileTraits traits 
) [protected]

Creates an instance of this class.

Definition at line 30 of file FileBuffer.cc.

                                                 :
DaqBuffer(byteBuffer,
          traits) {
    byteBuffer.position(byteBuffer.position() + (size() * kBytesInInt));
}
DybDaq::FileBuffer::FileBuffer ( ) [private]

Suppress default.

DybDaq::FileBuffer::FileBuffer ( FileBuffer rhs) [private]

Suppress default.


Member Function Documentation

const FileTraits & FileBuffer::fileTraits ( ) const

Returns the FileTraits instance used to parse this object's buffer.

Definition at line 40 of file FileBuffer.cc.

                                               {
    return dynamic_cast<const FileTraits&>(daqTraits());
}
virtual bool DybDaq::FileBuffer::isMarked ( unsigned int  marker) const [pure virtual]
unsigned int FileBuffer::marker ( ) const

Returns the marker for this FileBuffer.

Definition at line 44 of file FileBuffer.cc.

unsigned int FileBuffer::size ( ) const

Returns the length of this record in 4-byte words.

Definition at line 48 of file FileBuffer.cc.

unsigned int FileBuffer::bufferSize ( ) const [virtual]

Returns the size, in 4-bytes,, of this object's contents in the buffer.

Implements DybDaq::DaqBuffer.

Definition at line 52 of file FileBuffer.cc.

                                          {
    return size();
}
void FileBuffer::setMarker ( const unsigned int  marker) [protected]

Sets the marker for this FileBuffer.

Definition at line 56 of file FileBuffer.cc.

void FileBuffer::setSize ( const unsigned int  size) [protected]

Sets the size, in 4-bytes,, of this object's contents in the buffer.

Definition at line 61 of file FileBuffer.cc.

FileBuffer& DybDaq::FileBuffer::operator= ( FileBuffer rhs) [private]

Suppress default.


The documentation for this class was generated from the following files:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 09:53:23 for FileReadoutFormat by doxygen 1.7.4