#include <CNSCLJumbBufferDecoder> class CNSCLJumboBufferDecoder : public CBufferDecoder { public: CNSCLJumboBufferDecoder(); virtual ~CNSCLJumboBufferDecoder() ; virtual const Address_t getBody(); virtual UInt_t getBodySize(); virtual UInt_t getRun(); virtual UInt_t getEntityCount(); virtual UInt_t getSequenceNo(); virtual UInt_t getLamCount(); virtual UInt_t getPatternCount(); virtual UInt_t getBufferType(); virtual void getByteOrder(Short_t& Signature16, Int_t& Signature32); virtual std::string getTitle(); virtual void operator()(UInt_t nBytes, Address_t pBuffer, CAnalyzer& rAnalyzer);
This decoder is a special version of the
CNSCLBufferDecoderr
class. An unused
header words is repurposed to hold the top bits of a 32 bit buffer
size. Furthermore; events in physics buffers have a 32 bit event
size as their header. This allows both for buffers bigger than
64Kwords and for events larger than 64Kwords.
The motivation for this type of buffer was a series of experiments that used a waveform capture device capable of delivering events much larger than 64Kwords of data.
CNSCLJumboBufferDecoder();
Constructor for objects of this class.
virtual const Address_t getBody();
Operates the same as for CNSCLBufferDecoder
;
returns a pointer tot he first byte after the 32 byte
header.
virtual UInt_t getBodySize();
Returns the number of bytes used in the buffer.
The jumbo buffer format holds the low
16 bit of the used buffer size (words) in the first
element of the buffer header. A previously unused
word in the buffer (nwdsHigh
)
is used to hold the top 16 bits of the used buffer size.
The decoder combines these to form a 32 bit value and subtracts the size of the buffer header from that to get the final size.
virtual UInt_t getRun();
As with CNSCLBufferDecoder
, returns
the run number from the buffer header.
virtual UInt_t getEntityCount();
As with CNSCLBufferDecoder
,
returns the number of entities in the buffer.
virtual UInt_t getSequenceNo();
As with CNSCLBufferDecoder
,
returns the sequence number of the last buffer.
virtual UInt_t getLamCount();
As for CNSCLBufferDecoder
,
returns the lam count from the buffer header.
This is deprecated as LAM register counts have not
been part of typical NSCL events for decades.
virtual UInt_t getPatternCount();
As with CNSCLBufferDecoder
,
returns the pattern register count from the
buffer header. This is deprecated as most
events, these days, don't actually have any pattern
registers, thanks to the ability of digitizers
to auto-zero suppress.
virtual UInt_t getBufferType();
Returns the type of data in the buffer.
virtual void getByteOrder( Short_t& Signature16, Int_t& Signature32);
As with CNSCLBufferDecoder
,
returns the byte order signatures in
Signature16
and
Signature32
.
virtual std::string getTitle();
Returns title from the most recent run state transition buffer.
virtual void operator()( UInt_t nBytes, Address_t pBuffer, CAnalyzer& rAnalyzer);
Called for each block of data received from the data
source. This is a fixed block sized buffer decoder
so the value of nBytes
should
always be the same within a run.