Difference between revisions of "Reading CODA data"

From New IAC Wiki
Jump to navigation Jump to search
Line 33: Line 33:
 
=Go Events=
 
=Go Events=
 
=Bank Names=
 
=Bank Names=
 +
 +
 +
In the CODA readout list (gen_int_list.crl)  I will write a 4 letter string with the name of the bank via the command
 +
 +
    *rol->dabufp++ = *((unsigned long*)"SCLR");
 +
 +
You can see it in the raw CODA data file using
 +
 +
od -c v260_sclr.dat | less
 +
0000000  \0      \0  \0  \0  \0  \0  \0  \b  \0  \0  \0  \b  \0  \0  \0
 +
0000020 243 001  \0  \0 002  \0  \0  \0  '  \0  \0  \0  \0 001 332 300
 +
0000040 004  \0  \0  \0 314 001 021  \0 377 347  0  G  x  \0  \0  \0
 +
0000060 001  \0  \0  \0 004  \0  \0  \0 314 001 022  \0 004 350  0  G
 +
0000100  \0  \0  \0  \0  \0  \0  \0  \0  \n  \0  \0  \0 314 020 001  \0
 +
0000120 004  \0  \0  \0  \0 001  \0 300 001  \0  \0  \0 001  \0  \0  \0
 +
0000140  \0  \0  \0  \0 003  \0  \0  \0 001 001 002  \0  R  L  C  S
 +
0000160  \0  \0  \0  \0  \n  \0  \0  \0 314 020 001  \0 004  \0  \0  \0
 +
 +
 +
It appears in reverse order at the end of line 140.
  
 
=References=
 
=References=

Revision as of 00:09, 7 November 2007

Event Stucture

The CODA event structure is to write "Banks" which are in the form headers containing 2 long words (32 x 2 = 64 bits)

Below is an example of a hex dump of a CODA file

hex dump

Using the unix command "od -h filename" on a coda data file I saw

0000000 2000 0000 0000 0000 0008 0000 0008 0000
0000020 01a3 0000 0002 0000 0027 0000 0100 c0da
0000040 0004 0000 01cc 0011 e7ff 4730 0078 0000
0000060 0001 0000 0004 0000 01cc 0012 e804 4730
0000100 0000 0000 0000 0000 000a 0000 10cc 0001
0000120 0004 0000 0100 c000 0001 0000 0001 0000
0000140 0000 0000 0003 0000 0101 0002 4c52 5343
0000160 0000 0000 000a 0000 10cc 0001 0004 0000
0000200 0100 c000 0002 0000 0001 0000 0000 0000
0000220 0003 0000 0102 0002 4c52 5343 0000 0000
0000240 000a 0000 10cc 0001 0004 0000 0100 c000
0000260 0003 0000 0001 0000 0000 0000 0003 0000
0000300 0103 0002 4c52 5343 0000 0000 000a 0000
0000320 10cc 0001 0004 0000 0100 c000 0004 0000
0000340 0001 0000 0000 0000 0003 0000 0104 0002
0000360 4c52 5343 0000 0000 000a 0000 10cc 0001

Perhaps the most obvious hex is the value "c0da" at the end of line 20.

The first 32 bits of the file is the part of the Bank header which tells you what the length of the fragment is in long words.

2000 [math]\Rightarrow[/math] 2 long words : 2000 hex = 00 02 = 2 binary

Go Events

Bank Names

In the CODA readout list (gen_int_list.crl) I will write a 4 letter string with the name of the bank via the command

   *rol->dabufp++ = *((unsigned long*)"SCLR"); 

You can see it in the raw CODA data file using

od -c v260_sclr.dat | less
0000000  \0      \0  \0  \0  \0  \0  \0  \b  \0  \0  \0  \b  \0  \0  \0
0000020 243 001  \0  \0 002  \0  \0  \0   '  \0  \0  \0  \0 001 332 300
0000040 004  \0  \0  \0 314 001 021  \0 377 347   0   G   x  \0  \0  \0
0000060 001  \0  \0  \0 004  \0  \0  \0 314 001 022  \0 004 350   0   G
0000100  \0  \0  \0  \0  \0  \0  \0  \0  \n  \0  \0  \0 314 020 001  \0
0000120 004  \0  \0  \0  \0 001  \0 300 001  \0  \0  \0 001  \0  \0  \0
0000140  \0  \0  \0  \0 003  \0  \0  \0 001 001 002  \0   R   L   C   S
0000160  \0  \0  \0  \0  \n  \0  \0  \0 314 020 001  \0 004  \0  \0  \0


It appears in reverse order at the end of line 140.

References

File:Coda 1.4 manual.pdf

Return to DAQ