The HISTER program

Table of Contents

Introduction

The hister package is a simple tool to convert data in text format into HBOOK objects. So far it supports one- and twodimensional histograms, profile histograms and ( column-wise ) ntuples with fixed size arrays. The data is read from stdin or from a file.

It stores these HBOOK objects in a HBOOK-file or a global section.

The program can be downloaded from here.


Command line

hister [option [value]] [hfile]

Options:
-h Help
-f file read input from textfile
-g gsname open global section ( 4 characters only )
-l length set input line length ( default 2048 )

hfile is the name of the output HBOOK file. It may be omitted, if the -g option is set.


Input

The input consists one or several data blocks and eventually an end line. A data block consits of format lines and data lines.

For histograms the format looks like

#HIS1 id title channels min max
or
#HIS2 id title channelsx minx maxx channelsy miny maxy
or
#PROF id title channelsx minx maxx miny maxy [opt]

where opt can be S for the spread option.

For ntuples three format lines are required:

#NTUP id title [ rsiz [maxrecs]]
# type type ...
# name name ...

The record size and maximal number of records can optionally be set with the rsiz and maxrecs arguments. type can be I, R, or C*n (n<= 32) and name are the variable names for the ntuple. The variables can be arrays of up to 3 dimensions, so I(4) or R(2,3,4) are allowed.

The end line is:

#QUIT

The data lines for each object follow the definition lines and are for histograms:

x [weight]
or
x y [weight]

For ntuples the data lines contain on each line the values for one row in the ntuple.


Example for input

The following input will create two histograms, a profile histogram and one ntuple. #HIS1 1 test1 10 0 10 0 5 6 2 7 4 #HIS2 2 test2 10 0 10 10 0 10 0 1 1 1 2 2 5 7 6 9 #PROF 3 test3 10 0 10 0 10 S 1 1 1 2 1 3 2 2 5 2 4 3 2 5 7 #NTUP 10 TEST 1024 32000 #I I(2) R(2,3) C32 #a b c d 1 2 3 4.1 4.2 4.3 4.4 4.5 4.6 abcdefghki 4 5 5 7.8 7.5 7.5 7.5 6.5 5.5 abcdaTE #QUIT
Manfred Ferstl (ferstl@hermes.desy.de)
Last modified: Fri Feb 21 11:15:31 MET 1997