source: MML/trunk/mml/setpathat.m @ 4

Last change on this file since 4 was 4, checked in by zhangj, 10 years ago

Initial import--MML version from SOLEIL@2013

File size: 1.2 KB
Line 
1function setpathat(ROOTDir)
2%SETPATHAT - Sets the AT Toolbox path
3%  setpathat
4
5if nargin == 0
6    if isempty(getenv('ATROOT'))
7        [DirectoryName, FileName, ExtentionName] = fileparts(which('getsp'));
8        i = findstr(DirectoryName,filesep);
9        ROOTDir = [DirectoryName(1:i(end)), 'at'];
10       
11        if ~isdir(ROOTDir)
12            warning('   AT path has not been set.');
13            return;
14        end
15    else
16        ROOTDir = getenv('ATROOT');
17    end
18end
19
20
21olddir = pwd;
22cd(ROOTDir);
23atpath(ROOTDir);
24cd(olddir);
25
26   
27% if nargin == 0
28%     [DirectoryName, FileName, ExtentionName] = fileparts(which('getsp'));
29%     i = findstr(DirectoryName,filesep);
30%     if isempty(i)
31%         ROOTDir = DirectoryName;
32%     else
33%         ROOTDir = DirectoryName(1:i(end));
34%     end
35% end
36%
37% addpath(fullfile(ROOTDir,'at','atdemos'),'-begin');
38% addpath(fullfile(ROOTDir,'at','atphysics'),'-begin');
39% addpath(fullfile(ROOTDir,'at','atgui'),'-begin');
40% addpath(fullfile(ROOTDir,'at','simulator','element'),'-begin');
41% addpath(fullfile(ROOTDir,'at','simulator','track'),'-begin');
42% addpath(fullfile(ROOTDir,'at','lattice'),'-begin');
43% addpath(fullfile(ROOTDir,'at','dev'),'-begin');
Note: See TracBrowser for help on using the repository browser.