--- DarthVader/TrackerLevel2/src/F77/readallparam.f 2007/08/17 16:45:20 1.4 +++ DarthVader/TrackerLevel2/src/F77/readallparam.f 2009/08/04 14:01:39 1.10 @@ -9,8 +9,9 @@ c2f_error = 0 -c if(C2F_DEBUG.eq.1)print * - if(verbose)print * + +c if(C2F_DEBUG.EQ.1.eq.1)print * + if(verbose.eq.1)print * $ ,c2f_path(1:c2f_pathlen)//'trk-maskvk.dat' open(10, $ FILE=c2f_path(1:c2f_pathlen)//'trk-maskvk.dat' !<<<< C2F @@ -18,8 +19,8 @@ $ ,IOSTAT=iostat $ ) if(iostat.ne.0)then -c if(C2F_DEBUG.eq.1) - if(debug) +c if(C2F_DEBUG.EQ.1.eq.1) + if(debug.eq.1) $ print*,'READVKMASK: *** Error opening file ***' c2f_error = 1 return @@ -30,15 +31,16 @@ $ ) $ (mask_vk(iv,i),i=1,24) if(iostat.ne.0)then -c if(C2F_DEBUG.eq.1) - if(debug) +c if(C2F_DEBUG.EQ.1.eq.1) + if(debug.eq.1) $ print*,'READVKMASK: *** Error reading file ***' c2f_error = 1 goto 1000 endif + if(verbose.eq.1)print*,'view ',iv,': ',(mask_vk(iv,i),i=1,24) enddo 1000 close(10) - 1001 continue +c 1001 continue return end @@ -56,8 +58,8 @@ 201 format('trk-LADDER',i1,'-mip.dat') do ilad=1,nladders_view write(fname_param,201)ilad -c if(C2F_DEBUG.eq.1)print * - if(VERBOSE)print * +c if(C2F_DEBUG.EQ.1.eq.1)print * + if(VERBOSE.EQ.1)print * $ ,c2f_path(1:c2f_pathlen)!<<<< C2F $ //fname_param(1:LNBLNK(fname_param)) open(10, @@ -67,8 +69,8 @@ $ ,IOSTAT=iostat $ ) if(iostat.ne.0)then -c if(C2F_DEBUG.eq.1)print* - if(DEBUG)print* +c if(C2F_DEBUG.EQ.1.eq.1)print* + if(DEBUG.EQ.1)print* $ ,'READMIPPARAM: *** Error opening file *** ' c2f_error = 1 return @@ -100,8 +102,8 @@ 201 format('charge-l',i1,'.dat') do ilad=1,nladders_view write(fname_param,201)ilad -c if(C2F_DEBUG.eq.1)print * - if(VERBOSE)print * +c if(C2F_DEBUG.EQ.1.eq.1)print * + if(VERBOSE.EQ.1)print * $ ,c2f_path(1:c2f_pathlen)!<<<< C2F $ //fname_param(1:LNBLNK(fname_param)) open(10, @@ -153,8 +155,8 @@ * read ANGULAR BINNING info * ====================================================== fname_binning='binning.dat' -c if(C2F_DEBUG.eq.1) - if(VERBOSE) +c if(C2F_DEBUG.EQ.1.eq.1) + if(VERBOSE.EQ.1) $ print * $ ,c2f_path(1:c2f_pathlen) !<<<< C2F $ //fname_binning(1:LNBLNK(fname_binning)) @@ -165,14 +167,16 @@ $ ,IOSTAT=iostat $ ) if(iostat.ne.0)then -c if(C2F_DEBUG.eq.1) - if(DEBUG) +c if(C2F_DEBUG.EQ.1.eq.1) + if(DEBUG.EQ.1) $ print*,'READETAPARAM: *** Error in opening file *** ' c2f_error = 1 return endif -c print*,'---- ANGULAR BINNING ----' -c print*,'Bin - angL - angR' + if(DEBUG.EQ.1)THEN + print*,'---- ANGULAR BINNING ----' + print*,'Bin - angL - angR' + endif 101 format(i2,' ',f6.2,' ',f6.2) xnn=0 do ibin=1,nangmax @@ -180,13 +184,15 @@ $ ,IOSTAT=iostat $ )xnn,angL(ibin),angR(ibin) if(iostat.ne.0)goto 1000 -c write(*,101)int(xnn),angL(ibin),angR(ibin) + if(DEBUG.EQ.1)write(*,101)int(xnn),angL(ibin),angR(ibin) enddo 1000 nangbin=int(xnn) close(10) if(nangbin.eq.0)c2f_error = 1 -c print*,'-------------------------' -c print*,nangbin + if(DEBUG.EQ.1)THEN + print*,'-------------------------' + print*,nangbin + endif @@ -195,13 +201,14 @@ * ====================================================== do ieta=2,4 !loop on eta 2,3,4 200 format(' Opening eta',i1,' files...') -c if(C2F_DEBUG.eq.1)write(*,200)ieta - if(VERBOSE)write(*,200)ieta +c if(C2F_DEBUG.EQ.1.eq.1)write(*,200)ieta + if(VERBOSE.EQ.1)write(*,200)ieta 201 format('eta',i1,'-bin',i1,'-l',i1,'.dat') 202 format('eta',i1,'-bin',i2,'-l',i1,'.dat') do iang=1,nangbin do ilad=1,nladders_view + if(iang.lt.10)write(fname_param,201)ieta,iang,ilad if(iang.ge.10)write(fname_param,202)ieta,iang,ilad open(10, @@ -212,12 +219,12 @@ $ ,IOSTAT=iostat $ ) if(iostat.ne.0)then -c if(C2F_DEBUG.eq.1) - if(DEBUG) +c if(DEBUG.EQ.1) + if(.true.) $ print*,'READETAPARAM: ** Error opening file ** ' $ ,c2f_path(1:c2f_pathlen) $ //fname_param(1:LNBLNK(fname_param)) - c2f_error = 1 +c c2f_error = 1 !! COMMENTATO TEMPORANEAMENTE c return goto 2001 endif @@ -240,8 +247,10 @@ $ (feta4(ival,iv,ilad,iang),iv=1,nviews) if(iostat.ne.0)then if(netaval.eq.0)then -c if(C2F_DEBUG.eq.1)print*,'READETAPARAM: ' - if(DEBUG)print*,'READETAPARAM: ' +c if(C2F_DEBUG.EQ.1.eq.1)print*,'READETAPARAM: ' +c if(DEBUG.EQ.1) + if(.true.) + $ print*,'READETAPARAM: ' $ //'*** Error reading file *** ' $ ,c2f_path(1:c2f_pathlen) $ //fname_param(1:LNBLNK(fname_param)) @@ -263,7 +272,7 @@ * ====================================================== * read landi correction * ====================================================== - if(VERBOSE)print*,' Opening landi-correction files...' + if(VERBOSE.eq.1)print*,' Opening landi-correction files...' 301 format('lcorr-l',i1,'.dat') do ilad=1,nladders_view @@ -280,7 +289,7 @@ $ print*,'READETAPARAM: ** Error opening file ** ' $ ,c2f_path(1:c2f_pathlen) $ //fname_param(1:LNBLNK(fname_param)) - c2f_error = 1 +c c2f_error = 1 !tolto solo temporaneamente c return goto 3001 endif @@ -290,8 +299,8 @@ read(10,*,IOSTAT=iostat) $ ii,aal,aar,(fcorr(iv,ilad,iang),iv=1,nviews) - write(*,*) - $ ii,aal,aar,(fcorr(iv,ilad,iang),iv=1,nviews) +c write(*,*) +c $ ii,aal,aar,(fcorr(iv,ilad,iang),iv=1,nviews) if(ii.ne.iang)print*,'parametri eta incasinati' if(aal.ne.angl(iang))print*,'parametri eta incasinati' @@ -303,7 +312,7 @@ $ //'*** Error reading file *** ' $ ,c2f_path(1:c2f_pathlen) $ //fname_param(1:LNBLNK(fname_param)) -c c2f_error = 1 !lo commento solo per il momento + c2f_error = 1 goto 3000 endif @@ -312,7 +321,7 @@ 3001 continue enddo ! end loop on ladders - + return end @@ -344,8 +353,8 @@ do is=1,2 write(fname_param,100)ilad,is -c if(C2F_DEBUG.eq.1)print * - if(VERBOSE)print * +c if(C2F_DEBUG.EQ.1.eq.1)print * + if(VERBOSE.EQ.1)print * $ ,c2f_path(1:c2f_pathlen) $ //fname_param @@ -421,8 +430,8 @@ c2f_error = 0 -c if(C2F_DEBUG.eq.1)print * - if(VERBOSE)print * +c if(C2F_DEBUG.EQ.1.eq.1)print * + if(VERBOSE.EQ.1)print * $ ,c2f_path(1:c2f_pathlen)//'mech_pos.dat' open(10 $ ,FILE=