/[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.4 by pam-fi, Thu Oct 26 16:22:37 2006 UTC revision 1.7 by pam-fi, Wed Nov 15 17:55:07 2006 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        LOGICAL DEBUG
# Line 22  Line 65 
65        COMMON/DBG/DEBUG,VERBOSE,WARNING        COMMON/DBG/DEBUG,VERBOSE,WARNING
66        SAVE/DBG/        SAVE/DBG/
67    
68        character*256 cpath  c$$$      character*256 cpath
69        character*256 ppath        character*256 ppath
70    
71                
72        b_error=0        c2f_error=0
       ppath=''  
73    
74        la=256        ppath=c2f_path(1:c2f_pathlen)
       do i=1,256  
          if(cpath(i:i).eq.'/')la=i  
       enddo  
       ppath=cpath(1:la)  
75    
       b_path    = ppath  
       b_pathlen = la  
76    
77        if(DEBUG)print*,'Field loaded: ',b_loaded  c      VERBOSE=.true.
       if(b_loaded.eq.0)then  
78    
79  c     call the subroutine which reads the maps of the measurements taken  c     call the subroutine which reads the maps of the measurements taken
80  c     inside the magnetic cavity        c     inside the magnetic cavity      
81           call readBinner(ppath)        call readBinner(ppath)
82           if(b_error.eq.1)return        if(c2f_error.eq.1)return
83          
84  c     call the subroutine which reads the maps of the measurements taken  c     call the subroutine which reads the maps of the measurements taken
85  c     outside the magnetic cavity  c     outside the magnetic cavity
86           call readBouter(ppath)          call readBouter(ppath)  
87           if(b_error.eq.1)return        if(c2f_error.eq.1)return
88    
          b_loaded  = 1  
       endif  
89    
90        return        return
91        end        end
# Line 92  c     implicit double precision (a-h,o-z Line 125  c     implicit double precision (a-h,o-z
125        COMMON/DBG/DEBUG,VERBOSE,WARNING        COMMON/DBG/DEBUG,VERBOSE,WARNING
126        SAVE/DBG/        SAVE/DBG/
127    
128        character*80 path        character*256 path
129                
130  C  C
131        REAL hmemor(10000000)        REAL hmemor(10000000)
# Line 395  c--------------------------------------- Line 428  c---------------------------------------
428                
429   21   continue   21   continue
430                
431        b_error = 1        c2f_error = 1
432  c      if(b_debug.eq.1)  c      if(b_debug.eq.1)
433        if(DEBUG)        if(DEBUG)
434       $     print*       $     print*
# Line 413  c--------------------------------------- Line 446  c---------------------------------------
446                
447   22   continue   22   continue
448                
449        b_error = 1        c2f_error = 1
450  c      if(b_debug.eq.1)  c      if(b_debug.eq.1)
451        if(DEBUG)        if(DEBUG)
452       $     print*,'read_B_inner: ERROR WHILE READING NTUPLE, at entry       $     print*,'read_B_inner: ERROR WHILE READING NTUPLE, at entry
# Line 464  C Line 497  C
497        COMMON/DBG/DEBUG,VERBOSE,WARNING        COMMON/DBG/DEBUG,VERBOSE,WARNING
498        SAVE/DBG/        SAVE/DBG/
499    
500        character*80 path        character*256 path
501    
502        REAL hmemor(10000000)        REAL hmemor(10000000)
503        integer Iquest(100)            integer Iquest(100)    
# Line 644  c--------------------------------------- Line 677  c---------------------------------------
677                
678   21   continue   21   continue
679                
680        b_error = 1        c2f_error = 1
681  c      if(b_debug.eq.1)  c      if(b_debug.eq.1)
682        if(DEBUG)        if(DEBUG)
683       $     print*       $     print*
# Line 662  c--------------------------------------- Line 695  c---------------------------------------
695                
696   22   continue   22   continue
697                
698        b_error = 1        c2f_error  = 1
699  c      if(b_debug.eq.1)  c      if(b_debug.eq.1)
700        if(DEBUG)        if(DEBUG)
701       $     print*       $     print*

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.23