FSUDAQ/test.cpp

43 lines
848 B
C++

#include "DigitizerPHA.h"
//#include "DigitizerPSD.h"
int main(int argc, char* argv[]){
const int nBoard = 1;
DigitizerPHA *dig = new DigitizerPHA[nBoard];
//DigitizerPSD * psd = new DigitizerPSD();
for( int i = 0 ; i < nBoard; i++){
int board = i % 3;
int port = i/3;
dig[i].OpenDigitizer(board, port, true);
dig[i].OpenSettingBinary("setting_" + to_string(dig[i].GetSerialNumber()) + ".bin");
dig[i].SetAcqMode("list");
//dig[i].PrintACQStatue();
}
//dig[0].PrintBoardConfiguration();
//dig[0].PrintChannelSettingFromDigitizer(15);
//Data * data = dig[0].data;
//data->AllocateMemory(dig[0].GetHandle());
dig[0].StartACQ();
sleep(2);
dig[0].ReadData();
//printf("|%s|\n", data->buffer);
dig[0].StopACQ();
delete [] dig;
//delete psd;
return 0;
}