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' |
|
character*80 cpath |
|
|
character*80 ppath |
|
61 |
|
|
62 |
|
LOGICAL DEBUG |
63 |
b_error=0 |
LOGICAL VERBOSE |
64 |
|
LOGICAL WARNING |
65 |
|
COMMON/DBG/DEBUG,VERBOSE,WARNING |
66 |
|
SAVE/DBG/ |
67 |
|
|
68 |
la=80 |
c$$$ character*256 cpath |
69 |
do i=1,80 |
character*256 ppath |
|
if(cpath(i:i).eq.'/')la=i |
|
|
enddo |
|
|
ppath=cpath(1:la) |
|
70 |
|
|
71 |
b_path = ppath |
|
72 |
b_pathlen = la |
c2f_error=0 |
73 |
|
|
74 |
c FUNZIONAAAAAAAAAAAAAAA!!!!!!!!!!!!!!!!!! |
ppath=c2f_path(1:c2f_pathlen) |
75 |
|
|
76 |
if(b_debug.eq.1)print*,'Field loaded: ',b_loaded |
|
77 |
if(b_loaded.eq.0)then |
c VERBOSE=.true. |
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 |
118 |
c implicit double precision (a-h,o-z) |
c implicit double precision (a-h,o-z) |
119 |
include 'common_B.f' |
include 'common_B.f' |
120 |
include 'common_c2f.f' |
include 'common_c2f.f' |
121 |
character*80 path |
|
122 |
|
LOGICAL DEBUG |
123 |
|
LOGICAL VERBOSE |
124 |
|
LOGICAL WARNING |
125 |
|
COMMON/DBG/DEBUG,VERBOSE,WARNING |
126 |
|
SAVE/DBG/ |
127 |
|
|
128 |
|
character*256 path |
129 |
|
|
130 |
C |
C |
131 |
REAL hmemor(10000000) |
REAL hmemor(10000000) |
183 |
Bmap_file='measure_n3_290302.rz' |
Bmap_file='measure_n3_290302.rz' |
184 |
|
|
185 |
c opens magnetic field map first file |
c opens magnetic field map first file |
186 |
if(b_debug.eq.1)print * |
c if(b_debug.eq.1)print * |
187 |
|
if(VERBOSE)print * |
188 |
$ ,path(1:LNBLNK(path))//Bmap_file |
$ ,path(1:LNBLNK(path))//Bmap_file |
189 |
call HROPEN |
call HROPEN |
190 |
$ (lun_Bmap_file,'Bmap' |
$ (lun_Bmap_file,'Bmap' |
308 |
|
|
309 |
Bmap_file='measure_n4_110402_corrected.rz' |
Bmap_file='measure_n4_110402_corrected.rz' |
310 |
c opens magnetic field map first file |
c opens magnetic field map first file |
311 |
if(b_debug.eq.1)print * !,'Opening file: ' |
c if(b_debug.eq.1)print * !,'Opening file: ' |
312 |
|
if(VERBOSE)print * !,'Opening file: ' |
313 |
$ ,path(1:LNBLNK(path))//Bmap_file |
$ ,path(1:LNBLNK(path))//Bmap_file |
314 |
call HROPEN |
call HROPEN |
315 |
$ (lun_Bmap_file,'Bmap' |
$ (lun_Bmap_file,'Bmap' |
428 |
|
|
429 |
21 continue |
21 continue |
430 |
|
|
431 |
b_error = 1 |
c2f_error = 1 |
432 |
if(b_debug.eq.1) |
c if(b_debug.eq.1) |
433 |
|
if(DEBUG) |
434 |
$ print* |
$ print* |
435 |
$ ,'read_B_inner: ERROR OPENING MAGNETIC FIELD MAP FILE: ' |
$ ,'read_B_inner: ERROR OPENING MAGNETIC FIELD MAP FILE: ' |
436 |
$ ,Bmap_file |
$ ,Bmap_file |
446 |
|
|
447 |
22 continue |
22 continue |
448 |
|
|
449 |
b_error = 1 |
c2f_error = 1 |
450 |
if(b_debug.eq.1) |
c if(b_debug.eq.1) |
451 |
|
if(DEBUG) |
452 |
$ print*,'read_B_inner: ERROR WHILE READING NTUPLE, at entry |
$ print*,'read_B_inner: ERROR WHILE READING NTUPLE, at entry |
453 |
$ : ',iev |
$ : ',iev |
454 |
|
|
491 |
include 'common_B.f' |
include 'common_B.f' |
492 |
include 'common_c2f.f' |
include 'common_c2f.f' |
493 |
C |
C |
494 |
character*80 path |
LOGICAL DEBUG |
495 |
|
LOGICAL VERBOSE |
496 |
|
LOGICAL WARNING |
497 |
|
COMMON/DBG/DEBUG,VERBOSE,WARNING |
498 |
|
SAVE/DBG/ |
499 |
|
|
500 |
|
character*256 path |
501 |
|
|
502 |
REAL hmemor(10000000) |
REAL hmemor(10000000) |
503 |
integer Iquest(100) |
integer Iquest(100) |
556 |
Bmap_file='External_top_map_n4_150402.rz' |
Bmap_file='External_top_map_n4_150402.rz' |
557 |
|
|
558 |
c opens magnetic field map first file |
c opens magnetic field map first file |
559 |
if(b_debug.eq.1)print * |
c if(b_debug.eq.1)print * |
560 |
|
if(VERBOSE)print * |
561 |
$ ,path(1:LNBLNK(path))//Bmap_file |
$ ,path(1:LNBLNK(path))//Bmap_file |
562 |
call HROPEN |
call HROPEN |
563 |
$ (lun_Bmap_file,'Bmap' |
$ (lun_Bmap_file,'Bmap' |
677 |
|
|
678 |
21 continue |
21 continue |
679 |
|
|
680 |
b_error = 1 |
c2f_error = 1 |
681 |
if(b_debug.eq.1) |
c if(b_debug.eq.1) |
682 |
|
if(DEBUG) |
683 |
$ print* |
$ print* |
684 |
$ ,'read_B_inner: ERROR OPENING MAGNETIC FIELD MAP FILE: ' |
$ ,'read_B_inner: ERROR OPENING MAGNETIC FIELD MAP FILE: ' |
685 |
$ ,Bmap_file |
$ ,Bmap_file |
695 |
|
|
696 |
22 continue |
22 continue |
697 |
|
|
698 |
b_error = 1 |
c2f_error = 1 |
699 |
if(b_debug.eq.1) |
c if(b_debug.eq.1) |
700 |
|
if(DEBUG) |
701 |
$ print* |
$ print* |
702 |
$ ,'read_B_inner: ERROR WHILE READING NTUPLE, at event |
$ ,'read_B_inner: ERROR WHILE READING NTUPLE, at event |
703 |
$ : ',iev |
$ : ',iev |