* * $Id: hbookn.F,v 1.1.1.1 1996/01/16 17:07:32 mclareni Exp $ * * $Log: hbookn.F,v $ * Revision 1.1.1.1 1996/01/16 17:07:32 mclareni * First import * * #include "hbook/pilot.h" *CMZ : 4.22/00 30/03/94 09.33.33 by Rene Brun *-- Author : SUBROUTINE HBOOKN(IDD,CHTITL,NVAR,CHRZPA,NPRIME,CHTAGS) *.==========> *. BOOKING OF A N-TUPLE *. *. ============> N-TUPLE DATA STRUCTURE <============ *. *. I *. I *. I LCID *. -3 -2 -1 V *. ************************************************************************ *. * * * ****** Bits,NDIM,NOENT,etc (See A) * *. ************************************************************************ *. . I I LNLAST pointer to last linear bank *. ......I.....I....................................... *. I I . *. I I LCONT . *. I I V *. I I **************************** ******************** *. I I------>* (x1,y1,z1,,),(x2,y2,z2,,)*-->* next if no RZ * *. I **************************** ******************** *. I LLIMS *. I *. I ***************************************** *. I------->* xlow,xup,ylow,yup,zlow,zup,etc * *. ***************************************** *. *. *. ********************************************************************** *. * word * tag * content * *. ********************************************************************** *. * * * * *. * 1 * BITS * status word * *. * 2 * NDIM * Number of variables in the N-Tuple * *. * 3 * NOENT * Total number of entries * *. * 4 * NPRIME * Number of words for primary allocation * *. * 5 * NMEM * Number of memory blocks (only 1 with RZ) * *. * 6 * NRZB * Number of RZ records (If RZ is used) * *. * 7 * IFIRST * pointer to 1st free word in LCONT * *. * 8 * NWTITL * Number of words in the title * *. (A)* 9 * ITIT1 * Internal pointer to the first word of title * *. * 10 * ITAG1 * pointer to the first tag * *. * 11 * NCHRZ * Number of characters in RZ dir (may be 0) * *. * 12 * CHRZ1 * 1st word of RZ directory * *. * 13 * CHRZ2 * 2nd word,etc * *. * * ... * * *. * ITAG1* TAG1 * 1st tag (8 characters on 2 words) * *. * * ... * * *. * ITIT1* TITLE1 * 1st word of title * *. * * ... * * *. ********************************************************************** *. *..=========> ( R.Brun ) #include "hbook/hcflag.inc" #include "hbook/hcbook.inc" #include "hbook/hcform.inc" #include "hbook/hcprin.inc" CHARACTER*(*) CHTAGS(1) CHARACTER*(*) CHRZPA,CHTITL CHARACTER*80 CHRZ CHARACTER*8 CHT1 *.___________________________________________ IERR=0 IF(IDD.LE.0)THEN CALL HBUG('ID<1 is an illegal identifier','HBOOKN',IDD) RETURN ENDIF IF(IDD.GE.10000)THEN CALL HBUG('ID>9999 is an illegal identifier','HBOOKN',IDD) RETURN ENDIF * NOENT=0 * * Check if ID already in the table * ID=IDD NRHIST=IQ(LCDIR+KNRH) IDPOS=LOCATI(IQ(LTAB+1),NRHIST,ID) IF(IDPOS.GT.0)THEN CALL HBUG('+Already existing N-tuple replaced','HBOOKN',IDD) CALL HDELET(IDD) NRHIST=IQ(LCDIR+KNRH) IDPOS=-IDPOS+1 ENDIF * * Check NVAR<513 * NDIM=NVAR IF(NDIM.LE.0.OR.NDIM.GT.512)THEN CALL HBUG('NVAR must be 0