function [ctfmodroot, datadir, madxp] = ctfsettings()

ctfmodroot = '';
datadir = '';


if (isunix())
    fprintf(1,'We are on a UNIX type machine\n')
    hn = getenv('HOSTNAME');
    username = getenv('USER');
    
    if (strcmp('ctf3op',username))
      %Here we assume we have The Control Room environment
      fprintf(1,'User name is ctf3op: we assume we have The Control Room environment\n'); 
      ctfmodroot = '/ctf/data/ctfmod';
      datadir = '/user/ctf3op/2007';
      madxp = '/ctf/data/ctfmod/madx_HEAD/madxp';
      return;
    end
    
    if (strcmp('abpc11083',hn))
      fprintf(1,'Machine name is abpc11083: we assume we have Piotr Dektop environment\n'); 
      ctfmodroot = '/home/skowron/cern/ctfmod';
      datadir = '/home/skowron/cern/ctfmod/MatLab/data';
      madxp = '/home/skowron/cern/madx/madxp';
      return;
    end
    

else
    fprintf(1,'We are on a WINDOWS type machine\n');

    ctfmodroot = 'c:/ctf3model';
    datadir = 'c:/temp';
    madxp = 'c:/ctf3model/madx/madxp.exe';

%      ctfmodroot = 'g:/users/c/ctfop/Public';
%      datadir = 'c:/temp';
%      madxp = 'G:\Users\c\ctfop\Public\ctf3emit\crorbit\madxp.exe';

end
