!
!D      Write (6,*) "      ---> StartXML/onOffSubscans.f90 "
!D      Write (6,*) "number of SS segments:   ", nSegments
!
Call pakoXMLwriteStartElement("RESOURCE","subscans",             &
     &                         comment="generated by paKo",            &
     &                         space="before",                         &
     &                         error=errorXML)
!
Do ii = 1, nSegments, 1
   !
   Write (6,*) "   -->",segList(ii)%ssType,"<--"
   Write (6,*) "   -->",segList(ii)%segType,"<--"
   If (segList(ii)%ssType.Eq.ss%on .And.                          &
        &       segList(ii)%segType.Eq.seg%track) Then
      Write (messageText,*)  "  subscan #:   ", ii," ",        &
           &        segList(ii)%ssType," ", segList(ii)%segType," ",segList(ii)%pStart
      Call pakoMESSAGE(priorityI,severityI,"OnOff Start",messageText)
      Include 'inc/startXML/trackXML.inc'
   End If
   !
   If (segList(ii)%ssType.Eq.ss%ref .And.                          &
        &       segList(ii)%segType.Eq.seg%track) Then
      Write (messageText,*)  "  subscan #:   ", ii," ",        &
           &        segList(ii)%ssType," ", segList(ii)%segType," ",segList(ii)%pStart
      Call pakoMESSAGE(priorityI,severityI,"OnOff Start",messageText)
      Include 'inc/startXML/trackXML.inc'
   End If
   !
End Do
!
Call pakoXMLwriteEndElement("RESOURCE","subscans",              &
     &                         error=errorXML)
!





