subroutine hec_runh_epio c c read run header block from epio c implicit none c include'hec_epio.inc' !epio include'hec_runh.inc' !run header include'hec_par.inc' include'hec_geo.inc' include'hec_datacard.inc' c c local c integer roconfig integer mwpc_tmp, calo_tmp integer ihigh, ilow character*24 crun_start c c fill runcom c run_no = ibankbuf(3) e_beam = ibankbuf(4) i_part = ibankbuf(5) x_cryo = ibankbuf(6) y_tabl = ibankbuf(7) adc_temp = float(ibankbuf(13))/10. roconfig = ibankbuf(12) ihigh = ibankbuf(14) ihigh = ishft(ihigh,16) ilow = ibankbuf(15) ilow = ishft(ishft(ilow,16),-16) run_start = ior( ihigh , ilow ) c c old "alignment word" should now contain the ADC crate temperature c in Celsius*10. check it out: c c print*,'******** adc crate temperature ****' c print*, adc_temp c c check i_adc_used, i_tim_used in geo common c if(irunpd.gt.3)then if (i_adc_used .ne. ibankbuf(16)) then print *, + ' *** inconsistent number of adc in hec_runh_epio', + ' expected ', i_adc_used, 'read--> ', ibankbuf(16) i_adc_used = ibankbuf(16) endif if (i_tim_used .ne. ibankbuf(17)) then print *, + ' *** inconsistent number of time samplings in '// + 'hec_runh_epio'// + ' expected ', i_tim_used,' read--> ', ibankbuf(17) i_tim_used = ibankbuf(17) endif endif c c override run header values if requested c call hec_runh_replace c c unpack roconfig c mwpc_tmp = ibits(roconfig,1,1) calo_tmp = ibits(roconfig,2,1) if (mwpc_tmp .eq. 1) mwpc_on_flag = .true. if (calo_tmp .eq. 1) calo_on_flag = .true. c c print run banner c call ctimef(run_start,crun_start) write(*, 1020) crun_start, run_no, e_beam, i_part, x_cryo, + y_tabl, mwpc_on_flag, calo_on_flag 1020 format (/2x,44(1h*)/2x,1h*,42x,1h*/ + 2x,'* date = ',A24,2h */ + 2x,'* run number =',i8,17x,2h */ + 2x,'* beam energy =',f8.1,17x,2h */ + 2x,'* particle code =',i8,17x, 2h */ + 2x,'* x_cal =',f6.2,2hcm,17x,2h */ + 2x,'* y_cal =',f6.2,2hcm,17x,2h */ + 2x,'* mwpc_on_flag =',i8,17x,2h */ + 2x,'* calo_on_flag =',i8,17x,2h */ + 2x,1h*,42x,1h*/2x,44(1h*)/) c end