FSUDAQ/test.cpp

55 lines
1.3 KiB
C++
Raw Normal View History

#include "DigitizerPHA.h"
//#include "DigitizerPSD.h"
2022-08-03 19:00:41 -04:00
int main(int argc, char* argv[]){
DigitizerPHA * dig = new DigitizerPHA[2];
//DigitizerPSD * psd = new DigitizerPSD();
2022-08-03 19:00:41 -04:00
2022-08-04 18:02:03 -04:00
dig[0].OpenDigitizer(0,0, true);
dig[1].OpenDigitizer(1,0, true);
2022-08-03 19:00:41 -04:00
//psd->OpenDigitizer(2,0);
2022-08-03 19:00:41 -04:00
printf("======================= \n");
//dig[0].SetDCOffset(0.2);
//dig[0].SetDCOffset(0.3, 1);
//dig[0].SetRecordLength(2000);
//dig[0].SetEventAggregation(0);
//dig[0].SetInputDynamicRange(0);
2022-08-05 16:32:46 -04:00
//dig[0].SetPreTriggerDuration(500);
//dig[0].SetDCOffset(0.1);
//dig[0].SetTriggerPolarity(0);
2022-08-05 16:32:46 -04:00
dig[0].SetTrapezoidRescaling(31);
dig[0].SetPeakSampling(3);
dig[0].SetPulsePolarity(1);
dig[0].SetBaselineSampling(4);
dig[0].SetRollOverFlag(0);
dig[0].SetPileUpFlag(1);
//dig[0].SetPulsePolarity(0, 1);
2022-08-03 19:00:41 -04:00
//for( int ch = 0; ch < dig[0].GetNChannel(); ch++){
// uint32_t data = dig[0].ReadRegister((uint32_t) RegisterDPP::ChannelDCOffset, ch);
// printf(" %d %% \n", data );
//}
2022-08-05 16:32:46 -04:00
//dig[0].SetTriggerThreshold(200);
//dig[0].SetTriggerHoldOff(100);
2022-08-03 19:00:41 -04:00
dig[0].PrintBoardConfiguration();
dig[0].GetChannelSettingFromDigitizer(0);
dig[0].GetChannelSettingFromDigitizer(1);
2022-08-03 19:00:41 -04:00
2022-08-05 16:32:46 -04:00
//dig[0].SetAcqMode("mixed");
2022-08-03 19:00:41 -04:00
delete [] dig;
//delete psd;
2022-08-03 19:00:41 -04:00
return 0;
}