bufdump - A utility for dumping NSCL event buffers | ||
---|---|---|
Prev | Chapter 2. Introduction to bufdump concepts | Next |
The NSCL Data acquisition system must often incorporate data from several supported devices into a single event. In order to allow the maintainers of these devices to independently build and maintain data acquisition and analysis software for their devices, the NSCL has adopted a self describing format for the body of an event that allows code to recognize the sections of an event it is responsible for and ignore sections of the event it does not know about.
The core of this self describing structure is the packet structure. A packet is a segment of an event that is created by a logical part of the readout program and can be analyzed independently by an event processor registered in SpecTcl. The format of a packet is shown below:
Word | Contents |
---|---|
Size | Self inclusive packet word count |
Id | Describes what packet contains |
Body | Body - 2 words of packet data |
The id of a packet identifies what the packet
body contains (e.g. data from the Segmented Germanium Array SeGA).
Daniel Bazin <bazin@nscl.msu.edu>
maintains
a registry of these ids. If you want to allocate a new id
for a device you are constructing, contact him. The current
id registry is available online at at
the NSCL user information website where they are
referred to as tags
As far as bufdump is concerned, the significance of this packet structure is that if it knows the packet id assignments, it can represent the body of each event as a series of packets. This representation can identify by name the packets in each event.
Bufdump uses three mechanisms to learn about the packet id assignments:
A system wide packet definition file describes the packet id assignments known at the time the program is distributed. This file is automatically read in by bufdump when it starts.
If an event file was written using the
production readout skeleton, and the author(s)
of the readout program used the
CDocumentedPacket
class to
manage the production of their event packets,
the event file will contain additional documentation
buffers which describe the packets used. If bufdump
encounters one of these, in addition to formatting the
buffer, it adds any packet definitions that are not
already known to its internal database of packet
types.
User written packet definition files can be manually read in by the program. The format of these files is described in Chapter 6: Extending bufdump . How to read them in is described in Chapter 3: The File menu .