If the program that is using HBOOK fills many histograms several times a substantial fraction of time can be spent by HFILL in searching for the histogram it has to fill, deciding which type of histogram it is and unpacking and packing bits if more than one channel is to be stored in one computer word. To reduce the overall filling time, there are several actions that can be taken
For these reasons it is recommended to use always HFILL at the development stage, and replace it later with HF1, HF2, etc. only when a rather stable program is going to be used extensively.
Calls to HFILL and HF1 or HF2
cannot be mixed on the same ID
.
Action: Analogous to HFILL on a 1-dimensional histogram
but HBARX and HIDOPT(ID,'STAT')
STAT are ignored.
CALL HF1E (ID,X,WEIGHT,ERRORS)
Action: Analogous to HF1, but also the errors are accumulated.
WEIGHT
.
ERROR**2
.
===> HF1E Fills a 1-D histogram
SUBROUTINE HF1E(ID,X,W,E)
- ID : Histogram identifier. - X : Value of the abscissa - W : Content is incremented by W - E : Errors is incremented by E**2
Action: Analogous to HFILL on a 2-dimensional histogram except that projections, bands, slices are not filled. HBARY is ignored as well.
Action: Analogous to HF1 with the same restrictions. Cannot be used for variable-bin-width histograms.
NID
must be initialized to 0.NID
must then be used in order
to skip the calculation of the histogram address.
NID
will contain the current address
of histogram ID
.
Action: Analogous to HF2 with the use of the parameter
NID
as explained for HFF1.
Action: Fill an histogram using the contents of a vector.
V
This subroutine has the same effect as
DO 10 I=1,N 10 CALL HFF1(ID,NID,V(I),1.)
where the array V
of N
words must have been filled
previously by the user.
Action: Analogous to HFPAK1, except that the user vector contains now integers instead of real numbers.