'readev2' Program Introduction

For creating γ-γ coincidence matrices, we read in the event files (ex. run001.ev2, run002.ev2) and store the data into a two dimension matrix. Each entry of an ev2 file (binary file) has the data length as:
[char n] (char a1, short b1) (char a2, short b2) ...(char an, short bn)... [char n].

The 'n' is the number of pairs of (a,b). 'a' for ADC number (indicating which detector.) and 'b' is for Channel number ( related to energy but need to be calibrated.). We sometimes want to check the source data, and the 'readev2' program provides various functionality to let you check the ev2 data.



Run the code:

I have installed the program at the polar and nucgam server. The path is '/home/tai/3_programs/Read_ev2'. The executive file readev2. Or you can download the sources from my GitHub repository (link)

$ readev2 xyz.ev2 : showing a total number of entry sets in the xyz.ev2 file.



$ readev2 xyz.ev2 n_0 n: start from n_0 entry and show n entries in total.

For example:
$ readev2 xyz.ev2 1 5: start from no.1 entry and show 5 entries.



you can pile it to another bash shell command, like grep or wc.
For example:
$ readev2 xyz.ev2 1 1000| grep '#:41' | wc -l
step 1: using readev2 to test from no.1 to no.1000 entry.
step 2: using grep to find out the line with #:41 (ADC number = 41)
step 3: using wc -l to count the number of the lines from grep