function PROC_SSDBNewFeatureTest(DataTemplate, VarName, OutputDir,nIter,options);

 if(nargin < 4)
  nIter = 100;
 end
 if(nargin < 5)
  options = [];
 end
 d.sPARAMS.R = 0;
 d.sPARAMS.T = 0;
 d.sPARAMS.Nrounds = 300;
 d.bRandsplit = 1;
 d.ObjsToDo=  randperm(3);
 d.SaveNameAdditionalString = [];
 d.SkipC1 = 0;
 options = ResolveMissingOptions(options,d);
 
  
 HelpTextInfo = 'PROC_SSDBNewFeatureTest';
% Testing the feature 
 here = pwd;
 cd /cbcl/scratch01/bileschi/PrecomputedFeatures/StreetScenes/AppearanceDetector                                 
 Root =  '/cbcl/scratch01/bileschi/PrecomputedFeatures/StreetScenes/AppearanceDetector';
 if(not(exist(fullfile([Root,'/RocsPlus'],OutputDir))))
   mkdir([Root,'/RocsPlus'],OutputDir);
 end
 names = {'car','pedestrian','bicycle'};
 seedrand;
 for iter = randperm(nIter)
 for iObjType = options.ObjsToDo
  on = names{iObjType};
  objidx = iObjType;
  opts.RandSeed = iter;
  opts = ResolveMissingOptions(options,opts);
  Template{1} = sprintf('AppearanceData_C1withborder_%s_f*.mat',on);
  if(iscell(DataTemplate))
    for j = 1:length(DataTemplate)
      Template{1+j} = sprintf(DataTemplate{j},on);
    end
  else
    Template{2} = sprintf(DataTemplate,on);
  end
  opts.featuresubset{1} = 6800:8376; % (Band 3)
  if(iscell(DataTemplate))
    for j= 1:length(DataTemplate)
      opts.featuresubset{j+1} = [];
    end
  else
    opts.featuresubset{2} = []; 
  end
  varn{1} = 'C1X';
  if(iscell(VarName))
    for j = 1:length(VarName)
      varn{1+j} = sprintf(VarName{j},on);
    end
  else
    varn{2} = VarName;
  end
  if(not(options.SkipC1))
   Osavename = sprintf('RocsPlus/%s/HStan002_Level5plusC1_%s_%.3d.mat',OutputDir,on,iter);
   savename = sprintf('RocsPlus/%s/%sPlusC1_%s_%.3d.mat',OutputDir,options.SaveNameAdditionalString,on,iter);
   fprintf('%s %d\n',on,iter);
   if(not(exist(savename)) && not(exist(Osavename)))
     [yel, ye, ROC, Model] = GetShapeBasedROCPerformance_Advanced(Root, Template, varn, objidx, opts);
     save(savename,'ROC','HelpTextInfo');
   end
  else
   fprintf('skipping C1\n');
  end
  Template{1} = sprintf('Triggs_%s_f*.mat',on);
  if(iscell(DataTemplate))
    for j = 1:length(DataTemplate)
      Template{1+j} = sprintf(DataTemplate{j},on);
    end
  else
    Template{2} = sprintf(DataTemplate,on);
  end
  varn{1} = 'C1X';
  if(iscell(VarName))
    for j = 1:length(VarName)
      varn{1+j} = sprintf(VarName{j},on);
    end
  else
    varn{2} = VarName;
  end
  opts.featuresubset{1} = []; % (Band 3)
  if(iscell(DataTemplate))
    for j= 1:length(DataTemplate)
      opts.featuresubset{j+1} = [];
    end
  else
    opts.featuresubset{2} = []; 
  end
  Osavename = sprintf('RocsPlus/%s/HStan002_Level5plusTriggs_%s_%.3d.mat',OutputDir,on,iter);
  savename = sprintf('RocsPlus/%s/%sPlusTriggs_%s_%.3d.mat',OutputDir,options.SaveNameAdditionalString,on,iter);
  Template
  varn
  if(not(exist(savename)) && not(exist(Osavename)))
    [yel, ye, ROC, Model] = GetShapeBasedROCPerformance_Advanced(Root, Template, varn, objidx, opts);
    save(savename,'ROC','HelpTextInfo');
  end
 end 
end
cd(here); 
