/[PAMELA software]/DarthVader/ToFLevel2/src/rdtofcal.for
ViewVC logotype

Diff of /DarthVader/ToFLevel2/src/rdtofcal.for

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.1.1 by mocchiut, Sat Jun 17 12:14:56 2006 UTC revision 1.8 by mocchiut, Wed Nov 23 21:19:38 2011 UTC
# Line 1  Line 1 
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    
# Line 15  c     local variables Line 16  c     local variables
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)
# Line 26  C Line 29  C
29    
30        INTEGER lrec        INTEGER lrec
31        INTEGER istat, ierr, icycle        INTEGER istat, ierr, icycle
32    
33    c      REAL x_coor_lin11(8,2),y_coor_lin12(6,2)
34        PARAMETER (lrec=4096)        PARAMETER (lrec=4096)
35    
36  C-------------------------------------------------------------------------  C-------------------------------------------------------------------------
# Line 34  c     HBOOK initialization Line 39  c     HBOOK initialization
39  c  c
40  c------------------------------------------------------------------------  c------------------------------------------------------------------------
41    
42          RDTOFCAL = 0.
43        call HLIMIT(NWPAWC)        call HLIMIT(NWPAWC)
44    
45  c------------------------------------------------------------------------  c------------------------------------------------------------------------
46  c---------------    open ToF calib rz file  c---------------    open ToF calib rz file
47  c------------------------------------------------------------------------  c------------------------------------------------------------------------
48    
49         do ii=1,250  c       do ii=1,250
50           ch=calname(ii:ii)  c         ch=calname(ii:ii)
51           if (ch.eq.'.') goto 100  c         if (ch.eq.'.') goto 100
52         enddo    c       enddo  
53  100   continue  c100   continue
54        calname1 = calname(1:ii)//'rz'  c      calname1 = calname(1:ii)//'rz'
55    
56    c      do ii=1,250
57    cc         ch=calname(ii:ii)
58    c         ch2=calname(ii:ii+1)
59    cc         write(*,*) ii,ch
60    cc         if (ch.eq.'.') goto 100
61    c         if (ch2.eq.'rz') goto 100
62    c       enddo
63    c100   continue
64    c      calname1 = calname(1:ii)//'rz'
65    c       calname1 = calname(1:ii+1)
66    
67          calname1 = calname(1:cnlen)
68    
69    
70    
71    
72         CALL HROPEN(59,'TOFK1131',calname1,'QP',4096,istat)         CALL HROPEN(59,'TOFK1131',calname1,'QP',4096,istat)
73    
# Line 77  C-------------- Line 99  C--------------
99    
100          call HBNAME(ntp_tofcalib,'TOFLIN11',y_coor_lin11,'$SET')          call HBNAME(ntp_tofcalib,'TOFLIN11',y_coor_lin11,'$SET')
101          call HBNAME(ntp_tofcalib,'TOFLIN12',x_coor_lin12,'$SET')          call HBNAME(ntp_tofcalib,'TOFLIN12',x_coor_lin12,'$SET')
102    c        call HBNAME(ntp_tofcalib,'TOFLIN11',x_coor_lin11,'$SET')
103    c        call HBNAME(ntp_tofcalib,'TOFLIN12',y_coor_lin12,'$SET')
104          call HBNAME(ntp_tofcalib,'TOFLIN21',x_coor_lin21,'$SET')          call HBNAME(ntp_tofcalib,'TOFLIN21',x_coor_lin21,'$SET')
105          call HBNAME(ntp_tofcalib,'TOFLIN22',y_coor_lin22,'$SET')          call HBNAME(ntp_tofcalib,'TOFLIN22',y_coor_lin22,'$SET')
106          call HBNAME(ntp_tofcalib,'TOFLIN31',y_coor_lin31,'$SET')          call HBNAME(ntp_tofcalib,'TOFLIN31',y_coor_lin31,'$SET')
# Line 102  c        call HPRNTU(ntp_tofcalib) Line 126  c        call HPRNTU(ntp_tofcalib)
126    
127          do iev=1,iemax_cal          do iev=1,iemax_cal
128             call HGNT(ntp_tofcalib,iev,ierr) !reads an event             call HGNT(ntp_tofcalib,iev,ierr) !reads an event
129    c           print *,' ierr ',ierr
130          enddo          enddo
131    
132          call hrout(ntp_tofcalib,icycle,' ')          call hrout(ntp_tofcalib,icycle,' ')
133          call hrend('TOFK1131')          call hrend('TOFK1131')
134          close(0)          close(0)
135    
136           return          return
137          end          end
138    

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.23