FFEND COMMENTS
*-- Author : Stephen Burke  15/02/94
      SUBROUTINE FFEND
*-----------------------------------------Updates 15/02/94-------                                             
**: FFEND.......SB.  New routine for end-of-run printout                                                      
*-----------------------------------------Updates----------------                                             
**********************************************************************                                        
*                                                                    *                                        
* Print statistics at end of run                                     *                                        
*                                                                    *                                        
**********************************************************************                                        
*KEEP,FKNPL.                                                                                                  
*                                                                                                             
* Per-track values can go in H1WORK; note that LTRUE and LFIRST must                                          
* be set at least per event.                                                                                  
*                                                                                                             
* This is about 36k words long; the remaining common blocks are                                               
* about 3.6k in total. Some of this could be in /H1WORK/, but the                                             
* blocks would have to be reorganised.                                                                        
*                                                                                                             
* /FKPROJ/                                                                                                    
* /FKFILT/                                                                                                    
* /FKSMTH/                                                                                                    
* /FKINT/                                                                                                     
* /FKRSID/                                                                                                    
* /FKTRUE/                                                                                                    
* /FKDBG/                                                                                                     
*KEEP,FFSTEE.                                                                                                 
*KEEP,FFSCAL.                                                                                                 
* Counters                                                                                                    
*KEEP,FKCNTL.                                                                                                 
*KEEP,FFDBG.                                                                                                  
*KEEP,FKDBG.                                                                                                  
*KEND.                                                                                                        
*KEEP,BCS.                                                                                                    
*KEEP,BOSMDL.                                                                                                 
C     ------BOSMDL                                                                                            
C     ------                                                                                                  
*KEND.                                                                                                        
**********************************************************************                                        
      CALL VZERO(SEGFR,16)                                                                             
      CALL VZERO(SEGFRP,4)                                                                             
      CALL VZERO(SEGFRR,4)                                                                             
      CALL VZERO(S23FR,16)                                                                             
      CALL VZERO(S23FRP,4)                                                                             
      CALL VZERO(S23FRR,4)                                                                             
* Order is planar, radial, mixed, P?, R?                                                                      
* P0: planar, radial, mixed                                                                                   
* P1: planar, radial                                                                                          
* P2: planar, radial                                                                                          
* R0: planar                                                                                                  
* R1: planar, radial                                                                                          
* R2: planar, mixed                                                                                           
* Output LOOK histograms                                                                                      
         CALL SAREA('FTREC',0)                                                                         
         CALL FWLOOK('FFLOOKOUTPUT',IERR)                                                              
*Check print flag                                                                                             
         CALL FKEND
         CALL HPDIR('//PAWC/'//CFDBG,' ')                                                              
         CALL HPDIR('//PAWC/'//CFKDBG,' ')                                                             
         IF (IHFK.GT.0) CALL FKHPR
         CALL ERRLOG(311,'W:FFKAL:  HBOOK file open failed')                                           
      CALL HRFILE(LUNHB,'FFKAL','N')                                                                   
      CALL HCDIR('//PAWC/'//CFDBG,' ')                                                                 
      CALL HCDIR('//FFKAL',' ')                                                                        
      CALL HROUT(0,ICYC,' ')                                                                           
      CALL HCDIR('//PAWC/'//CFKDBG,' ')                                                                
      CALL HCDIR('//FFKAL',' ')                                                                        
      CALL HROUT(0,ICYC,' ')                                                                           
      CALL HCDIR('//PAWC/'//CKDBG,' ')                                                                 
      CALL HCDIR('//FFKAL',' ')                                                                        
      CALL HROUT(0,ICYC,' ')                                                                           
      CALL HCDIR('//PAWC/FPT0',' ')                                                                    
      CALL HCDIR('//FFKAL',' ')                                                                        
      CALL HROUT(0,ICYC,' ')                                                                           
      CALL HCDIR('//PAWC',' ')                                                                         
      CALL HREND('FFKAL')                                                                              
*