/[PAMELA software]/DarthVader/TrackerLevel2/src/F77/readB.f
ViewVC logotype

Diff of /DarthVader/TrackerLevel2/src/F77/readB.f

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

revision 1.2 by pam-fi, Tue May 30 16:30:37 2006 UTC revision 1.8 by pam-fi, Mon Aug 20 16:07:16 2007 UTC
# Line 13  Line 13 
13  *      *    
14  *************************************************************************  *************************************************************************
15    
16        subroutine readB(cpath)  c$$$      subroutine readB(cpath)
17    c$$$      include 'common_c2f.f'
18    c$$$
19    c$$$      LOGICAL DEBUG
20    c$$$      LOGICAL VERBOSE
21    c$$$      LOGICAL WARNING
22    c$$$      COMMON/DBG/DEBUG,VERBOSE,WARNING
23    c$$$      SAVE/DBG/
24    c$$$
25    c$$$      character*256 cpath
26    c$$$      character*256 ppath
27    c$$$
28    c$$$      
29    c$$$      b_error=0
30    c$$$      ppath=''
31    c$$$
32    c$$$      la=256
33    c$$$      do i=1,256
34    c$$$         if(cpath(i:i).eq.'/')la=i
35    c$$$      enddo
36    c$$$      ppath=cpath(1:la)
37    c$$$
38    c$$$      b_path    = ppath
39    c$$$      b_pathlen = la
40    c$$$
41    c$$$      if(DEBUG)print*,'Field loaded: ',b_loaded
42    c$$$      if(b_loaded.eq.0)then
43    c$$$
44    c$$$c     call the subroutine which reads the maps of the measurements taken
45    c$$$c     inside the magnetic cavity      
46    c$$$         call readBinner(ppath)
47    c$$$         if(b_error.eq.1)return
48    c$$$
49    c$$$c     call the subroutine which reads the maps of the measurements taken
50    c$$$c     outside the magnetic cavity
51    c$$$         call readBouter(ppath)  
52    c$$$         if(b_error.eq.1)return
53    c$$$
54    c$$$         b_loaded  = 1
55    c$$$      endif
56    c$$$
57    c$$$      return
58    c$$$      end
59          subroutine readB
60        include 'common_c2f.f'        include 'common_c2f.f'
61    
62        LOGICAL DEBUG  c$$$      LOGICAL DEBUG
63        LOGICAL VERBOSE  c$$$      LOGICAL VERBOSE
64        LOGICAL WARNING  c$$$      LOGICAL WARNING
65        COMMON/DBG/DEBUG,VERBOSE,WARNING  c$$$      COMMON/DBG/DEBUG,VERBOSE,WARNING
66        SAVE/DBG/  c$$$      SAVE/DBG/
67          INTEGER DEBUG
68        character*80 cpath        INTEGER VERBOSE
69        character*80 ppath        INTEGER WARNING
70          COMMON/dbg/DEBUG,VERBOSE,WARNING
71          SAVE/dbg/
72    
73                
       b_error=0  
74    
75        la=80  c$$$      character*256 cpath
76        do i=1,80        character*256 ppath
77           if(cpath(i:i).eq.'/')la=i  
78        enddo        
79        ppath=cpath(1:la)        c2f_error=0
80    
81        b_path    = ppath        ppath=c2f_path(1:c2f_pathlen)
       b_pathlen = la  
82    
 c     FUNZIONAAAAAAAAAAAAAAA!!!!!!!!!!!!!!!!!!  
83    
84  c      if(b_debug.eq.1)print*,'Field loaded: ',b_loaded  c      VERBOSE=.true.
       if(DEBUG)print*,'Field loaded: ',b_loaded  
       if(b_loaded.eq.0)then  
85    
86  c     call the subroutine which reads the maps of the measurements taken  c     call the subroutine which reads the maps of the measurements taken
87  c     inside the magnetic cavity        c     inside the magnetic cavity      
88           call readBinner(ppath)        call readBinner(ppath)
89           if(b_error.eq.1)return        if(c2f_error.eq.1)return
90          
91  c     call the subroutine which reads the maps of the measurements taken  c     call the subroutine which reads the maps of the measurements taken
92  c     outside the magnetic cavity  c     outside the magnetic cavity
93           call readBouter(ppath)          call readBouter(ppath)  
94           if(b_error.eq.1)return        if(c2f_error.eq.1)return
95    
          b_loaded  = 1  
       endif  
