Subversion Repositories f9daq

Compare Revisions

Ignore whitespace Rev 128 → Rev 129

/lab/sipmscan/trunk/input/daqusb.C.online
26,7 → 26,7
//#define NADCCH 8
int ctrlc=0;
char *ccserial=(char*)"CC0126";
int devDetect; // variable to tell if we detect any devices
//int devDetect; // variable to tell if we detect any devices
 
int daq::connect(){
// odpri daq
48,7 → 48,7
return 0;
}
 
int daq::init(){
int daq::init(int chan = 0){
 
int i;
long k;
60,6 → 60,20
CCCC;
CREM_I;
 
NTDC = 1;
NADC = 2;
if(chan != 0)
{
NTDCCH = chan/2;
NADCCH = chan/2;
}
else
{
NTDCCH = 1;
NADCCH = 1;
}
printf("after: NTDCCH = %d, NADCCH = %d\n", NTDCCH, NADCCH);
 
// create command stack for the TDC and ADC
k=1;
for(i=0;(i<NTDCCH)&&(i<NADCCH);i++) { stackwrite[k++]=NAF(NTDC,i,0); stackwrite[k++]=NAF(NADC,i,0); }
119,7 → 133,7
}
 
int daq::event(unsigned int *data, int maxn){
int i,ib,count;
int ib,count;
int events,evsize;
short ret;
 
160,8 → 174,8
daq::daq(){
fStop=0;
connect();
if(devDetect > 0)
init();
// if(devDetect > 0)
// init();
}
 
daq::~daq(){