anchor.diff:  #endif
   
     case(16)
  -    if(nSplit > 0)  coll_db = lnSPlit(1)
  -    if(nSplit > 1)  call chr_cast(lnSPlit(2), ibeam, iErr)
  +    if(nSplit > 0)  coll_db = lnSplit(1)
  +    if(nSplit > 1)  call chr_cast(lnSplit(2), ibeam, iErr)
   
     case(17)
  -    if(nSplit > 0)  call chr_cast(lnSPlit(1), dowritetracks,iErr)
  -    if(nSplit > 1)  call chr_cast(lnSPlit(2), cern,         iErr)
  -    if(nSplit > 2)  castordir = lnSPlit(3)
  -    if(nSplit > 3)  call chr_cast(lnSPlit(4), jobnumber,    iErr)
  -    if(nSplit > 4)  call chr_cast(lnSPlit(5), sigsecut2,    iErr)
  -    if(nSplit > 5)  call chr_cast(lnSPlit(6), sigsecut3,    iErr)
  +    if(nSplit > 0)  call chr_cast(lnSplit(1), dowritetracks,iErr)
  +    if(nSplit > 1)  call chr_cast(lnSplit(2), cern,         iErr)
  +    if(nSplit > 2)  castordir = lnSplit(3)
  +    if(nSplit > 3)  call chr_cast(lnSplit(4), jobnumber,    iErr)
  +    if(nSplit > 4)  call chr_cast(lnSplit(5), sigsecut2,    iErr)
  +    if(nSplit > 5)  call chr_cast(lnSplit(6), sigsecut3,    iErr)
   
     case default
       write(lout,"(a,i0,a)") "COLL> ERROR Unexpected line ",iLine," encountered."
  
