Skip to content
Snippets Groups Projects
Commit bf119b72 authored by Cristian Galperti's avatar Cristian Galperti Committed by Federico Felici
Browse files

SCDclasses modified accordingly

parent af7c38cc
No related branches found
No related tags found
No related merge requests found
......@@ -623,9 +623,10 @@ classdef SCDclass_expcode
if(~ismember(algo.getname,obj.algonamelist))
obj.algonamelist{end+1}=algo.getname;
obj.algos{end+1}=algo;
present=false;
else
warning('SCDclass_expcode:addalgorithm','algorithm ''%s'' already present in the expcode, skipping!',algo.getname);
return;
warning('SCDclass_expcode:addalgorithm','algorithm ''%s'' already present in the expcode, importing only wavegens',algo.getname);
present=true;
end
% Importing algorithm MDS objects into the main mdscontainer,
......@@ -633,8 +634,13 @@ classdef SCDclass_expcode
algomdscontainer=algo.getmdscontainer;
basewgstruct=sprintf('SCDsimdata.SCDnode%02d%02d_simdata.wavegen', node, cpu);
algomdscontainer=algomdscontainer.setwavegenbasestruct(basewgstruct);
obj.mdscontainer=obj.mdscontainer.importmdsobjects(algomdscontainer);
if ~present
obj.mdscontainer=obj.mdscontainer.importmdsobjects(algomdscontainer);
else
obj.mdscontainer=obj.mdscontainer.importmdswavegens(algomdscontainer);
return;
end
% Importing exported tps
algoexptps=algo.getexportedtps;
if(numel(algoexptps)>0)
......@@ -673,7 +679,7 @@ classdef SCDclass_expcode
for jj=1:numel(obj.fpinits)
for kk=1:numel(obj.fpinits{jj}{2})
if(strcmp(char(obj.fpinits{jj}{2}{kk}),fpinits{ii}{2}))
warning('SCDclass_expcode:addalgorithm','An init driving the structure %s has already been added, ignoring this init.\d',algoinits{ii}{2})
warning('SCDclass_expcode:addalgorithm','An init driving the structure %s has already been added, ignoring this init',char(fpinits{ii}{2}))
toadd(ii)=0;
end
end
......
......@@ -148,8 +148,14 @@ classdef SCDclass_mdsobjcontainer
end
end
end
function obj = importmdsobjects(obj, source)
% parameters and wavegens import
obj = importmdsparams(obj, source);
obj = importmdswavegens(obj, source);
end
function obj = importmdsparams(obj, source)
% parameters import
destparamtargets={};
......@@ -171,7 +177,9 @@ classdef SCDclass_mdsobjcontainer
end
end
end
end
function obj = importmdswavegens(obj, source)
% wavegens import
destwavegentargets={};
if obj.numwavegens>0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment