function [gptdir,bsfs] = getgptdir
% Function GETGPTDIR
%
%    [gptdir,bsfs] = getgptdir
%
%    GETGPTDIR returns the directory containing the GPT data, based upon the
%    system in use.  This assumes that the GPT data directory is stored in
%    the same location on a given machine.
%
%    [GPTDIR] = GETGPTDIR returns a string, GPTDIR, containing the GPT data
%    directory information.
%
%    [GPTDIR,BSFS] = GETGPTDIR also returns a string, BSFS, with a forward
%    slash or backslash, depending on the system type, to enable correct
%    file referencing.

    if nargout > 2
        error('Can only specify two output argument: [gptdir,bsfs] = getgptdir') ;
    end

    comptype = computer ;
    curdir = cd ;
    bsfs = filesep ;

    if isunix
        [status hostname] = system('hostname | cut -d . -f1') ;
        hostname(end) = [] ;
        switch hostname
            case ('heppc222')
                gptdir = ('/Volumes/WINDATA/General Particle Tracer') ;
            case ('heppc53')
                gptdir = ('/Volumes/WINDOWS/General Particle Tracer') ;
            otherwise
                gptdir = (curdir) ;
        end
    elseif ispc
        cd('C:\') ;
        [status hostname] = system('hostname') ;
        hostname(end) = [] ;
        switch hostname
            case {'heppc222','HEPPC222'}
                gptdir = ('D:\General Particle Tracer') ;
            case 'fetsmac'
                gptdir = ('D:\General Particle Tracer') ;
            case ('heppc230')
                gptdir = ('E:\General Particle Tracer') ;
            case ('NDW250')
                gptdir = ('D:\General Particle Tracer') ;
            case ('jollymac')
                gptdir = ('C:\General Particle Tracer') ;
            otherwise
                gptdir = (curdir) ;
        end
        cd(curdir) ;
    else
        gptdir = ('Unknown') ;
    end

    return