10 IMPLICIT DOUBLE PRECISION(a-
h, o-
z)
13 common/
pydat1/mstu(200),paru(200),mstj(200),parj(200)
14 common/
pybins/ihist(4),indx(1000),
bin(20000)
17 dimension idati(6), irow(100), ifra(100), dyac(10)
18 CHARACTER title*60,
out*100, cha(0:11)*1
21 DATA dyac/.04,.05,.06,.08,.10,.12,.15,.20,.25,.30/
22 DATA cha/
'0',
'1',
'2',
'3',
'4',
'5',
'6',
'7',
'8',
'9',
'X',
'-'/
25 IF(
id.LE.0.OR.
id.GT.ihist(1))
RETURN
28 IF(nint(
bin(is+5)).LE.0)
THEN
29 WRITE(mstu(11),5000)
id
40 title(3*
it-2:3*
it)=char(ieq/256**2)//char(mod(ieq,256**2)/256)
41 & //char(mod(ieq,256))
46 IF(idati(1).GT.0)
THEN
47 WRITE(mstu(11),5100)
id,
title, (idati(
j),
j=1,5)
55 DO 110 ix=is+10,is+8+
nx
61 IF(
ymax-
ymin.GT.lin*dyac(1)*1d-9)
THEN
65 IF(
ymax-
ymin.LT.lin*dyac(1)*10d0**ipot) ipot=ipot-1
66 IF(
ymax-
ymin.GT.lin*dyac(10)*10d0**ipot) ipot=ipot+1
69 IF(
ymax-
ymin.GE.lin*dyac(idel)*10d0**ipot) dely=dyac(idel+1)
75 cta=abs(
bin(is+8+ix))/
dy
76 irow(ix)=
sign(cta+0.95d0,
bin(is+8+ix))
77 ifra(ix)=10d0*(cta+1.05d0-dble(int(cta+0.95d0)))
83 DO 150 ir=irma,irmi,-1
87 IF(ir.EQ.irow(ix))
out(ix:ix)=cha(ifra(ix))
88 IF(ir*(irow(ix)-ir).GT.0)
out(ix:ix)=cha(10)
90 WRITE(mstu(11),5300) ir*dely, ipot,
out
97 IF(
bin(is+8+ix).LT.-10d0**(ipot-4))
out(ix:ix)=cha(11)
98 irow(ix)=nint(10d0**(3-ipot)*abs(
bin(is+8+ix)))
100 WRITE(mstu(11),5400)
out
103 out(ix:ix)=cha(mod(irow(ix),10**ir)/10**(ir-1))
105 WRITE(mstu(11),5500) ipot+ir-4,
out
113 IF(
bin(is+2)+(ix-1)*
bin(is+4).LT.-10d0**(ipot-3))
115 irow(ix)=nint(10d0**(2-ipot)*abs(
bin(is+2)+(ix-1)*
bin(is+4)))
117 WRITE(mstu(11),5600)
out
120 out(ix:ix)=cha(mod(irow(ix),10**ir)/10**(ir-1))
122 WRITE(mstu(11),5500) ipot+ir-3,
out
131 cta=abs(
bin(is+8+ix))
132 x=
bin(is+2)+(ix-0.5d0)*
bin(is+4)
135 cxxsum=cxxsum+cta*
x**2
137 xmean=cxsum/
max(csum,1d-20)
138 xrms=sqrt(
max(0d0,cxxsum/
max(csum,1d-20)-xmean**2))
139 WRITE(mstu(11),5700) nint(
bin(is+5)),xmean,
bin(is+6),
143 5000
FORMAT(/5
x,
'Histogram no',
i5,
' : no entries')
144 5100
FORMAT(
'1'/5
x,
'Histogram no',
i5,6
x,a60,5
x,
i4,
'-',
i2,
'-',
i2,1
x,
146 5200
FORMAT(
'1'/5
x,
'Histogram no',
i5,6
x,a60/)
147 5300
FORMAT(2
x,f7.2,
'*10**',
i2,3
x,a100)
148 5400
FORMAT(/8
x,
'Contents',3
x,a100)
149 5500
FORMAT(9
x,
'*10**',
i2,3
x,a100)
150 5600
FORMAT(/8
x,
'Low edge',3
x,a100)
151 5700
FORMAT(/5
x,
'Entries =',i12,1
p,6
x,
'Mean =',d12.4,6
x,
'Underflow ='
152 &,d12.4,6
x,
'Low edge =',d12.4/5
x,
'All chan =',d12.4,6
x,
153 &
'Rms =',d12.4,6
x,
'Overflow =',d12.4,6
x,
'High edge =',d12.4)