Commit 166c983f authored by Zolnierczuk, Piotr's avatar Zolnierczuk, Piotr
Browse files

Merge branch 'mmtest' into merger

Resolved conflicts:
	sources/drspine.f90
	sources/new_com.F90
parents 44b1d794 7ba8d74c
Loading
Loading
Loading
Loading
+60 −6
Original line number Diff line number Diff line
@@ -75,6 +75,7 @@ program drspine
  character       :: chopt
  integer         :: istat       = 0
  integer         :: itmp
  integer         :: iunused

! constants for report functions
  real(kind=DBL), save           :: bfield_max_chi2         = 5d-6
@@ -311,7 +312,7 @@ program drspine
  mycommand = "  "
  commandloop: do

     !!>>>>

!!> TO BE DONE: check here for errors issued in the last command and perform appropriate action if available
     !!> we may introduce an extraction function 'get_last_error_codes' reporting the error code accumulated in new_com either
     !!> during comand parsing/interpretation or obtained during calls of 'unused' and 'errsig'
@@ -329,6 +330,8 @@ program drspine
        endif
     endif



     call get_progvar()

     !-------------------------------------------------------------
@@ -338,7 +341,7 @@ program drspine
     if(command('run ', &
          ' run commandline'//LF//&
          '  executes any drspine command ' //LF//&
          '  used to assemble commans from makro args $')) then
          '  used to assemble commands from makro args $')) then
        !              ===============
        call push_cmd_line(trim(vnameF(1)))
        cycle commandloop
@@ -859,6 +862,19 @@ program drspine
     call makro(mycommand)
     call unused( 2, 1, 1, ier)


 !!>>>>
 !!mmnc
    call unused( icmdus=2, ivnuse=2, irpuse=2, iretus=iunused)
    if(iunused .ne. 0) then
     call errsig(9901,"ERROR: unknown option in last command ! $")
    endif 

    if(ierrs > 0) call close_all_macros() 
    ierrs = 0
!!mmnc


  enddo commandloop

  !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@@ -882,8 +898,8 @@ CONTAINS
  subroutine cmd_clear()
    !
    logical :: clear_vars, clear_scan
    integer :: i, role, run, slot, inew
    character(len=MAX_LINE_LENGTH) :: cwhat
    integer :: i, role, run, slot, inew, iunused

    role       = ROLE_UNDEFINED
    run        = -1
@@ -910,8 +926,22 @@ CONTAINS
    slot = get_named_value('slot  ', -1, inew)
    if ( inew>0 ) clear_scan = .true.

    if (found('res')  .or. found('resolution')) role = ior(role, ROLE_REFERENCE)
    if (found('sam')  .or. found('sample')    ) role = ior(role, ROLE_SAMPLE)
    if (found('bgr')  .or. found('background')) role = ior(role, ROLE_BACKGROUND)
    if (found('data') .or. found('all'))        role = -1 ! all roles
    if (found('vars') .or. found('all'))        clear_vars = .true.
    if (role/=ROLE_UNDEFINED)                   clear_scan = .true.

!!mmnc
    call unused( icmdus=0, ivnuse=2, irpuse=2, iretus=iunused)
    if(iunused .ne. 0) then
     call errsig(9901,"ERROR: unknown option in command clear! $")
     return
    endif 
!!mmnc


    if (.not.clear_scan .and. .not.clear_vars) then
       call msg_info("drspine", "cmd_clear: nothing to clear")
       return
@@ -952,6 +982,7 @@ CONTAINS
    integer :: i, inew
    integer :: iwhat, ibins
    type(detector_struct), pointer :: detector
    integer :: iunused
    integer, parameter :: E_PIX=1,&
                          E_TOF=2
    integer, parameter :: E_NBINS=1,&
@@ -1027,6 +1058,19 @@ CONTAINS
          call create_bin_struct(tbins, tedges(1:nbins))
       end select
    end select bins


!!mmnc
    call unused( icmdus=0, ivnuse=2, irpuse=2, iretus=iunused)
    if(iunused .ne. 0) then
     call errsig(9901,"ERROR: unknown option in command bins! $")
     return
    endif 
!!mmnc




  end subroutine cmd_bins

  !> helper subroutine for cmd_histo and cmd_collect
@@ -1095,6 +1139,7 @@ CONTAINS
    !
    integer :: i, inew
    integer :: iwhat, ibins
    integer :: iunused
    logical :: log_scale
    !
    real(kind=DBL), save :: xcatch  = 0.15d0
@@ -1181,6 +1226,15 @@ CONTAINS
    case default
    end select

!!mmnc
    call unused( icmdus=0, ivnuse=2, irpuse=2, iretus=iunused)
    if(iunused .ne. 0) then
     call errsig(9901,"ERROR: unknown option in command bins! $")
     return
    endif 
!!mmnc



  end subroutine cmd_histo

+121 −480

File changed.

Preview size limit exceeded, changes collapsed.