There are a number of flags set by the analysis driver which must be accessed by individual modules. In addition, there are some cases where an individual module must inform the package of its current status. This appendix contains a list of the routines used to pass information between modules and the ANALYSIS_CONTROL driver. Routines used by the modules to query the driver all have short names of the form ANGXXX and long names of the form ANALYSIS_GET_XXX. Routines that pass information to the driver have short names ANPXXX and long names ANALYSIS_PUT_XXX.
The following routines are functions, where the function value returned is the relevant flag:
where PARSET is an integer variable giving the parameter set that should be used by the current module.
where PATHID is an integer variable giving the value of the currently active path.
where HISTAT is a logical variable that is true if the histograms for the current module are booked.
where HISTAT is a logical variable that is true is the histograms for the current module are active.
where PASS is a logical variable that is true if module MODNAM with parameter set PARSET passed the current event if that module was run with that parameter set. If this module was not run in the current analysis it will check to see if it ever was. If it was and the TAGB banks were left on the input file it will tell you if the event passed in the previous analysis.
where PRTLEV is an integer variable that is the print level for the current module
where DBGLEV is an integer variable that is the debug level for the curent module
where MODNAM is a character variable that contains the name of the current module. Note: an error will be signalled if MODNAM is not a long enough character string.
where PSNAME is a character variable that contains the name of the current parameter set. Note: an error will be signalled if PSNAME is not a long enough character string.
where RECTYP is an integer variable containing the record type of the current record in BCS.
where TOTEVT is an integer variable that is the total number of events processed thus far.
where INSTAT is the current input IO status for the current input module (see A_C$LIBRARY: ANERROR.INC for its possible values).
where FINAME is the name of the current input file name. Note, an error will be returned if the file name has to be truncated, and FINAME will be blank.
where FIOPEN is a logical variable which is true if the input file is open.
where LUN is the logical unit number currently being used for the input file.
where MODNAM is the name of the currently active input module.
where FINAME is the name of the current output file name for stream STREAM. Note, an error will be returned if the file name has to be truncated, and FINAME will be blank.
where STRING is the current prompt string being used by Analysis_Control's main menu.
where NPAR is the number of parameters sets returned in PARLST and PARLST is an array containing a list of all used parameter sets for the currently active module.
where DEFAULT is true if the default path is the only path currently defined for the job.
where COMLIN is a string containing the arguments specified on the program command line and COMLEN is the length of the string.
where PSNAME and PSNUMB are the name and number of the parameter set
module MODNAM was most recently run with. For example:
USE TRCONTROL/PAR=ELETR_VI ... ELCTRN/PAR=ELEVII
now ELCTRN calls regional tracking (TRREGN) but TRREGN doesn't want
to know the current parameter set which is ELEVII it wants to know
the parameter set that was last used by TRCONTROL. TRREGN then
calls:
STATUS = ANGOPS('TRCONTROL',PSNAME,PSNUMB)it will return PSNAME = ELETR_VI and PSNUMB = <the_corresponding_number>. If TRCONTROL was not executed for the current event (say it was not in the path or any previous path) then STATUS will not equal ANSUCC.
where STREAM is the stream id for which the information should
be returned. The following are RETURNED arguments: TOPDIR is
the Top directory string, FILNAM is the Filename string that
the user typed in with the "HIST OPEN..." command and OPOPT is
a character*2 variable indicating the open option as described
as CHOPT in the documentation for HROPEN.
An example set of calls to book Ntuples is:
NBUFF = 10000
STATUS = ANGTH4(1,TOPDIR,FILNAM,OPNOPT)
CALL HBOOKN(NID,TITLE,NVAR,TOPDIR,NBUFF,CHAR)
Note that stream 1 is specified. This will always work if the user uses the defaults at the ANA>> prompt.
where STREAM is the stream id for which the information should be returned, HBKLUN is the LUN the HBOOK file was opened with, RZRECL is value of RZ Record length (in longwords) specified by the user on the "HIST OPEN/RECL=.../MAXNREC=..." command line and MXNREC is the value of Max number of records specified. If these values were not specified the defaults are returned.
where NGOOD is the number of good events thus far. This is defined as the number of events that pass the first path. This is the number that is checked when the user specifies "BEGIN/GOOD_EVENTS=..."
This routine returns the number of paths and the status of each for the current event (true=pass, false=fail). So NPATH is the number of paths in the job and PSTAT is a locical array containing the path status values indexed by path number. NOTE: This routine can only return the status of paths that have already exeucted for the current event. Otherwise the results will be unreliable.
where RAWFIL is the name of the raw file that the current event was originally written to.
where LABEL is the name of current input tape label or 'DISK' if a tape is not being used.
where LABMAX is the maximum number of output labels to return, NLABEL is the actual number of labels returned and LABELS is a text array containing the names of all the current output tape labels or 'DISK'.
where NDIM is the dimension of BNKLST which is a character*4 array of bank names that are required input banks for the current module. NUSED is the number of banks returned.
where NDIM is the dimension of BNKLST which is a character*4 array of bank names that are required input banks for the current module. NUSED is the number of banks returned.
where BNKLST is a character*4 array of dimension NDIM. The routine fills this array with a list of the banks that are to be calibrated. NUSED is the number of banks in the returned list. Note: an error is signaled if the number of banks to be calibrated is larger than NDIM.
Where WRITIT is a logical variable that is set to true if the writin of calibration database temporary files is enabled.
Where WRITIT is a logical variable that is set to true if the writing of calibration database accepted files is enabled.
Where WRITIT is a logical variable that is set to true if the writing of calibration database summary files is enabled.
where CHKREF is a logical variable set to true if the module should compare its calibration results with a reference file and create a bad channel list.
where VIEWIT is a logical variable that is set true if the module should display results of the calibration at the terminal.
where HISTAT is a logical variable that is set true if the module has booked its own histograms and false if it has deleted its histograms.
where INSTAT is the valid analysis contol error status that the module would like to signal.
where FIOPEN is a logical variable which is true if the module wants to signal that the input file is open.
where PRTLEV is the desired print level for the current module.
This function sets Asynchronous Input if appropriate. Asynchronous Input is not enabled if input is being taken from a batch file or an Indirect Command File is being executed.
where STRING is the desired input string to be inserted into the input buffer. This function can only be used if a prior call to ANASIN has enabled Asynchronous input mode. The text string is inserted before any text that still remains in the input buffer.
This function restores Synchronous Input mode.
where STRING is the prompt string to be used by Analysis_Control's main menu. This function allow the user to change the prompt from the standard ANA>> prompt.
associates a name (character string with no imbedded spaces) with a parameter set number. PARSET is the number of the parameter set and PSNAME is the name.
where GOOD_EVENT is a logical variable.
This call should be used by filter modules to specify
whether the current event has passed the filter. A TAGB bank for the
current module will be created with the global accept bit set if the
variable, GOOD_EVENT is .TRUE., if .FALSE. the global accept bit is clear.
If the filter is a select fitler and the global accept bit is cleared,
event analysis will be aborted if filtering for the current module is enabled.
Similarly, these conditions will prevent the event from being output if the
OUTPUT SELECT EVENT/FILTER=<module>
command has been given in Analysis_Control. Inverse logic is used on the global accept bit if the filter is a veto filter. See the FILLTER/SPECIFY command.
where NWORDS is an integer indicating the number of longwords in the MASK array. MASK is an integer array used as a bit mask that can be used to further classify the event beyond good or bad. This call will create a TAGB bank for the current module and add the passed information (ie. the MASK) to it. This information can then be used by Analysis_Control for INPUT selection in a secondary analysis job. Currently OUTPUT selection and path control only use the global accept bit which is defined to be the zero'th bit of the first mask word. This means that ANPTRG and ANFTAG produce the same effect if only this bit is used and that only one of the two routines should be used by a given filter module, otherwise there will be confusion.
where MODNAM is the desired module name, and PARSET is an integer indicating a valid parameter set number. This pair of input parameters specifies which TAGB mask should be retrieved. NWORDS is an integer indicating the number of longwords in the MASK integer array, and MASK is the desired mask. If the appropriate TAGB bank is not found in the data stream all mask words will be set to zero and STATUS will be returned as ANNOBK.