subroutine fnc_take(fnc_flag) c c flag status of FNC (run by run) c c author: bill schmidke 14.11.97 c c update: 11.5.99 add bad runs 98/99 b.s. c c output: fnc_flag - = 0 FNC definitely kaputt (or nonexistent) c = 1 FNC OK for physics c > 1 special problems, maybe OK for physics, c but use at own risk: c = 11 veto channel 2 HV tripped c c integer: fnc_flag c c implicit none c integer fnc_flag c #include "partap.inc" #include "zdskey.inc" c integer run,i c c---------------------------------------------------------------------------- c c list of bad runs and badness codes: c integer n_bad parameter (n_bad = 15) integer first_bad(n_bad),last_bad(n_bad),bad_code(n_bad) c c *** 1995 *** c c FNC III first good run was FNC_NEUTRON Run 11520, 22.06.95 c data first_bad( 1)/ 0/,last_bad( 1)/11519/,bad_code( 1)/0/ c c Cables unplugged for scope studies of sync. rad. c data first_bad( 2)/12990/,last_bad( 2)/12990/,bad_code( 2)/0/ data first_bad( 3)/13061/,last_bad( 3)/13061/,bad_code( 3)/0/ c c *** 1996 *** c c First the HV problems c data first_bad( 4)/21392/,last_bad( 4)/21446/,bad_code( 4)/0/ data first_bad( 5)/21520/,last_bad( 5)/21529/,bad_code( 5)/0/ data first_bad( 6)/21713/,last_bad( 6)/21798/,bad_code( 6)/0/ c c Then the readout problems (#8 was DC, rest analog control) c data first_bad( 7)/21989/,last_bad( 7)/21990/,bad_code( 7)/0/ data first_bad( 8)/22036/,last_bad( 8)/22067/,bad_code( 8)/0/ data first_bad( 9)/22072/,last_bad( 9)/22076/,bad_code( 9)/0/ data first_bad(10)/22264/,last_bad(10)/22292/,bad_code(10)/0/ data first_bad(11)/22504/,last_bad(11)/22563/,bad_code(11)/0/ data first_bad(12)/22715/,last_bad(12)/22749/,bad_code(12)/0/ c c *** 1997 *** c c Cables out for current measurements c data first_bad(13)/26886/,last_bad(13)/26886/,bad_code(13)/0/ c c V2 HV tripped c data first_bad(14)/27651/,last_bad(14)/27670/,bad_code(14)/11/ c c *** 1998/1999 *** c c The Digital Delay Saga c data first_bad(15)/31972/,last_bad(15)/32130/,bad_code(15)/0/ c c---------------------------------------------------------------------------- c c c default: don't use c fnc_flag = 0 c c bag it if not an event, if event get run number c if(coutab(ZDSKEY).le.0) return call fettab(ZDSKEY,ID,1) if(ZDSKEY_GAFTyp(1:3).ne.'EVT') return run = ZDSKEY_Nr1 c c find if a bad run, if so set badness code and quit c do i=1,n_bad if(run.ge.first_bad(i).and.run.le.last_bad(i)) then fnc_flag = bad_code(i) return endif end do c c not a bad one, so set OK c fnc_flag = 1 c return end