January 30, 1997
PAW version 2.08/14
The PAW version 2.08/14 is part of the 97A release of
CERNLIB. The source files, binaries and libraries are available, via anonymous
ftp, on the asis system:
ftp asisftp.cern.ch
The PAW team is:
- Olivier Couet,
- Nicole Cremel,
- Bernardino Ferrero Merlino,
- Carlo Vandoni,
- Gunter Folger
Contributions from:
- Vladimir Berezhnoi : COMIS
- Pierre Lecointe: Ntuples
The following subjects can be found in this page:
PAW
New routines callable from
COMIS
- FUNCTION HXE(ID,X)
Return the error of channel corresponding to abscissa X
- SUBROUTINE HF1E(ID1,X,W,E)
Fast filling entry for a 1-dim histograms. Channel is incremented by
W and error by E.
- SUBROUTINE IGQWK(IWKID,PNAME,RVAL)
This routine returns in VAL the values of the parameters asked in PNAME.
Input parameters:
INTEGER IWKID : Workstation identifier.
CHARACTER PNAME : Parameter name .
Output parameters:
REAL RVAL : Parameter value .
+-------+---------------------------------------+-------------+
| PNAME | RVAL Description | RVAL Lenght |
+-------+---------------------------------------+-------------+
|'MXDS' | Maximum display surface (XMAX YMAX) | 2 |
+-------+---------------------------------------+-------------+
|'NTNB' | Current NT number (NT) | 1 |
+-------+---------------------------------------+-------------+
|'NTWN' | Current window parameter | 4 |
+-------+---------------------------------------+-------------+
|'NTVP' | Current viewport parameter | 4 |
+-------+---------------------------------------+-------------+
|'DVOL' | Display volume in 3D (obsolete) | 3 |
+-------+---------------------------------------+-------------+
|'ACTI' | 1. if IWKID is active 0. if not | 1 |
+-------+---------------------------------------+-------------+
|'OPEN' | 1. if IWKID is open 0. if not | 1 |
+-------+---------------------------------------+-------------+
|'NBWK' | Number and list of open workstations | 11 |
+-------+---------------------------------------+-------------+
|'2BUF' | Double buffer value (X11 only) | 1 |
+-------+---------------------------------------+-------------+
|'HWCO' | Number of COlours suported by the | 1 |
| | HardWare. If 2 it is a B&W screen. | |
+-------+---------------------------------------+-------------+
|'WIID' | Returns the window identifier asso- | 1 |
| | -ciated to the workstation ID IWKID. | |
+-------+---------------------------------------+-------------+
SUBROUTINE IGQ(PNAME,RVAL)
This routine inquires the primitive attribute PNAME to the value RVAL
.
Input parameters:
CHARACTER PNAME : Parameter name .
PNAME='FAIS' RVAL=Fill Area Interior Style (0,1,2,3)
PNAME='FASI' RVAL=Fill Area Style Index
PNAME='LTYP' RVAL=Line TYPe
PNAME='BASL' RVAL=BAsic Segment Length
PNAME='LWID' RVAL=Line WIDth
PNAME='MTYP' RVAL=Marker TYPe
PNAME='MSCF' RVAL=Marker SCale Factor
PNAME='PLCI' RVAL=PolyLine Colour Index
PNAME='PMCI' RVAL=PolyMarker Colour Index
PNAME='FACI' RVAL=Fill Area Colour Index
PNAME='TXCI' RVAL=TeXt Colour Index
PNAME='TXAL' RVAL(1)=Alignment horizontal
RVAL(2)=Alignment vertical
PNAME='CHHE' RVAL=CHaracter HEight)
PNAME='TANG' RVAL=Text ANGle
PNAME='TXFP' RVAL(1)=TeXt Font
RVAL(2)=TeXt Precision
PNAME='TMSI' RVAL=Tick Marks SIze (in WC)
PNAME='LASI' RVAL=LAbels SIze (in WC)
PNAME='LAOF' RVAL=LAbels OFfset
PNAME='PASS' RVAL=IGTEXT Width
PNAME='CSHI' RVAL=IGTEXT Shift
PNAME='BORD' RVAL=Border for IGBOX, IGFBOX and IGARC (0=No , 1=Yes)
PNAME='BARO' RVAL=IGHIST or IGRAPH BAR charts Offset (%)
PNAME='BARW' RVAL=IGHIST or IGRAPH BAR charts Width (%)
PNAME='AWLN' RVAL=Axis Wire LeNght
PNAME='DIME' RVAL=2D or 3D
PNAME='NCOL' RVAL=Number of entry in the COLour map.
PNAME='RGB ' RVAL=R G B values
PNAME='CLIP' RVAL=Clipping mode: 1.=on 0.=off
Output parameters:
REAL RVAL : Parameter value .
Help improvements
New options in existing
commands
- Option 'N' in NTUPLE/PLOT:
Don't draw anything, but fill the 1D or 2D histogram
IDH. If IDH doesn't
exist it is automatically created.
- The option 'G' in NT/PLOT
is implemented with the new query processor. It allows to draw a
3 variables plot as a Gouraud shaded surface.
- The option 'S' in NT/SCAN
is implemented with the new query processor. It allows to scan a
ntuple with ``spider plots''
- Restored the 'S' option for 3d
and 4d scatter plots in the command NT/PLOT.
Obsolete commands
- NT/MERGE is obsolete, use HMERGE
instead.
- F/UNIT is suppressed it was ambiguous
with K/UNITS.
New commands and improvements
X R 'X position' D=0.
Y R 'Y position' D=0.
FILE C 'File name' D=' '
WKID I 'Workstation identifier' D=1
Loads the picture named FILE at the position X,Y in the current normalisation
transformation. X,Y is the top left corner of the picture (like in X11).
FILE should be a GIF file.
The code of the old query processor is now removed from PAW.
Old routines like hgetnt and hgetn2 used to load ntuple are now replaced
by a new single routine called hntld.
The space used in the COMIS memory after a FUNC/PLOT
FUN1 etc ... is now freed.
In the command HI/FILE, C I/O
is used on OSF.
Printing of the COMIS and KUIP versions added in the command VERSION.
The colour map is drawn in 4D scatter plots in the command NT/PLOT.
It was not allowed to do the 'S'ame
option in NT/PLOT if the previous
plot was not done with NT/PLOT. Now,
in that case, the coordinates for the 'S'ame
option are taken from the current normalisation transformation.
Bugs fixed
- With Row Wise Ntuple (RWN) the memory caching didn't work when a COMIS
function was used. For example if in a COMIS function a print of a RWNtuple
variable was done, this variable had always the same value after some events.
- The command MASK/FILE didn't
work with mask names containing a full path name like:
MASK/FILE /a/b/c/m N
The NT/READ command didn't support
the FORMAT with "/" . In
the past it did. This problem was a side effect of the new parameter MATCH.
In the NTUPLE commands when a variable was accessed in several subroutines
in a COMIS selection function AND if this variable had a name with
lower and upper case letters (in the NTUPLE data structure) the value(s)
of this variable was wrong.
Bugs due to the CAR to CVS conversion of the PAW sources:
- HI/LI on global sections didn't
work. The histograms were accessible (H/PL
works) but they cannot be listed.
- The PAW++ fitting panel didn't work properly.
FUN/PLOT with a function name
greater than 54 characters didn't work.
The following macro didn't work:
Macro cc2
Appl COMIS quit
!file xx.f77
quit
fun/plot 3.*xx(x) -1 1
The user title (OPT UTIT and
TITLE with option 'U')
was not taken into account in the NT/PLOT
command
NT/SCAN didn't work on VAX
because of a printout of more than 132 was done. Also the format used was
wrong (some characters were missing).
The locator on ntuple plots was not working properly.
The following command didn't work when the histogram 3 has the Z minimal
and maximal values equal.
v/cre x(1) r 0.1
contour 3 ! ! x
OpenVMS platforms only.
HROUT with option 'NT'
was not handled correctly (some intermediate levels were not
saved properly).
On HPUX platforms
only the command NT/SCAN
crashes when the length of the scanned line was exactly equal to 80 characters.
After ntuple commands like NT/PLOT //LUN1/10.x
the current working directory was changed
to //LUN1
The functions $CUT and
$CUTEXPAND were
disabled.
On scatter plots produced from a chain with the
NT/PLOT command,
the statistic box was not drawn even if OPT
STAT was
set.
"( )"
was missing after the function name in the
UWFUNC
generated function. This caused problems on
some machines (HP for example) when the function is used with the ".f77"
extension.
On Alpha
OSF platforms only: In
ntuple commands, logical variable equal to .TRUE. are converted to -1 when
they were used as integer or real.
On Solaris
platforms only: The
fortran ``implicit integer'' variables (beginning with I,J,K,L,M,N)
were not recognized.
In the commands FUN/PLOT, FUN1, FUN2
etc.. the fortran file with extensions (.for, f) generated an error.
Expressions like 137.**2 (power
on constants) didn't work in ntuple commands.
When the ntuple used had no events,
NTUPLE/PROJECT
produced a non empty histogram.
In some cases FILECASE KEEP was
not properly managed.
In the counting of ntuple variables used in a COMIS function, the test
to check if a variable was already counted was incorrect. I was done with
a string comparison between two strings but in a case sensitive way. Now
it is case insensitive (toupper is called).
Bug fixed by Dong Zhao:
Large Column Wise Ntuples, (400 variables, 8176 words of buffer space,
8191 words of record length) produced the following error:
PAW > hi/file 1 /proj5/qcdwz1/zee_1b/v9/data/zee_1b_1214_02.ntp_v9 0
PAW > nt/pl 10.z_mass ! 1000
***** ERROR in HNBUFR : Not enough space in memory : ID= 10
The reason is that in this new version of PAW, HBBUFR
reserves space for all the variables, in that case, 400X(8176+33)
> 2000000 PAWC , while in the older versions a call to hgetnt
was performed in which hbname(idn,'
',0,'$CLEAR') was called to reset the variables addresses.
In the new version, h_load_nt (corresponds
to the old hgetnt) didn't call hbname
to reset the addresses of the variables. The fixes be adding a line:
if ( ! PNTOLD.ntold ) HBNAME( idn, " ", 0, "$CLEAR" );
in the end of routine h_load_nt,
right before line
/* done */
This patch has been applied.
PAW++
Improvements
- In the PAW++ cuts editor the operator
'*' has been added.
- Add a protection in "Open Hbook File..."
in case the user clicks OK without entering a filename in the "Open
File" entry (otherwise it seems to crash on AIX).
- New resource "hbookfile" to
specify the extension for HBOOK files. This can now be specify by the user
in .Xdefaults, e.g.:
Paw++*hbookfile: dat
(default is "hbook").
New resource "higzMessGeometry"
to have control on the size and position of the "HigzOutput"
window (e.g. for the locator). E.g. In PAW++, to change the size
and position of this window one must add in his .Xdefaults (or
.Xresources) file the two following lines:
Paw++*kuipScroll1.defaultPosition: False
Paw++*higzMessGeometry: 200x250+650+650
This window ("HigzOutput") should
always come on top of the other(s).
Do not clear the X, Y, Z fields
in the ntuple viewer but show the former variables instead.
Bugs fixed
- In the cut editor (happened for a long cut expression when the number
of cuts was greater than 11). The problem was that cut_expression
had dimension MAX_CMD_LENGTH (512) whereas local variable cut
was MAX_STRING (80).
- Suppress the button "Previous" in PAW++ "Ntuple
Scanner" window: it cannot work with the new Query Processor.
PIAF
Improvements
- The subroutine RLOGIN has been
modified so that once the connection to PIAF is up, the PIAF
master is queried about his version using the PIAF MESSAGE command
back door.
- Handling of remote graphics routines: HPLFR3,
IGCOLM and IPM4ID
(that were previously dummied out on PIAF).
- New module to send the histogram set of labels to the master and get
back the union with similar sets found by all the slaves.
- New module to send histogram limits to the master and get back the
'global' limits.
- A new PSYNC message has been added to allow the slaves to synchronise
themselves before actually start to send to the client the points generated
by a 2D scatter plot. Synchronization takes place only among the slaves
that are working on a 'not empty' set of data.
- Code has been modified for PIAF. Whenever an error is detected
in the MINMAX command execution (e.g. Array Bound Error) a PIAF
slave sends a 'Empty Histogram' synchronization sequence. This avoids all
other slaves to be stuck if one of them detects such an error. All PIAF's
'Empty Histogram' synchronization sequence have been grouped in a set of
functions.
- When an histogram id is specified in NT/PL,
the related histogram is cleaned by HRESET
before being pushed.
- NT/SCAN on PIAF is enabled
again.
- The subroutine HLOGPF has been
modified so that the 'Logfile' coming from the PIAF master is checked
line by line before being printed on stdout. This allows to suppress
output of lines containing information that are not relevant to the PAW
user (such as PIAF server version)
Bugs fixed
PAW > nt/loop //trg95/999 prb.f77
> Ana -> Identifier 'prb.f77' is undefined
> FILE WAS NOT OPEN
> error during translation csf77-file:
> /user/dl/dinofm/piaf/prb_21079.sl
> Ana -> prb.f77
> Ana -> ^^^^^^^
In the NTUPLE commands, file names specified with "
(to remove ambiguities with
/ or ]
,see here)
didn't work on PIAF.
Ntuple commands on PIAF didn't manage properly the "Array
Bounds Error" condition, an error due to the request to access a CWN
array in a position that was not written. As an example let's suppose that
your ntuple contains, for each event, an integer variable nchannel
that can assume any value between 1 to 8 and an array chcount(8).
The value of nchannel can be different for each event and the array is
filled only up to the nchannel position (that is if nchannel=2
for an event, only chcount(1) and
chcount(2) contain meaningful values).
If you try to plot the content of the 3rd array item like in:
nt/plot 10.chcount(3)
you'll get an "Array Bounds Error" message for any event where
the third position of the array is not filled (that is nchannel was <
3 for that event). Unfortunately when such a condition arises, PIAF
looses the synchronization between slaves resulting in a hang-up. For the
time being the workaround is to avoid the condition adding one cut on the
nchannel variable:
nt/plot 10.chcount(3) nchannel>2
HBOOK
New routines and
improvements
- New function to inquire if a LUN is used by HBOOK or not.
LOGICAL FUNCTION HINQ(LUN)
Returns .TRUE. if the LUN is used by HBOOK, .FALSE. otherwise.
- Merge hseqnr.F and hseqnd.F into hseqnr.F and delete hseqnd.F. These
routines were identical, except for singe/double precision, and only one
of them is used on a given machine.
- HREBIN now allows to rebin only
one channel.
- HUWFUN generate function without
parameter. Now the number of parameters one can give to a UWFUNC
generated function is not limited. But in ntuples PAW commands the
signature of the function should match the one given in the ntuple command.
That's why it is now up to the PAW user to decide how many parameters
should be passed to the function. In the previous version the number of
parameters was limited to one floating point value.
- Modification from Detlef Irmscher (irmscher@rnchp3.lbl.gov):
HREADONEDIR now puts the tree into
the current working directory. HREADONEDIR is
a service routine for HRGET. This
routine is called by the Zebra/RZ routine RZSCAN
while scanning a RZ directory tree. It creates a directory
in memory with the same name as the directory on file. Reads histograms
in memory
- HRGET and HRPUT
call HRENDC instead of HREND.
- HROPEN call RZOPEN
with option C (C I/O). So in HBOOK programs calling HROPEN, HRENDC should be
used instead of HREND. This is important when a program is doing several
HROPEN and HREND. In such programs (new HROPEN with HREND) one may get the
message:
error in CFOPEN : Can't open configuration file
***** ERROR in HROPEN : Cannot open file :
Bugs fixed
- The computation of the errors for profile histograms was wrong in some
cases. The following macro shows the problem:
v/create xv(3) r 0.2 0.4 1.5
v/create yv(3) r 0.8 1.2 1.1
v/write xv,yv test.dat '2(1x,f5.2)'
nt/create 200 'Test ntuple' 2 ! ! x y
nt/read 200 test.dat '2(1x,f5.2)'
profile 201 'Test profile histogram 1' 2 0. 2. 0. 2.
nt/pro 201 200.y%x
v/create con1(2) r
v/create err1(2) r
h/get_vect/con 201 con1
h/get_vect/err 201 err1
v/print con1
v/print err1
The output should be:
CON1(1) = 1
CON1(2) = 1.1
ERR1(1) = 0.141421
ERR1(2) = 1.04881
Rounding problem fixed in the profile histograms filling.
The routine HRENID didn't work
when one try to rename several histograms. The following example shows
the problem:
1d 1 'test1' 100 0 1
1d 2 'test1' 100 0 1
h/file 1 a.hbook ! N
hrout *
close 1
h/file 1 a.hbook ! U
ld
call hrenid(1,10)
call hrenid(2,20)
ld
Some initialisations were missing in HPAKAD.
SUBROUTINE HPAKAD(IDD,X)
Fill histogram with array X. At the difference of HPAK which overwrites
the current channel contents by the new values in X, HPAKAD adds the new
values to the existing contents.
Modifications in shared memory mechanism for ALPHA_OSF: William Badgett,
Univ of Wisconsin (BADGETT@vxdesy.desy.de).
Bug fix from: Rainer Bartoldus (bartoldu@opalr6.physik.uni-bonn.de)
in HFNT2:
`` The problem occurred with a job that reads in a list of CW ntuples,
corrects some entries and writes out a list of new ntuples. After we observed
problems with the output files, we discovered that even without any correction
the output was different from the input. The symptom affected only signed
integer variables. It looked as if their sign had been written randomly.
However, this happened only after a certain number of input files depending
on the size of the PAWC common block (The larger the common was the later
the files were corrupted). ''
HIGZ
Bugs fixed
- The following macro didn't produced the same output on the screen and
on the PostScript file:
SET * ; OPT * | Reset the defaults
opt ZFL1
NULL 0 20 0 20 'AB' | Draw a frame (cf HELP NULL)
SET PLCI 2 | Line colour is red
SET LWID 6 | Line width is 6
SET FAIS 3 | Fill area with hatches
SET FASI 3 | Type of hatches
ARC 15 15 1 4 ! ! | Draw an arc
SET BORD 1 | Border is requested
ARC 15 5 1 4 30 ! | Draw an arc
p/print test.ps
psview test.ps
Bug fixed in the marker PS drawing: when the markers drawn were too
far from the world coordinates, invalid PS coordinates were generated.
The following macro illustrate the problem:
v/create x(5) r 0 -10000 -100000 -1000000 -10000000
v/create y(5) r 0 0 0 0 0
nul -0.0001 0.0001 -0.0001 0.0001
set mtyp 20
pmarker 5 x y
Remaining defined colours are freed in ixclsds
APOLLO/GPR driver removed.
IGTABL: When ZMIN = ZMAX
for a contour plot with a set of levels, a division by 0 occurred.
ISFAIS: protection added against
IWTYP=0
KUIP
Bugs fixed
- When using $UNQUOTE KUIP function
sometimes the following error happens:
***Break*** Segmentation violation
Open a file via a symbolic link and rfio often did not work.
Listing vectors with vector/list could cause a crash on AIX.
Problems reading 1-d vectors with pattern matching and automatic creation
of the vector did not work.
Using K/HELP could cause segmentation
violation in linux.
COMIS
Bugs fixed
- When a variable was named with the first four characters "open",
this variable might be set to zero unexpectedly. Example:
subroutine o
real openang, x
openang=acos(0.1)
print *,openang
x=acos(0.1)
print *,x
end
If this routine was called the output was:
PAW > call o.f
.0000000E+00
1.470629
The similar problem existed with variables name starting with:
pause...
write...
quit...
assign...
open...
close...
rewind...
backspace...
endfile...
inquire...
ZEBRA
- In RZOPEN the section calling
RZSTRIP is disabled.
- In RZOUT bug fixed for option
'R' handling.
- In RZREAD bug fixed for double
precision on record boundary (Marthe Brun (Marthe.Brun@cern.ch))