/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 | Private Attributes
DybDaq::DataSeparatorRecord Class Reference

#include <DataSeparatorRecord.h>

Inheritance diagram for DybDaq::DataSeparatorRecord:
Inheritance graph
[legend]
Collaboration diagram for DybDaq::DataSeparatorRecord:
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

 DataSeparatorRecord (const EventReadout &block, unsigned int blockNumber, const FileTraits &traits)
 Creates an instance of this class.
 DataSeparatorRecord (const ByteBuffer &byteBuffer, const FileTraits &traits)
 Creates an instance of this class.
virtual ~DataSeparatorRecord ()
 Destroys this instance of the class.
virtual bool isMarked (unsigned int marker) const
 Returns true if this object contains the specified marker.
const EventReadoutblock () const
 Returns the data block for this object.
const EventReadoutextractBlock () const
 Returns the data block for this object and releases the memeory management to the caller.
unsigned int blockNumber () const
 Returns the number of thefollowing data block within the file.
unsigned int blockLength () const
 Returns the size of the following data block in bytes.
void setBlock (const EventReadout *block)
 Sets the data block for this object.
virtual unsigned int gather (OutputBufferList &outputBuffers) const
 Adds to the supplied line the OutputBuffers that contain the DAQ format of this objects content returning the total number of bytes in the added buffers.
const FileTraitsfileTraits () const
 Returns the FileTraits instance used to parse this object's buffer.
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 inspect (DaqBuffer::Bytes &inspectors) const

Static Public Attributes

static const unsigned int kBytesInInt
static const unsigned int kUndefinedFormatComponent

Protected Member Functions

virtual unsigned int formatComponent () const
 Returns the component with the format of this buffer.
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)

Private Member Functions

 DataSeparatorRecord ()
 Suppress default.
 DataSeparatorRecord (DataSeparatorRecord &rhs)
 Suppress default.
DataSeparatorRecordoperator= (DataSeparatorRecord &rhs)
 Suppress default.
void setBlockNumber (unsigned int blockNumber)
 Sets the number of thefollowing data block within the file.
void setBlockLength (unsigned int blockLength)
 Sets the size of the following data block in bytes.

Private Attributes

const EventReadoutm_block
 The data block for this object.
bool m_owner
 True if this object is the owner of the m_block.

Detailed Description

Definition at line 22 of file DataSeparatorRecord.h.


Constructor & Destructor Documentation

DataSeparatorRecord::DataSeparatorRecord ( const EventReadout block,
unsigned int  blockNumber,
const FileTraits traits 
)

Creates an instance of this class.

Definition at line 22 of file DataSeparatorRecord.cc.

DataSeparatorRecord::DataSeparatorRecord ( const ByteBuffer byteBuffer,
const FileTraits traits 
)

Creates an instance of this class.

Definition at line 34 of file DataSeparatorRecord.cc.

                                                                   :
FileBuffer(byteBuffer,
           traits),
m_block(0),
m_owner(true) {
}
DataSeparatorRecord::~DataSeparatorRecord ( ) [virtual]

Destroys this instance of the class.

Definition at line 42 of file DataSeparatorRecord.cc.

                                          {
    if (m_owner && (0 != m_block)) {
        delete m_block;
    }
}
DybDaq::DataSeparatorRecord::DataSeparatorRecord ( ) [private]

Suppress default.

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

Suppress default.


Member Function Documentation

bool DataSeparatorRecord::isMarked ( unsigned int  marker) const [virtual]

Returns true if this object contains the specified marker.

Implements DybDaq::FileBuffer.

Definition at line 48 of file DataSeparatorRecord.cc.

const EventReadout & DataSeparatorRecord::block ( ) const

Returns the data block for this object.

Definition at line 52 of file DataSeparatorRecord.cc.

                                                     {
    return *m_block;
}
const EventReadout * DataSeparatorRecord::extractBlock ( ) const

Returns the data block for this object and releases the memeory management to the caller.

Definition at line 56 of file DataSeparatorRecord.cc.

                                                            {
    m_owner = false;
    return m_block;
}
unsigned int DataSeparatorRecord::blockNumber ( ) const

Returns the number of thefollowing data block within the file.

Definition at line 61 of file DataSeparatorRecord.cc.

unsigned int DataSeparatorRecord::blockLength ( ) const

Returns the size of the following data block in bytes.

Definition at line 65 of file DataSeparatorRecord.cc.

void DataSeparatorRecord::setBlock ( const EventReadout block)

Sets the data block for this object.

Definition at line 73 of file DataSeparatorRecord.cc.

                                                            {
    if (m_owner && (0 != m_block)) {
        delete m_block;
    }
    m_owner = true;
    m_block = block;
}
unsigned int DataSeparatorRecord::gather ( OutputBufferList outputBuffers) const [virtual]

Adds to the supplied line the OutputBuffers that contain the DAQ format of this objects content returning the total number of bytes in the added buffers.

Reimplemented from DybDaq::DaqBuffer.

Definition at line 81 of file DataSeparatorRecord.cc.

                                                                              {
    unsigned int result = bufferSize() * kBytesInInt;
    outputBuffers.push_back(OutputBuffer(buffer(),
                                         result));

    result += m_block->gather(outputBuffers);
    return result;
}
unsigned int DataSeparatorRecord::formatComponent ( ) const [protected, virtual]

Returns the component with the format of this buffer.

Reimplemented from DybDaq::DaqBuffer.

Definition at line 69 of file DataSeparatorRecord.cc.

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

Suppress default.

void DataSeparatorRecord::setBlockNumber ( unsigned int  blockNumber) [private]

Sets the number of thefollowing data block within the file.

Definition at line 90 of file DataSeparatorRecord.cc.

void DataSeparatorRecord::setBlockLength ( unsigned int  blockLength) [private]

Sets the size of the following data block in bytes.

Definition at line 95 of file DataSeparatorRecord.cc.

const FileTraits & FileBuffer::fileTraits ( ) const [inherited]

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());
}
unsigned int FileBuffer::marker ( ) const [inherited]

Returns the marker for this FileBuffer.

Definition at line 44 of file FileBuffer.cc.

unsigned int FileBuffer::size ( ) const [inherited]

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

Definition at line 48 of file FileBuffer.cc.

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

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, inherited]

Sets the marker for this FileBuffer.

Definition at line 56 of file FileBuffer.cc.

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

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

Definition at line 61 of file FileBuffer.cc.


Member Data Documentation

The data block for this object.

Definition at line 117 of file DataSeparatorRecord.h.

bool DybDaq::DataSeparatorRecord::m_owner [mutable, private]

True if this object is the owner of the m_block.

Definition at line 122 of file DataSeparatorRecord.h.


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