*************************************************************************
*     
*     Common level0_2003.f
*     
*     contains LEVEL0 ntuple variables definitions for 2003 test
*     
*     to be included in:
*     - ../readraw/readraw.F
*     - ../reduction/reduction.f
*     - !???
*     
*     10/9/2005 modified by david fedele to include general variables
*************************************************************************

      parameter (NWORDMAX=49152)

c     GENERAL block:
      integer good0             !flag to mark good or noise events

c     HEADER block:
c     header variables for each view:
      integer DAQmode(12)       !9  = full acquisition mode
                                !10 = compressed acquisition mode
                                !11 = compressed+full acquisition mode
      integer DSPnumber(12)     !view number
      integer DATAlength(12)    !data buffer length
      integer eventn(12)        !DSP event number
      integer nclust(12)        !nclust*2+1 = number of strips to be 
                                ! included in cluster
      integer cutc(12)          !cut to include strips in a cluster
      integer cutcl(12)         !cut to search for clusters
      integer addrcluster(12,3) !address of the greatest cluster(view,ladder)
      integer signcluster(12,3) !signal of the greatest cluster(view,ladder)
      integer fc(12)            !compression flag
      integer compressiontime(12) !DSP program compression time
      integer fl5(12)           !flag
      integer fl4(12)           !flag
      integer fl3(12)           !flag
      integer fl2(12)           !flag
      integer fl1(12)           !flag
      integer fl6(12)           !flag
      integer checksum(12)      !DSP header checksum
      integer pnum(12)          !peripheral number
      integer cmdnum(12)        !command number
      integer bid(12)           !board identifier
      integer alarm(12)         !alarm
      integer aswr(12)          !response length
      integer crc(12)           !DSP crc controll      

c     DATA block:
      integer TOTDATAlength     !sum of all views datalength (to assign 
                                ! dimension to datatracker array)
      integer datatracker(49152) !data tracker buffer (.DAT raw data)

      
      common/level0event/DAQmode,DSPnumber
     $     ,DATAlength,eventn,nclust,cutc,cutcl
     $     ,addrcluster,signcluster,fc,compressiontime
     $     ,fl5,fl4,fl3,fl2,fl1,fl6,checksum,TOTDATAlength
     $     ,datatracker,pnum,cmdnum,bid,alarm,aswr,good0,crc


      SAVE/level0event/
c***********************************************************
      
