1 |
mocchiut |
1.1 |
*************************************************************** |
2 |
|
|
* |
3 |
|
|
* common for readraw |
4 |
|
|
* |
5 |
|
|
* |
6 |
|
|
* 10/9/2005 modified by david fedele to include general variables |
7 |
|
|
* 23/6/2006 modified by elena to fix a bug |
8 |
|
|
* |
9 |
|
|
************************************************************** |
10 |
|
|
|
11 |
|
|
|
12 |
|
|
parameter (MAXBUFFLEN=z'172c8') |
13 |
|
|
integer YODAflag |
14 |
|
|
integer*4 length_buffer |
15 |
|
|
integer*1 buffer(MAXBUFFLEN) |
16 |
|
|
integer curpos !current position in buffer |
17 |
|
|
integer startcrc |
18 |
|
|
integer stopcrc |
19 |
|
|
c common/yoda_buffer/YODAflag,length_buffer,buffer,curpos,startcrc,stopcrc |
20 |
|
|
|
21 |
|
|
integer*2 header(16) !header: 16 2-byte words |
22 |
|
|
integer*2 trailer(3) !trailer: 3 2-byte words |
23 |
|
|
integer checkheader !header control flag: |
24 |
|
|
! =1 if some error occurred |
25 |
|
|
! =2 if Acquisition header, |
26 |
|
|
! =3 if Calibration header |
27 |
|
|
common/pkt_structure/header,checkheader,trailer |
28 |
|
|
|
29 |
|
|
|
30 |
|
|
integer DAQmode_cal ! |
31 |
|
|
integer DSPnumber_cal !view number |
32 |
|
|
integer dataword |
33 |
|
|
integer calibrationnumber |
34 |
|
|
integer nused_event |
35 |
|
|
integer ped_1,ped_2,ped_3 |
36 |
|
|
integer sig_1,sig_2,sig_3 |
37 |
|
|
integer nbad_1,nbad_2,nbad_3 |
38 |
|
|
integer ff |
39 |
|
|
integer checksum_cal |
40 |
|
|
integer DSPbad_o(nviews,nstrips_view) !online bad strips |
41 |
|
|
real DSPped_o(nviews,nstrips_view) !online pedestal |
42 |
|
|
real DSPsig_o(nviews,nstrips_view) !online sigma |
43 |
|
|
integer crc_calib(3) !crc control per ladder |
44 |
|
|
integer crc_hcalib !crc control per header |
45 |
|
|
|
46 |
|
|
common/calibration_pkt/DAQmode_cal,DSPnumber_cal |
47 |
|
|
$ ,dataword,calibrationnumber, |
48 |
|
|
$ nused_event, |
49 |
|
|
$ ped_1,ped_2,ped_3, |
50 |
|
|
$ sig_1,sig_2,sig_3, |
51 |
|
|
$ nbad_1,nbad_2,nbad_3, |
52 |
|
|
$ ff,checksum_cal |
53 |
|
|
$ ,DSPped_o,DSPsig_o,DSPbad_o,crc_calib,crc_hcalib |
54 |
|
|
|
55 |
|
|
* |
56 |
|
|
* common for data packet |
57 |
|
|
* |
58 |
|
|
integer DAQmode_dat !9 = full acquisition mode |
59 |
|
|
!10 = compressed acquisition mode |
60 |
|
|
!11 = compressed+full acquisition mode |
61 |
|
|
integer DSPnumber_dat !view number |
62 |
|
|
integer DATAlength_dat !data buffer length |
63 |
|
|
integer eventn_dat !DSP event number |
64 |
|
|
integer nclust_dat!nclust*2+1 = number of strips to be |
65 |
|
|
integer cutc_dat !cut to include strips in a cluster |
66 |
|
|
integer cutcl_dat !cut to search for clusters |
67 |
|
|
integer addrcluster_dat(3) !address of the greatest cluster(view,ladder) |
68 |
|
|
integer signcluster_dat(3) !signal of the greatest cluster(view,ladder) |
69 |
|
|
integer fc_dat !compression flag |
70 |
|
|
integer compressiontime_dat !DSP program compression time |
71 |
|
|
integer fl5_dat !flag |
72 |
|
|
integer fl4_dat !flag |
73 |
|
|
integer fl3_dat !flag |
74 |
|
|
integer fl2_dat !flag |
75 |
|
|
integer fl1_dat !flag |
76 |
|
|
integer fl6_dat !flag |
77 |
|
|
integer checksum_dat !DSP header checksum |
78 |
|
|
integer l_tra |
79 |
|
|
integer*2 b_tra(MAXBUFFLEN) !DATA BUFFER |
80 |
|
|
integer pnum_dat,cmdnum_dat,bid_dat,alarm_dat,aswr_dat |
81 |
|
|
integer crc_dat |
82 |
|
|
|
83 |
|
|
common/data_pkt/DAQmode_dat,DSPnumber_dat |
84 |
|
|
$ ,eventn_dat,nclust_dat |
85 |
|
|
$ ,cutc_dat,cutcl_dat |
86 |
|
|
$ ,addrcluster_dat,signcluster_dat |
87 |
|
|
$ ,fc_dat,compressiontime_dat |
88 |
|
|
$ ,fl5_dat,fl4_dat,fl3_dat,fl2_dat,fl1_dat,fl6_dat |
89 |
|
|
$ ,checksum_dat,datalength_dat,l_tra,b_tra |
90 |
|
|
$ ,pnum_dat,cmdnum_dat,bid_dat |
91 |
|
|
& ,alarm_dat,aswr_dat |
92 |
|
|
& ,crc_dat |
93 |
|
|
|