Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SCDDS-core
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SPC
SCDDS
SCDDS-core
Commits
efacc5f5
Commit
efacc5f5
authored
4 years ago
by
Cristian Galperti
Browse files
Options
Downloads
Patches
Plain Diff
tolerate params whose mdsopen fails
parent
b04aeb9f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
code/classes/SCDclass_mdspar.m
+24
-6
24 additions, 6 deletions
code/classes/SCDclass_mdspar.m
with
24 additions
and
6 deletions
code/classes/SCDclass_mdspar.m
+
24
−
6
View file @
efacc5f5
...
@@ -103,7 +103,7 @@ classdef SCDclass_mdspar < matlab.mixin.Heterogeneous
...
@@ -103,7 +103,7 @@ classdef SCDclass_mdspar < matlab.mixin.Heterogeneous
% Not abstract methods common to all child classes
% Not abstract methods common to all child classes
methods
methods
function
mdsconnect
(
obj
,
shot
)
function
obj
=
mdsconnect
(
obj
,
shot
)
assert
(
~~
exist
(
'mdsconnect'
,
'file'
),
...
assert
(
~~
exist
(
'mdsconnect'
,
'file'
),
...
'SCD:NoMDS'
,
'mdsconnect not found, are the mds matlab tools installed?'
)
'SCD:NoMDS'
,
'mdsconnect not found, are the mds matlab tools installed?'
)
mdsconnect
(
obj
.
mdsserver
);
mdsconnect
(
obj
.
mdsserver
);
...
@@ -117,8 +117,26 @@ classdef SCDclass_mdspar < matlab.mixin.Heterogeneous
...
@@ -117,8 +117,26 @@ classdef SCDclass_mdspar < matlab.mixin.Heterogeneous
localshot
=
shot
;
localshot
=
shot
;
end
end
s
=
mdsopen
(
obj
.
mdstree
,
localshot
);
s
=
mdsopen
(
obj
.
mdstree
,
localshot
);
str
=
sprintf
(
'SCDclass_mdsparam (%s), failed opening MDS+ tree'
,
obj
.
modelparam
);
openok
=
true
;
assert
(
s
==
localshot
,
str
);
if
isempty
(
s
)
openok
=
false
;
end
if
openok
if
~
isnumeric
(
s
)
||
s
~=
localshot
openok
=
false
;
end
end
if
openok
if
s
~=
localshot
openok
=
false
;
end
end
if
~
openok
warning
(
'SCDclass_mdspar:MDSerror'
,
'MDS+ tree open error for parameter %s. Actualization skipped.'
,
obj
.
modelparam
);
obj
.
actualizable
=
false
;
end
%str=sprintf('SCDclass_mdsparam (%s), failed opening MDS+ tree', obj.modelparam);
%assert(s==localshot, str);
end
end
function
obj
=
setactualizecmds
(
obj
,
shot
)
function
obj
=
setactualizecmds
(
obj
,
shot
)
...
@@ -134,11 +152,11 @@ classdef SCDclass_mdspar < matlab.mixin.Heterogeneous
...
@@ -134,11 +152,11 @@ classdef SCDclass_mdspar < matlab.mixin.Heterogeneous
function
obj
=
preactualizecommon
(
obj
,
shot
)
function
obj
=
preactualizecommon
(
obj
,
shot
)
if
(
~
obj
.
unlinked
)
if
(
~
obj
.
unlinked
)
% Opening the tree
% Opening the tree
obj
.
mdsconnect
(
shot
);
obj
=
obj
.
mdsconnect
(
shot
);
% Checking if data can be retrieved, updating get command
if
~
obj
.
actualizable
,
return
;
end
% Checking if data can be retrieved, updating get command
[
obj
,
obj
.
value
]
=
obj
.
getdata
(
shot
);
[
obj
,
obj
.
value
]
=
obj
.
getdata
(
shot
);
if
~
obj
.
actualizable
,
return
;
end
if
~
obj
.
actualizable
,
return
;
end
obj
=
obj
.
setactualizecmds
(
shot
);
obj
=
obj
.
setactualizecmds
(
shot
);
end
end
end
end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment