next up previous contents index
Next: Generate a user Up: Get information about Previous: Retrieve the contents

Retrieve the contents of a CWN into a common block

CALL HGNT (ID,IDNEVT,IERR*)

Action:

Retrieve information about a CWN row.

Input parameters:
ID
Identifier of the Ntuple.
IDNEVT
Number of the event about which information is required.
Output parameter:
IERR
Error return code (=0 if event was found)

The information is restored at the addresses specified by HBNAME or HBNAMC (for CHARACTER data). If the information is being retrieved by a program other than the one that wrote the Ntuple then HBNAME or HBNAMC must be called as appropriate (see below).

      CALL HBNAME(ID,' ',0,'$CLEAR')
      CALL HBNAME(ID,CHBLOK,VARIABLE,'$SET')
[HBNAME] [HBNAMC] These calls are required as HBOOK must obtain the location at which the requested information is to be returned which is obviously not valid between programs. The first call clears all the addresses stored by HBOOK for the specified Ntuple and the second one sets the addresses for the variables in block CHBLOK starting at variable VARIABLE. The second call should be repeated for every block of which data has to be retrieved. The routine HUWFUN will generate these calls automatically in the skeleton user function.

CALL HGNTB (ID,CHBLOK,IROW,IERR*)

Action:

Retrieve information about a named block in an Ntuple row.

Input parameters:
ID
Identifier of the Ntuple.
CHBLOK
Character variable specifying the block that is to be retrieved.
IROW
Number of the row about which information is required.
Output parameter:
IERR
Error return code (=0 if row was found)

The information is restored at the addresses specified by HBNAME or HBNAMC (for CHARACTER data).

CALL HGNTV (ID,CHVAR,NVAR,IROW,IERR*)

Action:

Retrieve information about the named variables in an Ntuple row.

Input parameters:
ID
Identifier of the Ntuple.
CHVAR
Array of character variables specifying the variables that are to be retrieved.
NVAR
Number of character variables specified in CHVAR.
IROW
Number of the row about which information is required.
Output parameter:
IERR
Error return code (=0 if row was found)

The information is restored at the addresses specified by HBNAME or HBNAMC (for CHARACTER data).

You should only call HBNAME for the blocks that contain variables you want to read using HGNTV. If you call HBNAME for all blocks you should have a PAWC which is at least the same size as the one you used to create the Ntuple. If not you will run out of memory.

Also changing the buffer size will not help because the buffer used for reading will be the same size as the buffer used to write the Ntuple.

There is a special option in HBNAME with which you can tell HBNAME to only set the address for a single variable in a block (this option is used by PAW to reduce memory usage).

To set the address for a single variable call HBNAME (or HBNAMC) as follows:

      CALL HBNAME(ID, BLOCK, IADDR, '$SET:NTVAR')
This will tell HGNTV to restore the Ntuple variable NTVAR in address IADDR. Using this form of HBNAME will only reserve buffer space for the variables you plan to read and not for all variables in the block. However, you have to be careful that when you change the list of variable for HGNTV to also add or remove the correct HBNAME calls.

CALL HGNTF (ID,IROW,IERR*)

Action:

Retrieve information about all variables specified in a previous call to either HGNT, HGNTB or HGNTV, in an Ntuple row. This routine is much faster than either HGNT, HGNTB or HGNTV.

Input parameters:
ID
Identifier of the Ntuple.
IROW
Number of the row about which information is required.
Output parameter:
IERR
Error return code (=0 if row was found)

The information is restored at the addresses specified by HBNAME or HBNAMC (for CHARACTER data).

CALL HNTVDEF (ID1,IVAR,CHTAG,BLOCK,ITYPE)

Action:

Returns the definition as given in HBNAME for the variable with index IVAR in Ntuple ID1. The Ntuple must already be in memory.


next up previous contents index
Next: Generate a user Up: Get information about Previous: Retrieve the contents

Last update: Tue May 16 09:09:27 METDST 1995