Previous Up Next

6  Data Output

To go into the offline data stream, "raw" data must first be packaged in a simple class derived from a RawDataBlock. This is done by making a connection to a running rotorooter6 daemon and feeding it blocks of data.

[requirement]:Output block data via connection to rotorooter.

6.1  Details of Raw Data Format

The design of the data format borrows from what already exists for DCS data and follows what is needed to send data to the rotoroooter. The way the raw data blocks will be structured is detailed here.

For each beam spill, blocks holding a header and in or out-of spill data will be sent as a contiguous record:
Header block
Data payload block

The block id (see below) should be checked to resolve whether the data block holds in or out-of spill information.

The header block contains this structure:
size in words
check sum
block id
seconds
nanosecs
spill count

Where the seconds and nanoseconds provide the time stamp needed to associate the data in the payload block with a beam spill. The spill count gives a relative enumeration of the number of callbacks (it remains to be seen if this will correlate one-to-one with the actual beam spills). For out-of-spill data, the spill count from the most recent callback is used.

The payload blocks are structured like:
size in words
check sum
block id
number of devices
ACNET name part 1
ACNET name part 2
number of values
device value 1
device value 2
device value 3
...
ACNET name part 1
ACNET name part 2
number of values
device value 1
device value 2
device value 3
...

ACNET names are 8 bytes and in the format X:YYYYYY. The ``X'' indicates node (I = Main Injector, E = NuMI line), the ``YYYYYY'' encodes device, location and a suffix indicating a property or function of the device. See MI-NOTE 0189 for some details. Except for the handron/muon montiors most devices will be scalar valued.

6.2  Block IDs

Each block (header or data) has a block ID which contains 4 values packed into a 32 bit word. The values used will be:
csf = 0 CFN = 001 S = 1 major id = 0x300 - 0x3ff minor id = version

Where ``csf'' sets the simulation flag to Data, ``CFN'' sets the dector to Near and ``S'' sets the source flag to DCS. The Major ID is described below and the minor id is used to version this schema.

The Major ID uniquely determines the semantics of the data in the block. Currently 0x300 has been allocated for beam monitoring data from ACNET. This identifier space will be broken down into:
ID Usage
0x310 Record Header
0x320 In-spill data
0x330 Out-of-spill data

Other IDs in the range 0x300 - 0x3ff are reserved for future use.


Previous Up Next