3 IMPLICIT DOUBLE PRECISION (a-h,o-z)
4 COMMON / inout / ninp,nout
5 dimension x(400),er(100)
6 CHARACTER*20 typop,file1,file2,file3,stop,merge
10 write(6,*)
'>>>---------------------------------------<<<'
11 write(6,*)
'>>> Welcome to COMBINE <<<'
12 write(6,*)
'>>> Program for adding histogram files <<<'
13 write(6,*)
'>>>---------------------------------------<<<'
17 OPEN( nout, file=
'combine.out')
18 CALL glk_setnout(nout)
21 write(6,*)
'>>> Give name of the TARGET file'
24 write(6,*)
'>>> add or merge?'
27 write(6,*)
'>>> Give total number of histos'
31 write(6,*)
'>>> Give name of the FIRST histogram file on the disk'
35 OPEN(10+ninph,file=file1)
37 write(6,*)
'>>> restoring:: ', file1
38 CALL glk_hrfile(10+ninph,
' ',
' ')
39 CALL glk_hrin( 0,9999,0)
44 write(6,*)
'>>> Give name of the NEXT histogram or type stop'
47 IF(file2 .EQ. stop) goto 900
48 IF(ninph .EQ. ntot) goto 900
50 OPEN(10+ninph,file=file2)
52 CALL glk_hrfile(10+ninph,
' ',
' ')
53 IF(typop .EQ. merge)
THEN
55 write(6,*)
'>>> appending:: ', file2
56 CALL glk_hrin( 0,9999,0)
59 write(6,*)
'>>> adding:: ', file2
60 CALL glk_hrin2( 0,9999,0)
66 write(6,*)
'>>> Dumping result into:: ',file3
69 OPEN(nouth,file=file3)
72 CALL glk_hrfile(nouth,
' ',
'N')
73 CALL glk_hrout( 0,icy,
' ')