1 |
C------------------------------------------------ |
C------------------------------------------------ |
2 |
FUNCTION RDTOFCAL(calname) |
REAL FUNCTION RDTOFCAL(calname,cnlen) |
3 |
C------------------------------------------------ |
C------------------------------------------------ |
4 |
|
|
5 |
include 'input_tof.txt' |
include 'input_tof.txt' |
6 |
|
|
7 |
c----- HBOOK |
c----- HBOOK |
8 |
INTEGER HMEM |
INTEGER HMEM |
9 |
|
c REAL RDTOFCAL |
10 |
parameter (NWPAWC=8500000) |
parameter (NWPAWC=8500000) |
11 |
common/PAWC/HMEM(NWPAWC) |
common/PAWC/HMEM(NWPAWC) |
12 |
|
|
16 |
c------------------------------------------------------------------------ |
c------------------------------------------------------------------------ |
17 |
character*250 calname |
character*250 calname |
18 |
character*250 calname1 |
character*250 calname1 |
19 |
character ch |
c character ch |
20 |
|
c character*2 ch2 |
21 |
|
integer cnlen |
22 |
c------------------------------------------------------------------ |
c------------------------------------------------------------------ |
23 |
|
|
24 |
COMMON/QUEST/IQUEST(100) |
COMMON/QUEST/IQUEST(100) |
37 |
c |
c |
38 |
c------------------------------------------------------------------------ |
c------------------------------------------------------------------------ |
39 |
|
|
40 |
|
RDTOFCAL = 0. |
41 |
call HLIMIT(NWPAWC) |
call HLIMIT(NWPAWC) |
42 |
|
|
43 |
c------------------------------------------------------------------------ |
c------------------------------------------------------------------------ |
44 |
c--------------- open ToF calib rz file |
c--------------- open ToF calib rz file |
45 |
c------------------------------------------------------------------------ |
c------------------------------------------------------------------------ |
46 |
|
|
47 |
do ii=1,250 |
c do ii=1,250 |
48 |
ch=calname(ii:ii) |
c ch=calname(ii:ii) |
49 |
if (ch.eq.'.') goto 100 |
c if (ch.eq.'.') goto 100 |
50 |
enddo |
c enddo |
51 |
100 continue |
c100 continue |
52 |
calname1 = calname(1:ii)//'rz' |
c calname1 = calname(1:ii)//'rz' |
53 |
|
|
54 |
|
c do ii=1,250 |
55 |
|
cc ch=calname(ii:ii) |
56 |
|
c ch2=calname(ii:ii+1) |
57 |
|
cc write(*,*) ii,ch |
58 |
|
cc if (ch.eq.'.') goto 100 |
59 |
|
c if (ch2.eq.'rz') goto 100 |
60 |
|
c enddo |
61 |
|
c100 continue |
62 |
|
c calname1 = calname(1:ii)//'rz' |
63 |
|
c calname1 = calname(1:ii+1) |
64 |
|
|
65 |
|
calname1 = calname(1:cnlen) |
66 |
|
|
67 |
|
|
68 |
|
|
69 |
|
|
70 |
CALL HROPEN(59,'TOFK1131',calname1,'QP',4096,istat) |
CALL HROPEN(59,'TOFK1131',calname1,'QP',4096,istat) |
71 |
|
|
128 |
call hrend('TOFK1131') |
call hrend('TOFK1131') |
129 |
close(0) |
close(0) |
130 |
|
|
131 |
return |
return |
132 |
end |
end |
133 |
|
|