96    
97        return        return
98        end        end
# Line 88  c     implicit double precision (a-h,o-z Line 126  c     implicit double precision (a-h,o-z
126        include 'common_B.f'        include 'common_B.f'
127        include 'common_c2f.f'        include 'common_c2f.f'
128    
129        LOGICAL DEBUG  c$$$      LOGICAL DEBUG
130        LOGICAL VERBOSE  c$$$      LOGICAL VERBOSE
131        LOGICAL WARNING  c$$$      LOGICAL WARNING
132        COMMON/DBG/DEBUG,VERBOSE,WARNING  c$$$      COMMON/DBG/DEBUG,VERBOSE,WARNING
133        SAVE/DBG/  c$$$      SAVE/DBG/
134          INTEGER DEBUG
135          INTEGER VERBOSE
136          INTEGER WARNING
137          COMMON/dbg/DEBUG,VERBOSE,WARNING
138          SAVE/dbg/
139    
140        character*80 path        character*256 path
141                
142  C  C
143        REAL hmemor(10000000)        REAL hmemor(10000000)
# Line 153  c     print*,' ' Line 196  c     print*,' '
196                
197  c     opens magnetic field map first file  c     opens magnetic field map first file
198  c      if(b_debug.eq.1)print *                  c      if(b_debug.eq.1)print *                
199        if(VERBOSE)print *                        if(VERBOSE.EQ.1)print *                
200       $     ,path(1:LNBLNK(path))//Bmap_file       $     ,path(1:LNBLNK(path))//Bmap_file
201        call HROPEN        call HROPEN
202       $     (lun_Bmap_file,'Bmap'       $     (lun_Bmap_file,'Bmap'
# Line 278  c     print*,' ' Line 321  c     print*,' '
321        Bmap_file='measure_n4_110402_corrected.rz'        Bmap_file='measure_n4_110402_corrected.rz'
322  c     opens magnetic field map first file  c     opens magnetic field map first file
323  c      if(b_debug.eq.1)print *                   !,'Opening file: '  c      if(b_debug.eq.1)print *                   !,'Opening file: '
324        if(VERBOSE)print *                   !,'Opening file: '        if(VERBOSE.EQ.1)print *                   !,'Opening file: '
325       $     ,path(1:LNBLNK(path))//Bmap_file       $     ,path(1:LNBLNK(path))//Bmap_file
326        call HROPEN        call HROPEN
327       $     (lun_Bmap_file,'Bmap'       $     (lun_Bmap_file,'Bmap'
# Line 397  c--------------------------------------- Line 440  c---------------------------------------
440                
441   21   continue   21   continue
442                
443        b_error = 1        c2f_error = 1
444  c      if(b_debug.eq.1)  c      if(b_debug.eq.1)
445        if(DEBUG)        if(DEBUG.EQ.1)
446       $     print*       $     print*
447       $     ,'read_B_inner: ERROR OPENING MAGNETIC FIELD MAP FILE: '       $     ,'read_B_inner: ERROR OPENING MAGNETIC FIELD MAP FILE: '
448       $     ,Bmap_file       $     ,Bmap_file
# Line 415  c--------------------------------------- Line 458  c---------------------------------------
458                
459   22   continue   22   continue
460                
461        b_error = 1        c2f_error = 1
462  c      if(b_debug.eq.1)  c      if(b_debug.eq.1.eq.1)
463        if(DEBUG)        if(DEBUG.EQ.1)
464       $     print*,'read_B_inner: ERROR WHILE READING NTUPLE, at entry       $     print*,'read_B_inner: ERROR WHILE READING NTUPLE, at entry
465       $     : ',iev       $     : ',iev
466                
# Line 460  c     implicit double precision (a-h,o-z Line 503  c     implicit double precision (a-h,o-z
503        include 'common_B.f'        include 'common_B.f'
504        include 'common_c2f.f'        include 'common_c2f.f'
505  C  C
506        LOGICAL DEBUG  c$$$      LOGICAL DEBUG
507        LOGICAL VERBOSE  c$$$      LOGICAL VERBOSE
508        LOGICAL WARNING  c$$$      LOGICAL WARNING
509        COMMON/DBG/DEBUG,VERBOSE,WARNING  c$$$      COMMON/DBG/DEBUG,VERBOSE,WARNING
510        SAVE/DBG/  c$$$      SAVE/DBG/
511          INTEGER DEBUG
512          INTEGER VERBOSE
513          INTEGER WARNING
514          COMMON/dbg/DEBUG,VERBOSE,WARNING
515          SAVE/dbg/
516    
517        character*80 path        character*256 path
518    
519        REAL hmemor(10000000)        REAL hmemor(10000000)
520        integer Iquest(100)            integer Iquest(100)    
# Line 526  c     print*,' ' Line 574  c     print*,' '
574                
575  c     opens magnetic field map first file  c     opens magnetic field map first file
576  c      if(b_debug.eq.1)print *  c      if(b_debug.eq.1)print *
577        if(VERBOSE)print *        if(VERBOSE.EQ.1)print *
578       $     ,path(1:LNBLNK(path))//Bmap_file       $     ,path(1:LNBLNK(path))//Bmap_file
579        call HROPEN        call HROPEN
580       $     (lun_Bmap_file,'Bmap'       $     (lun_Bmap_file,'Bmap'
# Line 646  c--------------------------------------- Line 694  c---------------------------------------
694                
695   21   continue   21   continue
696                
697        b_error = 1        c2f_error = 1
698  c      if(b_debug.eq.1)  c      if(b_debug.eq.1)
699        if(DEBUG)        if(DEBUG.EQ.1)
700       $     print*       $     print*
701       $     ,'read_B_inner: ERROR OPENING MAGNETIC FIELD MAP FILE: '       $     ,'read_B_inner: ERROR OPENING MAGNETIC FIELD MAP FILE: '
702       $     ,Bmap_file       $     ,Bmap_file
# Line 658  c      if(b_debug.eq.1) Line 706  c      if(b_debug.eq.1)
706    
707  c------------------------------------------------------------------------  c------------------------------------------------------------------------
708  c      c    
709  c     ntuple event reading error  c     ntuple evevent reading error
710  c      c    
711  c------------------------------------------------------------------------  c------------------------------------------------------------------------
712                
713   22   continue   22   continue
714                
715        b_error = 1        c2f_error  = 1
716  c      if(b_debug.eq.1)  c      if(b_debug.eq.1)
717        if(DEBUG)        if(DEBUG.EQ.1)
718       $     print*       $     print*
719       $     ,'read_B_inner: ERROR WHILE READING NTUPLE, at event       $     ,'read_B_inner: ERROR WHILE READING NTUPLE, at event
720       $     : ',iev       $     : ',iev

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

  ViewVC Help
Powered by ViewVC 1.1.23