positive.code: !                  endif
  !CB
  
        if(n_slices.gt.one .and. totals.gt.smin_slices .and. totals.lt.smax_slices .and. &
   &      (cdb_cNameUC(icoll)(1:4).eq.'TCSG' .or. cdb_cNameUC(icoll)(1:3).eq.'TCP' .or. cdb_cNameUC(icoll)(1:4).eq.'TCLA'.or. &
   &       cdb_cNameUC(icoll)(1:3).eq.'TCT' .or. cdb_cNameUC(icoll)(1:4).eq.'TCLI'.or. cdb_cNameUC(icoll)(1:4).eq.'TCL.'.or.  &
  !     RB: added slicing of TCRYO as well
  
negative.code:   end if
    if(nSplit == 0) return
  
    select case(lnSplit(1))
  
    case("DOCOLL")
      do_coll = .true.
  
    case("ENERGY")
      if(nSplit /= 2) then
        write(lout,"(a,i0)") "COLL> ERROR ENERGY expects 1 value, got ",nSplit-1
        iErr = .true.
        return
      end if
      call chr_cast(lnSplit(2), myenom, iErr)
  
    case("DIST_TYPE")
      if(nSplit /= 2) then
        write(lout,"(a,i0)") "COLL> ERROR DIST_TYPE expects 1 value, got ",nSplit-1
        iErr = .true.
        return
      end if
      call chr_cast(lnSplit(2), do_thisdis, iErr)
      if(do_thisdis < 0 .or. do_thisdis > 6) then
        write(lout,"(a,i0)") "COLL> ERROR DIST_TYPE must be between 0 and 6, got ",do_thisdis
        iErr = .true.
        return
      end if
  
    case("DIST_PARAM")
      if(nSplit /= 5 .and. nSplit /= 7) then
        write(lout,"(a,i0)") "COLL> ERROR DIST_PARAM expects 4 or 6 values, got ",nSplit-1
        iErr = .true.
        return
      end if
      if(nSplit > 1)  call chr_cast(lnSplit(2), mynex,       iErr)
      if(nSplit > 2)  call chr_cast(lnSplit(3), mdex,        iErr)
      if(nSplit > 3)  call chr_cast(lnSplit(4), myney,       iErr)
      if(nSplit > 4)  call chr_cast(lnSplit(5), mdey,        iErr)
      if(nSplit > 5)  call chr_cast(lnSplit(6), enerror,     iErr)
      if(nSplit > 6)  call chr_cast(lnSplit(7), bunchlength, iErr)
  
    case("DIST_FILE")
      if(nSplit /= 2) then
        write(lout,"(a,i0)") "COLL> ERROR DIST_FILE expects 1 value, got ",nSplit-1
        iErr = .true.
        return
      end if
      filename_dis = lnSplit(2)
  
    case("NSIG_FAM")
      if(nSplit /= 3) then
        write(lout,"(a,i0)") "COLL> ERROR NSIG_FAM expects 2 values, got ",nSplit-1
        write(lout,"(a)")    "COLL>       NSIG_FAM name nsig"
        iErr = .true.
        return
      end if
      if(len_trim(lnSplit(2)) > cdb_fNameLen) then
        write(lout,"(2(a,i0))") "COLL> ERROR NSIG_FAM family name can be maximum ",cdb_fNameLen,&
          " characters, got ",len_trim(lnSplit(2))
        iErr = .true.
        return
      end if
      call chr_cast(lnSplit(3),rTmp,iErr)
      call cdb_addFamily(lnSplit(2),rTmp,famID,fErr)
      if(fErr) then
        write(lout,"(a,i0)") "COLL> ERROR NSIG_FAM family '"//trim(lnSplit(2))//"' defined more than once"
        iErr = .true.
        return
      end if
  
    case("JAW_SLICE")
      if(nSplit /= 6) then
        write(lout,"(a,i0)") "COLL> ERROR JAW_SLICE expects 5 values, got ",nSplit-1
        write(lout,"(a)")    "COLL>       JAW_SLICE n_slices smin smax recenter1 recenter2"
        iErr = .true.
        return
      end if
      call chr_cast(lnSplit(2), n_slices,   iErr)
      call chr_cast(lnSplit(3), smin_slices,iErr)
      call chr_cast(lnSplit(4), smax_slices,iErr)
      call chr_cast(lnSplit(5), recenter1,  iErr)
      call chr_cast(lnSplit(6), recenter2,  iErr)
  
    case("JAW_FIT1")
      if(nSplit /= 8) then
        write(lout,"(a,i0)") "COLL> ERROR JAW_FIT1 expects 7 values, got ",nSplit-1
        write(lout,"(a)")    "COLL>       JAW_FIT1 fit1.1 fit1.2 fit1.3 fit1.4 fit1.5 fit1.6 scale"
        iErr = .true.
        return
      end if
      call chr_cast(lnSplit(2), jaw_fit(1,1),iErr)
      call chr_cast(lnSplit(3), jaw_fit(1,2),iErr)
      call chr_cast(lnSplit(4), jaw_fit(1,3),iErr)
      call chr_cast(lnSplit(5), jaw_fit(1,4),iErr)
      call chr_cast(lnSplit(6), jaw_fit(1,5),iErr)
      call chr_cast(lnSplit(7), jaw_fit(1,6),iErr)
      call chr_cast(lnSplit(8), jaw_ssf(1),  iErr)
  
    case("JAW_FIT2")
      if(nSplit /= 8) then
        write(lout,"(a,i0)") "COLL> ERROR JAW_FIT2 expects 7 values, got ",nSplit-1
        write(lout,"(a)")    "COLL>       JAW_FIT2 fit2.1 fit2.2 fit2.3 fit2.4 fit2.5 fit2.6 scale"
        iErr = .true.
        return
      end if
      call chr_cast(lnSplit(2), jaw_fit(2,1),iErr)
      call chr_cast(lnSplit(3), jaw_fit(2,2),iErr)
      call chr_cast(lnSplit(4), jaw_fit(2,3),iErr)
      call chr_cast(lnSplit(5), jaw_fit(2,4),iErr)
      call chr_cast(lnSplit(6), jaw_fit(2,5),iErr)
      call chr_cast(lnSplit(7), jaw_fit(2,6),iErr)
      call chr_cast(lnSplit(8), jaw_ssf(2),  iErr)
  
    case("EMIT","EMITTANCE")
      if(nSplit /= 5) then
        write(lout,"(a,i0)") "COLL> ERROR EMIT expects 4 values, got ",nSplit-1
        write(lout,"(a)")    "COLL>       EMIT ex_dist ey_dist ex_colgap ey_colgap"
        iErr = .true.
        return
      end if
      call chr_cast(lnSplit(2), emitnx0_dist,   iErr)
      call chr_cast(lnSplit(3), emitny0_dist,   iErr)
      call chr_cast(lnSplit(4), emitnx0_collgap,iErr)
      call chr_cast(lnSplit(5), emitny0_collgap,iErr)
  
    case default
      ! If we reached this point, we probably have an old style collimation block
      goto 10
  
    end select
  
    return
  
    !  Parse old style COLL block
    ! ============================
  10 continue
  
    select case(iLine)
  
    case(1)
  