source: MML/trunk/machine/THOMX/StorageRing/aoinit.m @ 5

Last change on this file since 5 was 5, checked in by zhangj, 11 years ago

ThomX MML version on the LAL server @ 17/12/2013

  • Property svn:executable set to *
File size: 3.6 KB
Line 
1function aoinit(SubMachineName)
2%AOINIT - Initialization function for the Matlab Middle Layer (MML)
3%         Set the MML path for the specific machine: THOMX storage ring.
4%
5%
6%  See Also soleilinit, setpathsoleil, updateatindex, setoperationalmode
7
8% Written by Jianfeng Zhang @ LAL  21/06/2013
9
10if exist('SubMachineName', 'var') && ~strcmpi(SubMachineName, 'StorageRing')
11    error('Wrong SubMachine %s', SubMachineName)
12end
13
14[statuss WHO] = system('whoami');
15% system gives back an visible character: carriage return!
16% so comparison on the number of caracters
17
18% The path should not be modified in standalone mode
19if ~isdeployed_local
20
21    MMLROOT = getmmlroot;
22    %MMLDATAROOT = getmmldataroot;
23   
24    % Make sure mml is high on the path
25    % why is it important
26    % August Test at this place in order not to shadow new BBA
27    addpath(fullfile(MMLROOT, 'mml'),'-begin');
28
29    addpath(fullfile(MMLROOT, 'machine', 'THOMX', 'StorageRing'));
30    addpath(fullfile(MMLROOT, 'machine', 'THOMX', 'StorageRing', 'bpm'));
31    addpath(fullfile(MMLROOT, 'machine', 'THOMX', 'StorageRing', 'quad'));
32    addpath(fullfile(MMLROOT, 'machine', 'THOMX', 'StorageRing', 'tune'));
33    %addpath(fullfile(MMLROOT, 'machine', 'SOLEIL', 'StorageRing', 'feedforward'));
34   
35    %addpath(fullfile(MMLROOT, 'machine', 'SOLEIL', 'StorageRing', 'insertions'));
36    %addpath(fullfile(MMLROOT, 'machine', 'SOLEIL', 'StorageRing', 'insertions','proc_emphu'));
37    addpath(fullfile(MMLROOT, 'machine', 'THOMX', 'StorageRing', 'loco'));
38    %addpath(fullfile(MMLROOT, 'machine', 'SOLEIL', 'StorageRing', 'FOFB'));
39    %addpath(fullfile(MMLROOT, 'machine', 'SOLEIL', 'StorageRing', 'KEM'));
40    addpath(fullfile(MMLROOT, 'machine', 'THOMX', 'StorageRing', 'orbit'));
41    %addpath(fullfile(MMLROOT, 'machine', 'SOLEIL', 'StorageRing', 'PSB'));
42    %addpath(fullfile(MMLROOT, 'machine', 'SOLEIL', 'StorageRingOpsData'));
43   
44    % APPLICATIONS
45    addpath(fullfile(MMLROOT, 'machine', 'THOMX', 'StorageRing', 'Lattices'));
46    % A. Madur BBA Applicaiton
47    %addpath(fullfile(MMLROOT, 'machine', 'SOLEIL', 'StorageRing','BBA'));
48    % MML tune BBA application
49    %addpath(fullfile(MMLROOT, 'machine', 'SOLEIL', 'StorageRing','bba_mml'));
50    %addpath(fullfile(MMLROOT, 'machine', 'SOLEIL', 'StorageRing','steerette'));
51    %addpath(fullfile(MMLROOT, 'machine', 'SOLEIL', 'StorageRing','energytunette'));
52    %addpath(fullfile(MMLROOT, 'machine', 'SOLEIL', 'StorageRing','RFPostmortem'));
53    %addpath(fullfile(MMLROOT, 'machine', 'SOLEIL', 'StorageRing','diagnostics'));
54    addpath(fullfile(MMLROOT, 'mml', 'setorbitbumpgui'));       
55    addpath(fullfile(MMLROOT, 'mml', 'setorbitgui'));       
56    %addpath(fullfile(MMLROOT, 'machine', 'SOLEIL', 'StorageRing', 'couplage')); % coupling related functions
57   
58   
59    if strncmp(WHO, 'operateur',9), % means controlroom   
60        addpath(fullfile('/home/operateur/GrpDiagnostics/matlab/FOFB', 'GUI'));
61        addpath(fullfile('/home/operateur/GrpPhysiqueMachine/Laurent/matlab', 'FOFB'));
62        disp(['TANGO/MATLAB binding version: ' tango_version])
63    else
64       % Dedicated directory for development (not operation) modes on Hyperion
65       %addpath(fullfile(getdvptdirectory, 'StorageRingDvptData'));
66       addpath(fullfile(MMLROOT, 'machine', 'SOLEIL', 'StorageRing', 'RadiaMapGui'));
67    end
68   
69    disp('Startup file for Matlab Middle Layer read with success');
70
71end
72
73% Initialize the MML for machine
74
75thomxinit;
76
77function RunTimeFlag = isdeployed_local
78% isdeployed is not in matlab 6.5
79V = version;
80if str2double(V(1,1)) < 7
81    RunTimeFlag = 0;
82else
83    RunTimeFlag = isdeployed;
84end
85
Note: See TracBrowser for help on using the repository browser.