1 | function 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 | |
---|
10 | if exist('SubMachineName', 'var') && ~strcmpi(SubMachineName, 'StorageRing') |
---|
11 | error('Wrong SubMachine %s', SubMachineName) |
---|
12 | end |
---|
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 |
---|
19 | if ~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', 'THOMX', 'StorageRing','BBA')); |
---|
48 | % MML tune BBA application |
---|
49 | addpath(fullfile(MMLROOT, 'machine', 'THOMX', '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 | |
---|
71 | end |
---|
72 | |
---|
73 | % Initialize the MML for machine |
---|
74 | |
---|
75 | thomxinit; |
---|
76 | |
---|
77 | function RunTimeFlag = isdeployed_local |
---|
78 | % isdeployed is not in matlab 6.5 |
---|
79 | V = version; |
---|
80 | if str2double(V(1,1)) < 7 |
---|
81 | RunTimeFlag = 0; |
---|
82 | else |
---|
83 | RunTimeFlag = isdeployed; |
---|
84 | end |
---|
85 | |
---|