In PAW, piaf mask was not impremented. e.g. you could not create a mask file and use it in PIAF server. I impremented mask facility into PIAF recently. The use of PIAF mask differs the PAW mask only that each time open a PIAF mask, (option N, U and default) just add //piaf/ in front of a mask name, then you can use the mask without //piaf/ just like a local mask.
For piaf mask, writing a mask only allowed in sequential mode. Reading a mask can be done in both parallel and sequential mode. Usually you make a piaf mask file in piaf sequential mode, then use it in piaf parallel mode.
PAW> conn piaf d0cha 96a connect to the piaf server version 96a on D0 challenge A PAW> mode seq set sequential mode for making a new mask or update a mask PAW> cd //chain PAW> mask/file //piaf/spool2/yourname/test n creates a new mask in d0cha on file ~/piaf/spool2/yourname/test.mask once you open a mask file with option N, U or default, you can just use mask name without any path PAW> nt/pl 1.x z<0.4.and.select.f(1.)>>test(2) record selection rules to mask test bit 2 PAW> mask/close test close mask test PAW> mode par change PIAF to parallel mode PAW> mask/file //piaf/spool2/yourname/test open mask test in PIAF for READ only (default) PAW> nt/pl 1.x test(2) test(2) can replace z<0.4.and.select.f(1.) completely PAW> nt/pl 1.x test(2) 1000 plot the first 1000 eventsMask is specific to a chain or a Ntuple file, type "help mask" in PAW to see the detailed help information. Note that /ntuple/mask command in versions before PAW 96a has been replaced by a full set of commands such as /ntuple/mask/file, /ntuple/mask/close, /ntuple/mask/list etc.
Adding 77 to the selection function will invoke the native f77 compiler and dynamically link the routines to Piaf. In your selection function, you can call functions defined in your own or other libraries. In order to let Piaf know where are those libraries, you need to create a "piaf.setup" file in your home directory at Challenge.
Sample of piaf.setup file:
# sample piaf.setup file # change to your own libraries # setenv D0UNIX /d0library/unix/unix.a setenv MYLIB1 /proj4/whatever/mylib1.a setenv MYLIB2 /path/mylib2.a setenv USERLIB "$MYLIB1 $MYLIB2 $D0UNIX -lcurses"The only important environment variable is USERLIB, you must define this one. Notice that the orders of subroutines in your own libraries is important. The called routine should follow calling routine when you build your own library.
logical start
save start
data start /.true./
if (start) then
start = .false.
call ask_deb('d0sgi6')
endif
......
The argument of routine ask_deb is the name of the graphics terminal you use.
When you issue the PAW command like
PAW> nt/pl 1.x selection.f77(1.0)Piaf server will invoke Case Vision Debugger and pop up several windows in your graphics terminal, follow the instructions to do the debugging.
When use debug feature of piaf server, please use it in sequential mode.
When you analyse a chain, after master PIAF server traverses a chain to get the total number of events in this chain, all the slave servers do the same thing again for those high CPU consuming commands like nt/plot, nt/loop. While traversal a large chain with lots of members consumes lots of I/O time, the traversal of chain in slave servers can be avoided by letting master server to send the total number of events to the slave servers.
In challenge machine, FORTRAN I/O always use 2048 words as R/W units, while C I/O doesn't have this restriction. For a large record length in Ntuple, using C I/O would be more efficient that using FORTRAN I/O, I changed FORTRAN I/O to C I/O in routine pchrop.f which is used to open the chain member files.
| PAW> conn piaf d0cha | |