function [errVec, len, indexVec, sigVec] = read_total(fname)
fid = fopen(fname, 'r');
len = 0;
while 1>0,
  
  [indexNow, count] = fscanf(fid,'%d',1);
  if count ~= 1,
     break;
  end;
  len=len+1;
  indexVec(len) = indexNow;
  [com, count] = fscanf(fid,'%s',3);
  if count ~= 3,
     break;
  end
  sigVec(len) = fscanf(fid,'%f',1);
  [com, count] = fscanf(fid,'%s',2);
  if count ~= 2,
     break;
  end
  errVec(len) = fscanf(fid,'%f',1);
  [com, count] = fscanf(fid,'%s',3);
  if count ~= 3,
    break;
  end
end;
fclose(fid);
return;
