TWR Raw Data Reader


1. Introduction
This program written by Wolfgang Wagner provides an example to read the TWR Raw Data. This is just a template program, not providing any graphical output such as histogram.  So it will be good for TWR development work.  Currently this program is reading the raw data and printing some debugging message.  Normally we make our own root program based on this example to produced histogram.

2. Where we should modify for our task
If you are able to read c-language, everything will be understood easilly.  The following is the main part of this program.
core part of the rawdata reader
The event pointer "event_prt" is filled after calling read_event() function at position I.  In other words, necessary waveforms are available after position I. If you want to access a waveform for a specific OM number, first you have to check whether the OM has waveform in the event or not (position II.). In the position III, we see that the blow_waveform() function collects the waveform fragments produced by the feature extraction function on TWR DSP program.  As a result of the blow_waveform(), the wf[] array is  filled by the waveform. We can read all digits of the waveform  by looking  wf[] array (position IV.).  Because real access to the waveform is done at the position IV,  it is right place to be modified for your task.  However somehow looping contents of array wf[] is wasting the resource. If you want to get more efficient way, you may need to modify blow_waveform() as well.

3. Installation and usage
A tarbal is available here. For compile, please try  a command like "gcc read_raw.c -o read_raw".
The usage is just "read_raw [data_file]". A detailed documentation will come soon.

4. Further Information
please send email to me jwnam @hep.ps.uci.edu or Wolfgang Wagner  wagner @uni-wuppertal.de

Jiwoo  Nam Feb 24 2003