1 |
C |
C |
2 |
C Written by Emiliano Mocchiutti and Mirko Boezio |
C Written by Emiliano Mocchiutti and Mirko Boezio |
3 |
C |
C |
4 |
C * Version: 3.4.10 * |
C * Version: 3.4.11 * |
5 |
C |
C |
6 |
C Changelog: |
C Changelog: |
7 |
C |
C |
8 |
|
C 3.4.10 - 3.4.11: (2008-12-04) Process always the data also in case of CRC errors. |
9 |
|
C |
10 |
C 3.4.09 - 3.4.10: (2006-10-19) Bug, crash when length is too big, fixed (introduced error code 143 = packet length problems); |
C 3.4.09 - 3.4.10: (2006-10-19) Bug, crash when length is too big, fixed (introduced error code 143 = packet length problems); |
11 |
C |
C |
12 |
C 3.4.08 - 3.4.09: (2006-09-28) XE is not always correctly found, fixed. |
C 3.4.08 - 3.4.09: (2006-09-28) XE is not always correctly found, fixed. |
123 |
c PARAMETER (START=500,SEC1ST=1200) |
c PARAMETER (START=500,SEC1ST=1200) |
124 |
PARAMETER (SEC1ST=1200) |
PARAMETER (SEC1ST=1200) |
125 |
PARAMETER (NPLA=22,NCHA=96,LENSEV=NPLA*NCHA) |
PARAMETER (NPLA=22,NCHA=96,LENSEV=NPLA*NCHA) |
126 |
PARAMETER (ival='FFFF'x) |
c PARAMETER (ival=-32768) |
127 |
|
c PARAMETER (ival='FFFF'x) |
128 |
C |
C |
129 |
C Normal variables definition |
C Normal variables definition |
130 |
C |
C |
146 |
integer seemcomp, seemfull, cberaw, yesisco, yesisfu,yesisra |
integer seemcomp, seemfull, cberaw, yesisco, yesisfu,yesisra |
147 |
integer ca50, ca50a, ca50b |
integer ca50, ca50a, ca50b |
148 |
integer firsttime |
integer firsttime |
149 |
|
integer scrcerr, sic, sicb |
150 |
C |
C |
151 |
real dedx1(11,96),dedx2(11,96),dedx3(11,96),dedx4(11,96) |
real dedx1(11,96),dedx2(11,96),dedx3(11,96),dedx4(11,96) |
152 |
real dedx1c(11,96),dedx2c(11,96),dedx3c(11,96),dedx4c(11,96) |
real dedx1c(11,96),dedx2c(11,96),dedx3c(11,96),dedx4c(11,96) |
173 |
C |
C |
174 |
C Begin ! |
C Begin ! |
175 |
C |
C |
176 |
|
c dumpo = iev |
177 |
start = 320 |
start = 320 |
178 |
firsttime = 1 |
firsttime = 1 |
179 |
SOGLIA0 = 70 |
SOGLIA0 = 70 |
180 |
|
sic = 0 |
181 |
|
sicb = 0 |
182 |
2 continue |
2 continue |
183 |
C |
C |
184 |
C input length must be > 0, if not go out with error code 142 |
C input length must be > 0, if not go out with error code 142 |
190 |
enddo |
enddo |
191 |
goto 999 |
goto 999 |
192 |
endif |
endif |
193 |
|
|
194 |
|
do bit = 0, 15 |
195 |
|
ival = ibset(ival,bit) |
196 |
|
enddo |
197 |
|
c print *,' IVAL ',IVAL |
198 |
|
c write(*,22)IVAL |
199 |
C |
C |
200 |
C no debug informations |
C no debug informations |
201 |
C |
C |
203 |
C |
C |
204 |
C DEBUG: PRINT OUT THE INPUT VECTOR |
C DEBUG: PRINT OUT THE INPUT VECTOR |
205 |
C |
C |
206 |
if (iev.eq.dumpo) then |
c if (iev.eq.dumpo) then |
207 |
do l=1,lung |
c do l=1,lung |
208 |
write(*,17)l,vecta(l) |
c write(*,17)l,vecta(l) |
209 |
enddo |
c enddo |
210 |
endif |
c endif |
211 |
C dumpo = iev |
C dumpo = iev |
212 |
C |
C |
213 |
C DETERMINE LENGTH IN WORDS FROM LENGTH IN BYTES |
C DETERMINE LENGTH IN WORDS FROM LENGTH IN BYTES |
305 |
c |
c |
306 |
32 continue |
32 continue |
307 |
C |
C |
308 |
|
if ( ic .lt. 1 ) then |
309 |
|
if (dumpo.eq.iev) print *,' AGH IC = ',IC |
310 |
|
ic = 1 |
311 |
|
endif |
312 |
|
if ( icsave .lt. 0 ) then |
313 |
|
if (dumpo.eq.iev) print *,' AGH ICSAVE = ',ICSAVE |
314 |
|
icsave = 0 |
315 |
|
endif |
316 |
|
C |
317 |
ke = 0 |
ke = 0 |
318 |
chis = chi |
chis = chi |
319 |
icold = ic |
icold = ic |
320 |
DO i = 1, 60000 |
DO i = 1, 120000 |
321 |
vect(i) = 0 |
vect(i) = 0 |
322 |
enddo |
enddo |
323 |
do while (ke.eq.0) |
do while (ke.eq.0) |
825 |
endif |
endif |
826 |
C |
C |
827 |
if (check.ne.vect(length)) then |
if (check.ne.vect(length)) then |
828 |
C |
c |
829 |
|
c try to process anyway if we have crc errors but only on the second time we have found our section |
830 |
|
c |
831 |
|
scrcerr = 0 |
832 |
|
sic = 0 |
833 |
|
sicb = 0 |
834 |
|
if ( headcor.ne.2 ) then |
835 |
|
C |
836 |
C clear vectors of that section in the common |
C clear vectors of that section in the common |
837 |
|
C |
838 |
|
call clearsec |
839 |
C |
C |
840 |
call clearsec |
calselftrig(k,1) = check |
841 |
C |
calselftrig(k,2) = vect(length) |
|
calselftrig(k,1) = check |
|
|
calselftrig(k,2) = vect(length) |
|
842 |
c |
c |
843 |
merror(contr) = 132 |
merror(contr) = 132 |
844 |
chi = chi + 4 |
chi = chi + 4 |
845 |
lleng = 0 |
lleng = 0 |
846 |
length2 = 0 |
length2 = 0 |
847 |
length = 0 |
length = 0 |
848 |
|
c |
849 |
|
if (ke.eq.1.and.headcor.ne.2) then |
850 |
|
ic = 10 |
851 |
|
c elseif (headcor.eq.2) then |
852 |
|
c contr = contr + 1 |
853 |
|
endif |
854 |
|
headcor = 1 |
855 |
|
ichc = ic - 1 |
856 |
|
if (iev.eq.dumpo) |
857 |
|
& print *,' A crc is wrong ',ic, |
858 |
|
& ' search section ',contr,' coco = ',coco |
859 |
|
goto 32 |
860 |
|
else |
861 |
|
c |
862 |
|
c set some variables and try to go on |
863 |
c |
c |
864 |
if (ke.eq.1.and.headcor.ne.2) then |
merror(contr) = 132 |
865 |
ic = 10 |
scrcerr = 1 |
866 |
elseif (headcor.eq.2) then |
sic = ic |
867 |
contr = contr + 1 |
sicb = icb |
868 |
|
|
869 |
endif |
endif |
|
headcor = 1 |
|
|
ichc = ic - 1 |
|
|
if (iev.eq.dumpo) |
|
|
& print *,'crc is wrong ',ic, |
|
|
& ' search section ',contr,' coco = ',coco |
|
|
goto 32 |
|
870 |
else |
else |
871 |
chi = chi - 4 |
chi = chi - 4 |
872 |
if (chi.lt.0) chi = 0 |
if (chi.lt.0) chi = 0 |
881 |
call clearsec |
call clearsec |
882 |
do i = 1, 7 |
do i = 1, 7 |
883 |
icb = icb + 1 |
icb = icb + 1 |
884 |
auto(i) = vect(icb) |
if ( icb.gt.120000 ) then |
885 |
|
c out of vector... |
886 |
|
if (iev.eq.dumpo) then |
887 |
|
print *,' Run out of vect...' |
888 |
|
goto 150 |
889 |
|
endif |
890 |
|
endif |
891 |
|
auto(i) = vect(icb) |
892 |
enddo |
enddo |
893 |
C |
C |
894 |
st2c = 0 |
st2c = 0 |
905 |
chi = chi + 4 |
chi = chi + 4 |
906 |
if (iev.eq.dumpo) |
if (iev.eq.dumpo) |
907 |
& print *,'raw lung 4' |
& print *,'raw lung 4' |
908 |
lleng = 0 |
if ( scrcerr.eq.0 ) then |
909 |
goto 150 |
lleng = 0 |
910 |
else |
goto 150 |
911 |
if (k.eq.1) call CALRAW(vect,icb+1,length-1,dedx1) |
endif |
|
if (k.eq.2) call CALRAW(vect,icb+1,length-1,dedx2) |
|
|
if (k.eq.3) call CALRAW(vect,icb+1,length-1,dedx3) |
|
|
if (k.eq.4) call CALRAW(vect,icb+1,length-1,dedx4) |
|
912 |
endif |
endif |
913 |
|
c else |
914 |
|
if (k.eq.1) call CALRAW(vect,icb+1,length-1,dedx1) |
915 |
|
if (k.eq.2) call CALRAW(vect,icb+1,length-1,dedx2) |
916 |
|
if (k.eq.3) call CALRAW(vect,icb+1,length-1,dedx3) |
917 |
|
if (k.eq.4) call CALRAW(vect,icb+1,length-1,dedx4) |
918 |
|
c endif |
919 |
goto 50 |
goto 50 |
920 |
endif |
endif |
921 |
C |
C |
928 |
chi = chi + 4 |
chi = chi + 4 |
929 |
if (iev.eq.dumpo) |
if (iev.eq.dumpo) |
930 |
& print *,'compr lung 4' |
& print *,'compr lung 4' |
931 |
lleng = 0 |
if ( scrcerr.eq.0 ) then |
932 |
goto 150 |
lleng = 0 |
933 |
else |
goto 150 |
934 |
icb = icb + 1 |
endif |
935 |
calIItrig(k) = vect(icb) |
endif |
936 |
icb = icb + 1 |
c else |
937 |
calstriphit(k) = vect(icb) |
icb = icb + 1 |
938 |
icb = icb + 1 |
if ( icb.gt.120000 ) then |
939 |
|
c out of vector... |
940 |
|
if (iev.eq.dumpo) then |
941 |
|
print *,' Run out of vect...' |
942 |
|
goto 150 |
943 |
|
endif |
944 |
|
endif |
945 |
|
calIItrig(k) = vect(icb) |
946 |
|
icb = icb + 1 |
947 |
|
if ( icb.gt.120000 ) then |
948 |
|
c out of vector... |
949 |
|
if (iev.eq.dumpo) then |
950 |
|
print *,' Run out of vect...' |
951 |
|
goto 150 |
952 |
|
endif |
953 |
|
endif |
954 |
|
calstriphit(k) = vect(icb) |
955 |
|
icb = icb + 1 |
956 |
|
if ( icb.gt.120000 ) then |
957 |
|
c out of vector... |
958 |
|
if (iev.eq.dumpo) then |
959 |
|
print *,' Run out of vect...' |
960 |
|
goto 150 |
961 |
|
endif |
962 |
|
endif |
963 |
C FIRST CALORIMETER SIGNATURE: CA50 |
C FIRST CALORIMETER SIGNATURE: CA50 |
964 |
icb = icb + 1 |
icb = icb + 1 |
965 |
|
if ( icb.gt.120000 ) then |
966 |
|
c out of vector... |
967 |
|
if (iev.eq.dumpo) then |
968 |
|
print *,' Run out of vect...' |
969 |
|
goto 150 |
970 |
|
endif |
971 |
|
endif |
972 |
C SECOND CALORIMETER SIGNATURE: CA50 |
C SECOND CALORIMETER SIGNATURE: CA50 |
973 |
icb = icb + 1 |
icb = icb + 1 |
974 |
|
if ( icb.gt.120000 ) then |
975 |
|
c out of vector... |
976 |
|
if (iev.eq.dumpo) then |
977 |
|
print *,' Run out of vect...' |
978 |
|
goto 150 |
979 |
|
endif |
980 |
|
endif |
981 |
C test is here! |
C test is here! |
982 |
icb = icb + 1 |
icb = icb + 1 |
983 |
calDSPtaberr(k) = vect(icb) |
if ( icb.gt.120000 ) then |
984 |
icb = icb + 1 |
c out of vector... |
985 |
calevnum(k) = vect(icb) |
if (iev.eq.dumpo) then |
986 |
if (k.eq.1) call CALCOMPRESS(vect,icb+1,length-1,dedx1c, |
print *,' Run out of vect...' |
987 |
& base1) |
goto 150 |
988 |
if (k.eq.2) call CALCOMPRESS(vect,icb+1,length-1,dedx2c, |
endif |
|
& base2) |
|
|
if (k.eq.3) call CALCOMPRESS(vect,icb+1,length-1,dedx3c, |
|
|
& base3) |
|
|
if (k.eq.4) call CALCOMPRESS(vect,icb+1,length-1,dedx4c, |
|
|
& base4) |
|
|
goto 50 |
|
989 |
endif |
endif |
990 |
|
calDSPtaberr(k) = vect(icb) |
991 |
|
icb = icb + 1 |
992 |
|
if ( icb.gt.120000 ) then |
993 |
|
c out of vector... |
994 |
|
if (iev.eq.dumpo) then |
995 |
|
print *,' Run out of vect...' |
996 |
|
goto 150 |
997 |
|
endif |
998 |
|
endif |
999 |
|
calevnum(k) = vect(icb) |
1000 |
|
if (k.eq.1) call CALCOMPRESS(vect,icb+1,length-1,dedx1c, |
1001 |
|
& base1,scrcerr) |
1002 |
|
if (k.eq.2) call CALCOMPRESS(vect,icb+1,length-1,dedx2c, |
1003 |
|
& base2,scrcerr) |
1004 |
|
if (k.eq.3) call CALCOMPRESS(vect,icb+1,length-1,dedx3c, |
1005 |
|
& base3,scrcerr) |
1006 |
|
if (k.eq.4) call CALCOMPRESS(vect,icb+1,length-1,dedx4c, |
1007 |
|
& base4,scrcerr) |
1008 |
|
goto 50 |
1009 |
|
c endif |
1010 |
else if (test.eq.0) then |
else if (test.eq.0) then |
1011 |
if (length2.gt.2257) then |
if (length2.gt.2257) then |
1012 |
merror(contr) = 135 |
merror(contr) = 135 |
1013 |
chi = chi + 4 |
chi = chi + 4 |
1014 |
if (iev.eq.dumpo) |
if (iev.eq.dumpo) |
1015 |
& print *,'full lung 4' |
& print *,'full lung 4' |
1016 |
lleng = 0 |
if ( scrcerr.eq.0 ) then |
1017 |
goto 150 |
lleng = 0 |
1018 |
else |
goto 150 |
1019 |
icb = icb + 1 |
endif |
1020 |
calIItrig(k) = vect(icb) |
endif |
1021 |
icb = icb + 1 |
c else |
1022 |
calstriphit(k) = vect(icb) |
icb = icb + 1 |
1023 |
icb = icb + 1 |
if ( icb.gt.120000 ) then |
1024 |
|
c out of vector... |
1025 |
|
if (iev.eq.dumpo) then |
1026 |
|
print *,' Run out of vect...' |
1027 |
|
goto 150 |
1028 |
|
endif |
1029 |
|
endif |
1030 |
|
calIItrig(k) = vect(icb) |
1031 |
|
icb = icb + 1 |
1032 |
|
if ( icb.gt.120000 ) then |
1033 |
|
c out of vector... |
1034 |
|
if (iev.eq.dumpo) then |
1035 |
|
print *,' Run out of vect...' |
1036 |
|
goto 150 |
1037 |
|
endif |
1038 |
|
endif |
1039 |
|
calstriphit(k) = vect(icb) |
1040 |
|
icb = icb + 1 |
1041 |
|
if ( icb.gt.120000 ) then |
1042 |
|
c out of vector... |
1043 |
|
if (iev.eq.dumpo) then |
1044 |
|
print *,' Run out of vect...' |
1045 |
|
goto 150 |
1046 |
|
endif |
1047 |
|
endif |
1048 |
C FIRST CALORIMETER SIGNATURE: CA50 |
C FIRST CALORIMETER SIGNATURE: CA50 |
1049 |
icb = icb + 1 |
icb = icb + 1 |
1050 |
|
if ( icb.gt.120000 ) then |
1051 |
|
c out of vector... |
1052 |
|
if (iev.eq.dumpo) then |
1053 |
|
print *,' Run out of vect...' |
1054 |
|
goto 150 |
1055 |
|
endif |
1056 |
|
endif |
1057 |
C SECOND CALORIMETER SIGNATURE: CA50 |
C SECOND CALORIMETER SIGNATURE: CA50 |
1058 |
icb = icb + 1 |
icb = icb + 1 |
1059 |
|
if ( icb.gt.120000 ) then |
1060 |
|
c out of vector... |
1061 |
|
if (iev.eq.dumpo) then |
1062 |
|
print *,' Run out of vect...' |
1063 |
|
goto 150 |
1064 |
|
endif |
1065 |
|
endif |
1066 |
C test is here! |
C test is here! |
1067 |
icb = icb + 1 |
icb = icb + 1 |
1068 |
calDSPtaberr(k) = vect(icb) |
if ( icb.gt.120000 ) then |
1069 |
icb = icb + 1 |
c out of vector... |
1070 |
calevnum(k) = vect(icb) |
if (iev.eq.dumpo) then |
1071 |
if (k.eq.1) call CALFULL(vect,icb+1,length-1,dedx1, |
print *,' Run out of vect...' |
1072 |
& dedx1c,base1) |
goto 150 |
1073 |
if (k.eq.2) call CALFULL(vect,icb+1,length-1,dedx2, |
endif |
1074 |
& dedx2c,base2) |
endif |
1075 |
if (k.eq.3) call CALFULL(vect,icb+1,length-1,dedx3, |
calDSPtaberr(k) = vect(icb) |
1076 |
& dedx3c,base3) |
icb = icb + 1 |
1077 |
if (k.eq.4) call CALFULL(vect,icb+1,length-1,dedx4, |
if ( icb.gt.120000 ) then |
1078 |
& dedx4c,base4) |
c out of vector... |
1079 |
goto 50 |
if (iev.eq.dumpo) then |
1080 |
|
print *,' Run out of vect...' |
1081 |
|
goto 150 |
1082 |
|
endif |
1083 |
endif |
endif |
1084 |
|
calevnum(k) = vect(icb) |
1085 |
|
if (k.eq.1) call CALFULL(vect,icb+1,length-1,dedx1, |
1086 |
|
& dedx1c,base1,scrcerr) |
1087 |
|
if (k.eq.2) call CALFULL(vect,icb+1,length-1,dedx2, |
1088 |
|
& dedx2c,base2,scrcerr) |
1089 |
|
if (k.eq.3) call CALFULL(vect,icb+1,length-1,dedx3, |
1090 |
|
& dedx3c,base3,scrcerr) |
1091 |
|
if (k.eq.4) call CALFULL(vect,icb+1,length-1,dedx4, |
1092 |
|
& dedx4c,base4,scrcerr) |
1093 |
|
goto 50 |
1094 |
|
c endif |
1095 |
else |
else |
1096 |
merror(contr) = 136 |
merror(contr) = 136 |
1097 |
chi = chi + 4 |
chi = chi + 4 |
1126 |
base(1,2*i,j) = base3(i,j) |
base(1,2*i,j) = base3(i,j) |
1127 |
enddo |
enddo |
1128 |
enddo |
enddo |
1129 |
C |
C |
1130 |
150 continue |
150 continue |
1131 |
C |
C |
1132 |
contr = contr + 1 |
contr = contr + 1 |
1133 |
|
|
1134 |
|
c |
1135 |
|
c in case of crc error proceed as if we never processed this section |
1136 |
|
c |
1137 |
|
if ( scrcerr.eq.1 ) then |
1138 |
|
|
1139 |
|
chi = chi + 4 |
1140 |
|
lleng = 0 |
1141 |
|
length2 = 0 |
1142 |
|
length = 0 |
1143 |
|
c |
1144 |
|
headcor = 1 |
1145 |
|
ichc = sic - 1 |
1146 |
|
icb = sicb |
1147 |
|
if (iev.eq.dumpo) |
1148 |
|
& print *,' B crc is wrong ',sic, |
1149 |
|
& ' search section ',contr,' coco = ',coco |
1150 |
|
goto 32 |
1151 |
|
c |
1152 |
|
endif |
1153 |
|
|
1154 |
C |
C |
1155 |
c go on till we have found all the four sections |
c go on till we have found all the four sections |
1156 |
c |
c |
1272 |
enddo |
enddo |
1273 |
enddo |
enddo |
1274 |
endif |
endif |
1275 |
do l=1,lung |
c do l=1,lung |
1276 |
write(*,17)l,vecta(l) |
c write(*,17)l,vecta(l) |
1277 |
enddo |
c enddo |
1278 |
endif |
endif |
1279 |
iev = iev + 1 |
iev = iev + 1 |
1280 |
RETURN |
RETURN |
1316 |
do j = 1,96 |
do j = 1,96 |
1317 |
do i = 1,11 |
do i = 1,11 |
1318 |
DEDX(I,J) = 0. |
DEDX(I,J) = 0. |
1319 |
dedx(i,j) = vect(k) |
if ( k.le.120000 ) dedx(i,j) = vect(k) |
1320 |
k = k + 1 |
k = k + 1 |
1321 |
enddo |
enddo |
1322 |
enddo |
enddo |
1325 |
END |
END |
1326 |
|
|
1327 |
C------------------------------------------------ |
C------------------------------------------------ |
1328 |
SUBROUTINE CALCOMPRESS(vect,inf,sup,dedx,basse) |
SUBROUTINE CALCOMPRESS(vect,inf,sup,dedx,basse,cer) |
1329 |
C------------------------------------------------ |
C------------------------------------------------ |
1330 |
|
|
1331 |
IMPLICIT NONE |
IMPLICIT NONE |
1342 |
INTEGER merror(4) |
INTEGER merror(4) |
1343 |
INTEGER contr |
INTEGER contr |
1344 |
integer stwerr(4),dumpo |
integer stwerr(4),dumpo |
1345 |
integer bit,bi |
integer bit,bi,cer |
1346 |
C |
C |
1347 |
REAL DEXY(2,NPLA,NCHA), dexyc(2,npla,ncha), base(2,npla,6) |
REAL DEXY(2,NPLA,NCHA), dexyc(2,npla,ncha), base(2,npla,6) |
1348 |
real calselftrig(4,7), calIItrig(4), calstriphit(4), |
real calselftrig(4,7), calIItrig(4), calstriphit(4), |
1371 |
i = inf |
i = inf |
1372 |
c |
c |
1373 |
10 continue |
10 continue |
1374 |
if (i.gt.sup) then |
if (i.gt.sup.or.i.gt.120000) then |
1375 |
RETURN |
RETURN |
1376 |
endif |
endif |
1377 |
C |
C |
1395 |
write(*,43)vect(i) |
write(*,43)vect(i) |
1396 |
endif |
endif |
1397 |
merror(contr) = 139 |
merror(contr) = 139 |
1398 |
RETURN |
if ( cer.eq.0 ) then |
1399 |
|
RETURN |
1400 |
|
else |
1401 |
|
i = i + 1 |
1402 |
|
goto 10 |
1403 |
|
endif |
1404 |
endif |
endif |
1405 |
endif |
endif |
1406 |
C |
C |
1411 |
ipl = int(st/6) + 1 |
ipl = int(st/6) + 1 |
1412 |
ipr = st - (ipl - 1) * 6 + 1 |
ipr = st - (ipl - 1) * 6 + 1 |
1413 |
i = i + 1 |
i = i + 1 |
1414 |
if (i.gt.sup) RETURN |
if (i.gt.sup.or.i.gt.120000) RETURN |
1415 |
basse(ipl,ipr) = vect(i) |
if ( ipl.ge.1.and.ipl.le.11.and.ipr.ge.1.and.ipr.le.6) |
1416 |
|
+ basse(ipl,ipr) = vect(i) |
1417 |
c |
c |
1418 |
20 continue |
20 continue |
1419 |
if (i.gt.sup) RETURN |
if (i.gt.sup.or.i.gt.120000) RETURN |
1420 |
C |
C |
1421 |
i = i + 1 |
i = i + 1 |
1422 |
if (i.gt.sup) RETURN |
if (i.gt.sup.or.i.gt.120000) RETURN |
1423 |
if ((vect(i)+1).gt.16.or.(vect(i)+1).lt.1) then |
if ((vect(i)+1).gt.16.or.(vect(i)+1).lt.1) then |
|
|
|
1424 |
goto 10 |
goto 10 |
1425 |
endif |
endif |
1426 |
ist = vect(i) + 1 + 16 * (ipr - 1) |
ist = vect(i) + 1 + 16 * (ipr - 1) |
1427 |
i = i + 1 |
i = i + 1 |
1428 |
if (i.gt.sup) RETURN |
if (i.gt.sup.or.i.gt.120000) RETURN |
1429 |
dedx(ipl,ist) = vect(i) |
if ( ipl.ge.1.and.ipl.le.11.and.ist.ge.1.and.ist.le.96) |
1430 |
|
+ dedx(ipl,ist) = vect(i) |
1431 |
goto 20 |
goto 20 |
1432 |
else |
else |
1433 |
C |
C |
1434 |
st = IAND(vect(i),'00FF'x) |
st = IAND(vect(i),'00FF'x) |
1435 |
ipl = int(st/6) + 1 |
ipl = int(st/6) + 1 |
1436 |
ipr = st - (ipl - 1) * 6 + 1 |
ipr = st - (ipl - 1) * 6 + 1 |
1437 |
do j = 1,16 |
if ( ipl.ge.1.and.ipl.le.11 ) then |
1438 |
i = i + 1 |
do j = 1,16 |
1439 |
if (i.gt.sup) RETURN |
i = i + 1 |
1440 |
ist = j + 16 * (ipr - 1) |
if (i.gt.sup.or.i.gt.120000) RETURN |
1441 |
dedx(ipl,ist) = vect(i) |
ist = j + 16 * (ipr - 1) |
1442 |
enddo |
if (ist.ge.1.and.ist.le.96) dedx(ipl,ist) = vect(i) |
1443 |
|
enddo |
1444 |
|
endif |
1445 |
i = i + 1 |
i = i + 1 |
1446 |
if (i.gt.sup) RETURN |
if (i.gt.sup.or.i.gt.120000) RETURN |
1447 |
goto 10 |
goto 10 |
1448 |
C |
C |
1449 |
endif |
endif |
1454 |
|
|
1455 |
|
|
1456 |
C---------------------------------------------------------- |
C---------------------------------------------------------- |
1457 |
SUBROUTINE CALFULL(vect,inf,sup,dedx,dedxc,basse) |
SUBROUTINE CALFULL(vect,inf,sup,dedx,dedxc,basse,cer) |
1458 |
C-------------------------------------------------------------- |
C-------------------------------------------------------------- |
1459 |
|
|
1460 |
IMPLICIT NONE |
IMPLICIT NONE |
1464 |
C |
C |
1465 |
INTEGER*2 VECT(30000) |
INTEGER*2 VECT(30000) |
1466 |
INTEGER inf, sup |
INTEGER inf, sup |
1467 |
INTEGER i,j,k, iev |
INTEGER i,j,k, iev, cer |
1468 |
INTEGER contr |
INTEGER contr |
1469 |
integer stwerr(4),dumpo,merror(4) |
integer stwerr(4),dumpo,merror(4) |
1470 |
C |
C |
1488 |
do i = 1,11 |
do i = 1,11 |
1489 |
do j = 1,96 |
do j = 1,96 |
1490 |
DEDX(I,J) = 0. |
DEDX(I,J) = 0. |
1491 |
dedx(i,j) = vect(k) |
if ( k.le.120000 ) dedx(i,j) = vect(k) |
1492 |
k = k + 1 |
k = k + 1 |
1493 |
enddo |
enddo |
1494 |
enddo |
enddo |
1495 |
C |
C |
1496 |
call CALCOMPRESS(vect,k,sup,dedxc,basse) |
call CALCOMPRESS(vect,k,sup,dedxc,basse,cer) |
1497 |
C |
C |
1498 |
10 FORMAT(2X,'Status word:',2X,Z8) |
10 FORMAT(2X,'Status word:',2X,Z8) |
1499 |
|
|