Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

CNSCLPhysicsBuffer Class Reference

#include <CNSCLPhysicsBuffer.h>

Inheritance diagram for CNSCLPhysicsBuffer:

CNSCLOutputBuffer List of all members.

Public Methods

 CNSCLPhysicsBuffer (unsigned nWords=4096)
 Default constructor.

 ~CNSCLPhysicsBuffer ()
 Destructor.

DAQWordBufferPtr getEventStartPtr () const
DAQWordBufferPtr StartEvent ()
void EndEvent (DAQWordBufferPtr &rPtr)
void RetractEvent (DAQWordBufferPtr &p)

Private Methods

CNSCLPhysicsBuffer & operator= (const CNSCLPhysicsBuffer &rhs)
 Assignment.

int operator== (const CNSCLPhysicsBuffer &rhs) const
 Comparison for equality.

int operator!= (const CNSCLPhysicsBuffer &rhs) const
 CNSCLPhysicsBuffer (const CNSCLPhysicsBuffer &rhs)
 Copy constructor.


Private Attributes

DAQWordBufferPtr m_EventStartPtr
 Points to start of event being built.


Detailed Description

Encapsulates the formatting of a physics buffer. Physics buffers contain While the NSCL daq system makes no requirements on the contents of an event, typically an event consists of a series of self described packets each of which contains:

Definition at line 313 of file CNSCLPhysicsBuffer.h.


Constructor & Destructor Documentation

CNSCLPhysicsBuffer::CNSCLPhysicsBuffer unsigned    nWords = 4096
 

Default constructor.

Default constructor. This is called when declarations of the form e.g.:

  • CNSCLPhysicsBuffer object; are performed.

Definition at line 291 of file CNSCLPhysicsBuffer.cpp.

References DATABF, CNSCLOutputBuffer::getBuffer(), CNSCLOutputBuffer::m_EventTag, and CNSCLOutputBuffer::SetType().

CNSCLPhysicsBuffer::~CNSCLPhysicsBuffer   [inline]
 

Destructor.

Definition at line 322 of file CNSCLPhysicsBuffer.h.

CNSCLPhysicsBuffer::CNSCLPhysicsBuffer const CNSCLPhysicsBuffer &    rhs [private]
 

Copy constructor.


Member Function Documentation

void CNSCLPhysicsBuffer::EndEvent DAQWordBufferPtr &    rPtr
 

Determines the word count from the difference between the input pointer and m_EventStartPtr. This word count is inserted in the buffer at *m_EventStartPtr and m_EventStartPtr is set to be the same as the input pointer. The entity count is incremented.

Parameters:
p  - DAQWordBufferPtr which points past the last word of the event.
Exceptions:
If  the DAQWordBufferPtr indicates that the event has overflowed the bufer a CRangeError will be thrown.

Definition at line 330 of file CNSCLPhysicsBuffer.cpp.

References CNSCLOutputBuffer::getWords(), m_EventStartPtr, and CNSCLOutputBuffer::Seek().

Referenced by CExperiment::Overflow(), and CExperiment::ReadEvent().

DAQWordBufferPtr CNSCLPhysicsBuffer::getEventStartPtr   const [inline]
 

Definition at line 333 of file CNSCLPhysicsBuffer.h.

References m_EventStartPtr.

int CNSCLPhysicsBuffer::operator!= const CNSCLPhysicsBuffer &    rhs const [private]
 

CNSCLPhysicsBuffer& CNSCLPhysicsBuffer::operator= const CNSCLPhysicsBuffer &    rhs [private]
 

Assignment.

int CNSCLPhysicsBuffer::operator== const CNSCLPhysicsBuffer &    rhs const [private]
 

Comparison for equality.

void CNSCLPhysicsBuffer::RetractEvent DAQWordBufferPtr &    p
 

Take the necessary steps to ensure that data put in the buffer for this event does not get committed to the buffer. At present this is a no-op. Since neiter the base class's buffer pointer nor the entity count get modified until EndEvent is called.

Parameters:
DAQWordBufferPtr&  p

Bug:
There is unfortunately no known way to invalidate m_EventStartPtr else we would at this point.

Definition at line 356 of file CNSCLPhysicsBuffer.cpp.

Referenced by CExperiment::Overflow().

DAQWordBufferPtr CNSCLPhysicsBuffer::StartEvent  
 

Creates a buffer pointer, reserves space for a word count and returns it to the caller.

Definition at line 306 of file CNSCLPhysicsBuffer.cpp.

References m_EventStartPtr, and CNSCLOutputBuffer::StartEntity().

Referenced by CExperiment::Overflow(), and CExperiment::ReadEvent().


Member Data Documentation

DAQWordBufferPtr CNSCLPhysicsBuffer::m_EventStartPtr [private]
 

Points to start of event being built.

Definition at line 316 of file CNSCLPhysicsBuffer.h.

Referenced by EndEvent(), getEventStartPtr(), and StartEvent().


The documentation for this class was generated from the following files:
Generated on Fri Nov 8 13:37:19 2002 for Event Readout system. by doxygen1.2.16