+PATCH,$CORR. +DECK,CORR1. Updates version: 2.04/00 to 2.04/02 +REP,*TITLE*,TITLE,0-1. &TITLE. CCDBCB 2.04/02 23/06/95 17.35.48 Offline Software, Database +REP,$VERSION,V2_04,1-4. *CMZU: 2.04/02 23/06/95 17.35.48 by Christian Voelcker *CMZ : 2.04/01 24/01/95 23.13.08 by Christian Voelcker *CMZU: 2.04/00 20/07/94 18.00.10 by F.-H.Heinsius *-- Author : F.-H.Heinsius 20/07/94 * *::> VERSION 2.04/02 23/06/95 17.35.48 * *> avoid compiler warning in ccinit. comment one (unused) line * *::> VERSION 2.04/01 24/01/95 23.13.08 * *> update dbcommon to be consistent with the * dbcommon deck in cboff.cmz * *> typing error fix in ccgetj * (nothing really terrible ..) * *::> VERSION 2.04/00 20/07/94 18.00.10 +REP,DBCOMMON,DBCOMMON,1-33. *CMZU: 2.04/01 31/08/94 18.40.54 by Christian Voelcker *CMZ : 26/08/94 18.40.08 by Christian Voelcker * changed the number for KPW to 29 (seems never to be used) * added KJU for the NEW JDC's drift time tables *CMZ : 1.23/09 30/06/94 18.08.21 by Michael Doser *CMZ : 30/06/94 18.07.48 by Michael Doser * new bank CK for global fudge *CMZU: 1.23/06 02/03/94 08.51.15 by Curtis A. Meyer *CMZU: 1.22/00 04/12/92 17.43.37 by Michael Doser *CMZ : 2.03/00 20/10/92 17.56.28 by F.-H. Heinsius *CMZ : 2.02/02 27/02/92 18.36.14 by Michael Doser *CMZ : 2.00/00 27/02/91 16.44.39 by Gunter Folger *CMZ : 1.14/01 28/08/90 16.12.20 by Curtis A. Meyer *-- Author : F.H.Heinsius &KEEP,CCKONS. ** Index of different Subdetectors. Maximum subdetectors. Max cycles. ** NRECCC = record length in 4byte words, MDIR = maximum runperiods ** *** add HERE if you have new detectorparts (calibration constants) *** AND in +SEQ,CCDATC. INTEGER KBE, KBL, KBP, KBX, KBR, KBC, KBS, KBG, & KJZ, KJE, KJS, KJT, KJW, KJC, KJP, KJL, KJR, KJU, & KPW, & KCR, KCB, KCG, KCP, KCK, & KLG, KLP, KLX, & MPARCC, & MCYCCC, NRECCC, MDIRCC PARAMETER (KBE=1, KBL=2, KBP=3, KBX=4, KBR=5, KBC=6, KBS=7, KBG=8, & KJZ=10, KJT=11, KJE=12, KJS=13, KJW=14, KJC=15,KJP=16, & KJL=17, KJR=18, KJU=19, & KCR=20, KCB=21, KCG=22,KCP=23, KCK=24, & KPW=29, & KLG=31, KLP=32, KLX=33, & MPARCC=33, & MCYCCC=99999999, NRECCC=1024, MDIRCC=100) ** Names of Subdetectors CHARACTER*2 PARTCC COMMON /CCKONS/PARTCC(MPARCC) &KEEP,CCDATC. ** include for CCDATA subroutine. ** add here new defintions of detectorparts (and in CCKONS) +ADD,DBCOMMON,DBCOMMON,41. PARTCC(KBG) = 'BG' +ADD,DBCOMMON,DBCOMMON,49. PARTCC(KJL) = 'JL' PARTCC(KJR) = 'JR' PARTCC(KJU) = 'JU' +ADD,DBCOMMON,DBCOMMON,56. PARTCC(KCK) = 'CK' +REP,DBCOMMON,DBCOMMON,67-68. *** COMMONS /ccwork/ /ccwrkc/ ** maximum subdetectors MPARCC +REP,DBCOMMON,DBCOMMON,74. ** current run, first/last run/cycle of detector part +REP,DBCOMMON,DBCOMMON,82-84. ** topdir, current run period dir COMMON /CCWRKC/ TOPDCC,PERICC +REP,CCOFFL,CCINIT,1-38. *CMZU: 2.04/02 23/06/95 17.35.38 by Christian Voelcker *CMZU: 2.03/07 05/07/94 11.46.28 by F.-H.Heinsius *CMZU: 2.03/04 01/04/93 14.34.34 by Michael Doser *CMZU: 2.03/03 17/03/93 17.20.14 by Gunter Folger * * New Dec cluster, new cernlibs, new Ultrix => opening data base on * NFS mounded read-only disk gave error; fix : read with C routines * on decs (RZOPEN, RZFILE). m.doser 17.3.93 * *CMZU: 2.02/00 28/08/91 18.07.12 by Gunter Folger *CMZU: 2.00/02 30/04/91 15.04.21 by Gunter Folger *CMZ : 2.00/01 30/04/91 09.04.10 by Gunter Folger *CMZU: 2.00/00 25/03/91 11.53.40 by Gunter Folger *CMZ : 1.20/07 23/08/90 18.19.49 by F.-H. Heinsius *-- Author : F.-H. Heinsius 23/08/90 SUBROUTINE CCINIT(IERR) ************************************************************************ *** * *** SUBROUTINE CCINIT(IERR) * *** * *** Initializing of a RZ-file for reading the calibration * *** constants. * *** * *** Created: 18-MAR-1989 F.-H. Heinsius * *** Updated: 25-JUL-1989 F.-H. Heinsius 2 new keys * *** Updated: 24-AUG-1989 F.-H. Heinsius Remove loading of LCINF * *** Updated: 14-MAY-1990 F.-H. Heinsius Set MC-mode to false * *** * *** Arguments: (INPUT,OUTPUT,INPUT/OUTPUT) * *** Expected input: * *** * *** Final output: * *** IERR = Error in opening RZ-file (0=ok) * *** * *** ==>Called by : * *** ==>Calling : CCDATA, CCOPEN * *** RZFILE, RZCDIR, RZRDIR * *** * ************************************************************************ +REP,CCOFFL,CCINIT,44. CFHH include units +REP,CCOFFL,CCINIT,54. ** number/names of runperiods +REP,CCOFFL,CCINIT,79. 1010 FORMAT(1X, +REP,CCOFFL,CCINIT,85-88. 1020 FORMAT(' CMZ run on ',I6,' at ',I4,'.') WRITE(6,*) ' ' ** Open the old RZ-file +REP,CCOFFL,CCINIT,95-112. *---On the DECS,SUN, we need the file name. * CV IF(LRZIN.LT.10) WRITE(IENVIR,36)LRZIN IF(LRZIN.GE.10) WRITE(IENVIR,37)LRZIN 36 FORMAT('FORT0',I1) 37 FORMAT('FORT' ,I2) * CALL GETENV(IENVIR,FILENM) * *---Make sure that there is a file name. * DO 38 J = 256,1,-1 ILENF = J IF(FILENM(J:J).NE.' ') GOTO 39 38 CONTINUE * &SELF,IF=SUN. *---No file was assigned, exit with an error. +REP,CCOFFL,CCINIT,122-125. *---We have gotton the file name. Now close it, and then *---call ccopen to reopen it. * 39 CLOSE(UNIT=LRZIN) +REP,CCOFFL,CCINIT,149-152. ** declare the link area CCLINK and fill common CCKONS CALL CCDATA ** Load run#s of first runperiod +REP,CCOFFL,CCINIT,168. 999 RETURN +REP,CCOFFL,CCGETJ,1-6. *CMZU: 2.04/01 26/08/94 18.31.26 by Christian Voelcker *CMZU: 2.03/06 16/06/94 14.18.46 by Unknown *CMZ : 2.03/05 07/03/94 17.18.35 by F.-H.Heinsius *CMZU: 2.02/02 28/02/92 10.48.54 by Michael Doser *CMZ : 2.02/01 03/10/91 16.19.28 by Gunter Folger *CMZU: 2.02/00 24/09/91 10.00.20 by Gunter Folger *-- Author : +REP,CCOFFL,CCGETJ,13-48. ************************************************************************ *** *** SUBROUTINE CCGETJ (IRUNI, ITYPE, KPAR, LINK, IERR) *** *** Get the calibration constant banks for run IRUNI and detector- *** part KPAR into LINK. *** Calibration method is MISUSED here as it serves to get two *** calibration tables nearest to the required method, one smaller *** one larger. This is currently used only for getting Garfield *** tables for to pressure values ( = method). *** *** Use 'DEFAULT' directory if run number = 0. ( required now !) *** *** Created: 27-Aug-91 Gunter Folger *** created using CCGETC and modifying it. *** *** Modification: 28-02-92 Michael Doser *** comment out the lines giving MC data a non-zero run number; *** now MC also uses the experimental Garfield tables. *** *** Modification: 16-06-96 Michael Doser *** use always the newest Garfield tables. *** *** *** Expected input: *** IRUNI = run number ( MUST be 0 currently ) *** ITYPE = calibration method (0 not allowed ) *** KPAR = detector part id *** Final output: *** LINK = link to bank structure with calibration data *** IERR = error return code. (0=no error,-n=error,+1=old link) *** *** ==>Called by : user *** ==>Calling : RZCDIR, RZRDIR, RZIN, MZDROP *** ************************************************************************ +REP,CCOFFL,CCGETJ,77. ** Test: +REP,CCOFFL,CCGETJ,101. ** default calibration +REP,CCOFFL,CCGETJ,107-118. ** MC-mode *vvvvvvvvvvvvvvvvvvvvvvvvvv m.doser, 28/02/92 * IF (QISMCC) THEN * PERJC = 'MC' * IRUN = IGCBCC * ENDIF *^^^^^^^^^^^^^^^^^^^^^^^^^^ ** run# in range of last loaded calibration ** and method between previously found methods ** then exit immediately! +REP,CCOFFL,CCGETJ,132. ** Go into directory for requested subdetector +REP,CCOFFL,CCGETJ,142-147. ** search all keys for all banks with ** FirstRun <= IRUN and ** LastRun >= IRUN or LastRun = -1 CALL RZKEYS(5,NKYMX,KEYS,NKEYS) 101 CONTINUE +REP,CCOFFL,CCGETJ,160. 6310 FORMAT(' CCGETJ: WARNING, more than one set of calibrations', +REP,CCOFFL,CCGETJ,188-190. 100 CONTINUE * * load the calibrationS +REP,CCOFFL,CCGETJ,207. WRITE(LERR,*) 'CCGETJ: ERROR CONSTANTS NOT FOUND' +REP,CCOFFL,CCGETJ,227. WRITE(LERR,*) 'CCGETJ: ERROR CONSTANTS NOT FOUND' +REP,CCOFFL,CCGETJ,242. 999 CONTINUE