next up previous contents
Next: Special notes for Up: Some Advanced Features Previous: Some Advanced Features

Histogram Manipulations

In the past, three histogram packages are in use within CDF. As of version_9.03 of Analysis_Control HBOOK is the only supported package. HBOOK is the latest CERN histograming package. Output files produced in A_C can be viewed and manipulated with PAW (another popular CERN product). This is mainly a batch oriented package however the user may choose to link in the HPLOT package and interactively view histograms through the module's talk-to entry point (as is done for some online consumers). Another package, YHIST, was developed primarily for use in an interactive graphics environment (used by other consumers) and offers compatibility with the YBOS data management package in use throughout CDF. The other package, HBOOK3 was available for backwards compatibility. Because of this the user can specify from within BUILD_JOB whether he wants HBOOK, or YHIST to be initialised. (The default is to initialise HBOOK, and it should be left this way unless the user really wants to link a run 1 online consumer.) BUILD_JOB will also allow the user to specify the size of the storage space associated with each histogram package. ANALYSIS_CONTROL then provides a means of enabling, disabling, clearing, deleting and writing (on demand) histograms on a module by module basis, from inside the executable image. HBOOK files are used for temporary storage buffers if N-tuples are booked. For this reason you must open the file before you book the N-tuples and begin analysis. You can then write to them at any time. For YHIST, histograms are output as a volume and folder (which can later be examined using the YHIST display program).

In order to use the histogram manipulation features in ANALYSIS_CONTROL, the module's author must do the following things:

  1. Since ANALYSIS_CONTROL allows the user to deactivate or delete histograms from within the analysis job, the user's code should check if the modules histograms are active before it tries to fill them. This check is done by making following function call:

    HISTAT = ANGHAC()

    HISTAT will give a value of .TRUE. if the histograms for the module are both booked and enabled and a value of .FALSE. otherwise. A similar logical function ANGHBO tells whether the histograms for the module have been booked.

  2. In general, the author should let the booking of histograms be done by the analysis driver from the module's booking entry-point. If, however, histograms are an integral part of the analysis done by the module (for example, if histograms are used to store information essential for the operation of the module), the author can call his booking routine within his own code. If he does so, he should inform the package that this has been done by making the following call:

    STATUS = ANPHST(HISTAT) or

    STATUS = ANALYSIS_PUT_HIST_STATUS(HISTAT)

    where HISTAT is .TRUE. if the module has just booked its own histograms and .FALSE. if the module has just deleted its histograms.

  3. Let ANALYSIS_CONTROL make all calls to HLIMIT, HROPEN, HROUT, etc. The only calls a user module should have to make are booking calls in the booking entry-point and fill calls in the event entry-point.
Warning: Analysis_control does not by default book histograms. Users wishing histograms enabled must do so using the HISTOGRAM ON command. (Note: this is not true of calibration users. See section 5.6 for details.)



next up previous contents
Next: Special notes for Up: Some Advanced Features Previous: Some Advanced Features



sexton@fnal.gov