implicit none c real H integer i,ch,nevent real x(4094) integer y(4094),sum common/pawc/H(1000000) c call Hlimit(1000000) c call Hbook1(1,'channel vs coutns per channel',4094,2.,4095.,0.) c sum = 0 open(66,file='sample.csv', status='old') do ch=1,4094 read(66,*) x(ch),y(ch) do i=1,y(ch) call HF1(1,x(ch),1.) call HF1(2,x(ch),1.) enddo sum = sum + y(ch) enddo close(66) c write(*,*) sum c call Hrput(0,'sample.hbk','N') call HISTDO c end