| 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 |
character*80 cpath |
|
| 62 |
character*80 ppath |
c$$$ LOGICAL DEBUG |
| 63 |
|
c$$$ LOGICAL VERBOSE |
| 64 |
|
c$$$ LOGICAL WARNING |
| 65 |
|
c$$$ COMMON/DBG/DEBUG,VERBOSE,WARNING |
| 66 |
|
c$$$ SAVE/DBG/ |
| 67 |
|
INTEGER DEBUG |
| 68 |
|
INTEGER VERBOSE |
| 69 |
|
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 |
|
if(cpath(i:i).eq.'/')la=i |
|
|
enddo |
|
|
ppath=cpath(1:la) |
|
| 77 |
|
|
| 78 |
b_path = ppath |
|
| 79 |
b_pathlen = la |
c2f_error=0 |
| 80 |
|
|
| 81 |
c FUNZIONAAAAAAAAAAAAAAA!!!!!!!!!!!!!!!!!! |
ppath=c2f_path(1:c2f_pathlen) |
| 82 |
|
|
| 83 |
if(b_debug.eq.1)print*,'Field loaded: ',b_loaded |
|
| 84 |
if(b_loaded.eq.0)then |
c VERBOSE=.true. |
| 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 |
| 125 |
c implicit double precision (a-h,o-z) |
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 |
character*80 path |
|
| 129 |
|
c$$$ LOGICAL DEBUG |
| 130 |
|
c$$$ LOGICAL VERBOSE |
| 131 |
|
c$$$ LOGICAL WARNING |
| 132 |
|
c$$$ COMMON/DBG/DEBUG,VERBOSE,WARNING |
| 133 |
|
c$$$ SAVE/DBG/ |
| 134 |
|
INTEGER DEBUG |
| 135 |
|
INTEGER VERBOSE |
| 136 |
|
INTEGER WARNING |
| 137 |
|
COMMON/dbg/DEBUG,VERBOSE,WARNING |
| 138 |
|
SAVE/dbg/ |
| 139 |
|
|
| 140 |
|
character*256 path |
| 141 |
|
|
| 142 |
C |
C |
| 143 |
REAL hmemor(10000000) |
REAL hmemor(10000000) |
| 195 |
Bmap_file='measure_n3_290302.rz' |
Bmap_file='measure_n3_290302.rz' |
| 196 |
|
|
| 197 |
c opens magnetic field map first file |
c opens magnetic field map first file |
| 198 |
if(b_debug.eq.1)print * |
c if(b_debug.eq.1)print * |
| 199 |
|
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' |
| 320 |
|
|
| 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 |
if(b_debug.eq.1)print * !,'Opening file: ' |
c if(b_debug.eq.1)print * !,'Opening file: ' |
| 324 |
|
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' |
| 440 |
|
|
| 441 |
21 continue |
21 continue |
| 442 |
|
|
| 443 |
b_error = 1 |
c2f_error = 1 |
| 444 |
if(b_debug.eq.1) |
c if(b_debug.eq.1) |
| 445 |
|
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 |
| 458 |
|
|
| 459 |
22 continue |
22 continue |
| 460 |
|
|
| 461 |
b_error = 1 |
c2f_error = 1 |
| 462 |
if(b_debug.eq.1) |
c if(b_debug.eq.1.eq.1) |
| 463 |
|
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 |
|
|
| 503 |
include 'common_B.f' |
include 'common_B.f' |
| 504 |
include 'common_c2f.f' |
include 'common_c2f.f' |
| 505 |
C |
C |
| 506 |
character*80 path |
c$$$ LOGICAL DEBUG |
| 507 |
|
c$$$ LOGICAL VERBOSE |
| 508 |
|
c$$$ LOGICAL WARNING |
| 509 |
|
c$$$ COMMON/DBG/DEBUG,VERBOSE,WARNING |
| 510 |
|
c$$$ SAVE/DBG/ |
| 511 |
|
INTEGER DEBUG |
| 512 |
|
INTEGER VERBOSE |
| 513 |
|
INTEGER WARNING |
| 514 |
|
COMMON/dbg/DEBUG,VERBOSE,WARNING |
| 515 |
|
SAVE/dbg/ |
| 516 |
|
|
| 517 |
|
character*256 path |
| 518 |
|
|
| 519 |
REAL hmemor(10000000) |
REAL hmemor(10000000) |
| 520 |
integer Iquest(100) |
integer Iquest(100) |
| 573 |
Bmap_file='External_top_map_n4_150402.rz' |
Bmap_file='External_top_map_n4_150402.rz' |
| 574 |
|
|
| 575 |
c opens magnetic field map first file |
c opens magnetic field map first file |
| 576 |
if(b_debug.eq.1)print * |
c if(b_debug.eq.1)print * |
| 577 |
|
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' |
| 694 |
|
|
| 695 |
21 continue |
21 continue |
| 696 |
|
|
| 697 |
b_error = 1 |
c2f_error = 1 |
| 698 |
if(b_debug.eq.1) |
c if(b_debug.eq.1) |
| 699 |
|
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 |
| 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 |
if(b_debug.eq.1) |
c if(b_debug.eq.1) |
| 717 |
|
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 |