If this functionality isn't sufficient, there is also the ability to use COMIS (interpreted FORTRAN) to add code to the user hooks.
The program and support routines are built in the $RECOPATH area. Those using the $LABYRINTH will find the executable in $LABYRINTH_BIN.
A proto-typical maw session might look like the following:
* load some COMIS routines * do this before anything so we can attach comis hooks for/call my_file.f(1) * one time initialization reco_init * read a FFREAD data file read_ffr ! ! my_ffr_file.ffr * reset some of the flags setreco redigit 1 setreco smearfls 1 setreco xyuv 0 setreco faceon 0 * twiddle with the event display controls setmhpd usecol 0 * post-FFR, pre-file processing reco_hist * open a MINOS gaf file open_gaf gm_56110_1_av4.fz_gaf * process two events process 2 * draw the XYUV event display xyuv * search for event # 8 lookfor 8 * draw the face-on display faceon * skip some events skip 5 * process some more events process 2 xyuv * rewind the MINOS gaf file rewind_gaf skip 6 process 1 * close the MINOS gaf file; open another close_gaf open_gaf gm_56110_2_av4.fz_gaf process 3 xyuv * exit MAW exit
As usual comment lines originate with a '*'.
|Fortran hook||calls||COMIS hook|
COMIS routines look like FORTRAN with a few minor exceptions. The only critical issues are the access to common blocks and external functions/subroutines.
RECO> for/call my_file.f(args)This loads all the subroutines and functions given in the file my_file.f, but attempts to actually call only the routine named by the file (without the suffix). This provides a convenient means of loading several routines but calling none. If the file my_file.f looks like:
subroutine my_file(iarg1) implicit none integer iarg1 integer isaved1 common /mycom/ isaved1 print *,' loading the routines in my_file ',iarg1 isaved1 = iarg1 return end subroutine reco_event_comis implicit none integer isaved1 common /mycom/ isaved1 include '$LABYRINTH_INC/FLSDigit.inc' include '$LABYRINTH_INC/partap.inc' integer k,indx_corrsum real maxpe, sumpe if (isaved1.eq.1 .or. isaved1.eq.2) then maxpe = 0.0 do k = 1, COUTAB(FLSDigit) call FETTAB(FLSDigit,ID,k) if (isaved1.eq.1) then sumpe = FLSDigit_RawA + FLSDigit_RawB else sumpe = FLSDigit_CorrSum endif maxpe = max(maxpe,sumpe) enddo if (isaved1.eq.1) then print *,' max(RawSum) ',maxpe else print *,' max(CorrSum) ',maxpe endif elseif (isaved1.eq.3) then indx_corrsum = GETIND(FLSDigit,'CorrSum') call FETTAB(FLSDigit,indx_corrsum,COUTAB(FLSDigit)) print *,' max(CorrSum) ',FLSDigit_CorrSum else print *,'RECO_EVENT_COMIS: isaved1 = ',isaved1 endif return end
The command for/call my_file.f(1) calls only the routine my_file (which would then store "1" in isaved1 for future use); but it loads in the hook routine that will get called as each event is processed.
RECO> COMIS PAW CS> !show routines List of currently defined routines: .... long list follows ... CS> quit RECO>
RECO> COMIS PAW CS> !show commons List of currently defined routines: .... long list follows ... CS> quit RECO>
The commonly used command set is now ambiguous. Generally, what is desired is graph/set which sets HPLOT and HIGZ parameters. Attempting to simply type set will fail; users must modify their kumac macro files to use graph/set. I know it's a pain, but it is near impossible to hack it out.
$THESEUS/Makefile not yet updated to build user versions of maw