next up previous contents index
Next: Global Filling Up: Filling Operations Previous: Filling Operations

Fast Filling Entries

 

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.

CALL HF1 (ID,X,WEIGHT)

Action: Analogous to HFILL on a 1-dimensional histogram but HBARX and HIDOPT(ID,'STAT')STAT are ignored.

Input parameters:
ID
histogram identifier
X
value of the abscissa
WEIGHT
event weight

CALL HF1E (ID,X,WEIGHT,ERRORS)

Action: Analogous to HF1, but also the errors are accumulated.

Input parameters:
ID
histogram identifier.
X
value of the abscissa.
WEIGHT
the content is incremented by WEIGHT.
ERROR
the error is incremented by 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

CALL HF2 (ID,X,Y,WEIGHT)

Action: Analogous to HFILL on a 2-dimensional histogram except that projections, bands, slices are not filled. HBARY is ignored as well.

Input parameters:
ID
histogram identifier
X
value of the abscissa
Y
value of the ordinate
WEIGHT
event weight

CALL HFF1 (ID,*NID*,X,WEIGHT)

Action: Analogous to HF1 with the same restrictions. Cannot be used for variable-bin-width histograms.

Input parameters:
ID
histogram identifier
NID
is a histogram-specific variable that has to be provided by the user.
Before the first call, NID must be initialized to 0.
In subsequent calls to HFF1 the constant NID must then be used in order to skip the calculation of the histogram address.
X
value of the abscissa
WEIGHT
event weight
Output parameter:
NID
After the first call to HFF1, NID will contain the current address of histogram ID.

CALL HFF2 (ID,*NID*,X,Y,W)

Action: Analogous to HF2 with the use of the parameter NID as explained for HFF1.

CALL HFPAK1 (ID,NID,V,N)

     

Action: Fill an histogram using the contents of a vector.

Input parameters:
ID
histogram identifier
V
array containing the values to be entered into the histogram.
N
length (dimension) of the array V
Input/output parameter:
*NID*
address of histogram (see HFF1)

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.

CALL HIPAK1 (ID,NID,IV,N)

     

Action: Analogous to HFPAK1, except that the user vector contains now integers instead of real numbers.


next up previous contents index
Next: Global Filling Up: Filling Operations Previous: Filling Operations

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