Sometimes the best way to figure out what's going on, or going wrong, is to just look at the data. The dumper application can produce formatted dumps of ring buffer (online) and file event data.
dumper provides for a certain amount of item filtering, as well as the ability to skip items, and to dump only a specific number of items. Full documentation for the dumper command line is available on the dumper reference page.
Data sou4rces, specified by the --source
option
are URL's using the file or tcp
protocols. tcp URL's specify ring buffers, while
file protocols specify event files.
Example 19-1. Dumping data from the ring buffer named 0400x on spdaq22
dumper --source=tcp://spdaq22.nscl.msu.edu/0400x
Example 19-2. Dumping data from the event file segment /user/0400x/complete/run-1234-00.evt
dumper --source=file:///user/0400x/complete/run-1234-00.evt
If the data source is not provided, the ring buffer that a Readout program running on the local system would write data to is used. This equates to the URL: tcp://localhost/username where username is the name of the account you are running under.
Each of the item types is formatted in a way that makes it relatively easy to understand the data it contains. This section runs through each of the item types that are defined and gives a sample dump of an item of that type. The sample dumps are taken from a test data set used to test the software.
Example 19-3. State Transition items
----------------------------------------------------------- Thu Jul 10 07:50:43 2008 : Run State change : Begin Run at 0 seconds into the run Title : This is a test run 1234 RunNumber: 1234
We can see from the example above, state change items include a timetsamp which shows when the state change occured. The formatted output indicates this particular state change item flagged the beginning of a run. As such, the elapsed run time shown was zero seconds. An end run or pause/resume run would generally have a non zero elapsed run time. The run title and run number are also provided.
Example 19-4. Text List items
----------------------------------------------------------- Thu Jul 10 07:50:43 2008 : Documentation item Packet types: 0 seconds in to the run String number 0 String number 1 String number 2 String number 3 String number 4
Text list items normally provide documentation. Therefore, after the timestamp, the dump indicates this is a documentation item. The item type is shown to be a Packet Type definition. This was emitted just following the begin run, and therefore was at an elapsed time of zero seconds. The lines that follow the first are the strings in the item, one per line. Since this was test data, the strings shown are not actually of the form that a packet type item would contain.
Example 19-5. Incremental Scalers dump
----------------------------------------------------------- Thu Jul 10 07:50:43 2008 : Incremental scalers: Interval start time: 0 end: 10 seconds in to the run Index Counts Rate 0 0 0.00 1 32 3.20 2 64 6.40 3 96 9.60 4 128 12.80 5 160 16.00 ...
Incrementall scalers provide two header lines. The first contains the timestamp and item type which is Incremental scalers. The second line describes the interval of elapsed time into the run represented by the scaler counts. Followig the headerl lines, the scalers in the item are listed, one per line. Each line contains the scaler number, the number of counts over the interval, and the rate at which the scaler counted over that interval.
Example 19-6. Event count items
----------------------------------------------------------- Thu Jul 10 07:50:43 2008 : 100 Triggers accepted as of 10 seconds into the run Average accepted trigger rate: 10 events/second
Periodically trigger count items are emitted. These allow programs that sample physics events to determine the fraction of the data they have processed. They also allow the computation of the average event rate.
Ttrigger count items include a timestamp, the total number of accepted triggers, the time offset, and the average accepted trigger rate.
Example 19-7. Physics Event items
----------------------------------------------------------- Event 158 bytes long 0000 0001 0002 0003 0004 0005 0006 0007 0008 0009 000a 000b 000c 000d 000e 000f 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 001a 001b 001c 001d 001e 001f 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 002a 002b 002c 002d 002e 002f 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 003a 003b 003c 003d 003e 003f 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 004a 004b 004c 004d 004e
Physics event items contain the data acquired in response to a trigger. At present, these items are dumped as shown above. Following the number of bytes in the event is a word by word dump of the words in the event.
Example 19-8. Unknown item types
----------------------------------------------------------- Unknown item type: 1234 Body size : 256 Body: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f 60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f 70 71 72 73 74 75 76 77 78 79 7a 7b 7c 7d 7e 7f 80 81 82 83 84 85 86 87 88 89 8a 8b 8c 8d 8e 8f 90 91 92 93 94 95 96 97 98 99 9a 9b 9c 9d 9e 9f a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 aa ab ac ad ae af b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 ba bb bc bd be bf c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 ca cb cc cd ce cf d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 da db dc dd de df e0 e1 e2 e3 e4 e5 e6 e7 e8 e9 ea eb ec ed ee ef f0 f1 f2 f3 f4 f5 f6 f7 f8 f9 fa fb fc fd fe ff
User applications can create and insert item types of any sort. The previous example provides a dump of a hypothetical item of type 1234. The body of the dump is simply a bytewise dump of the data