% iGp_read_LFB      - Script to read out data and plot mean/RMS/spectrum (ALS)
%
% Copyright (c) 2008 Dimtel, Inc., All Rights Reserved
%
% $Id: iGp_read_BEPC2p.m,v 1.1.1.1 2010/10/05 16:43:01 dim Exp $
% $Date: 2010/10/05 16:43:01 $
% $Author: dim $
% $Revision: 1.1.1.1 $
% $Log: iGp_read_BEPC2p.m,v $
% Revision 1.1.1.1  2010/10/05 16:43:01  dim
% Initial import of iGp12
%
% Revision 1.1  2008/04/29 19:54:53  dim
% Transitioned from wget to urlwrite(), DCCT support, added FE/BE channels
% to saved parameters list.
%
%

clear;
prm.debug = 1;

% BEPC-II specific configuration
prm.sys = 'LPR';
prm.dcct = 'R3O:BI:DCCT:current';

% Figure out the directory
prm.tm = datestr(now, 'HH:MM:SS');
prm.tm(3:4)=prm.tm(4:5); prm.tm(5:6)=prm.tm(7:8); prm.tm = prm.tm(1:6);
unix(['mkdir ', prm.tm]);

[status, prm] = iGp_gd(prm);

if (status)
  disp(['Created data set [', prm.tm, ']. Plotting...']);
  eval(['cd ', prm.tm]);
  iGp_plt
  cd ..
end
