FSUDAQ/test.cpp

87 lines
2.2 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].SetRecordLength(3000);
dig[0].SetPreTriggerDuration(600);
dig[0].SetBaselineSampling(1);
dig[0].SetDCOffset(0.2);
dig[0].SetInputDynamicRange(0);
dig[0].SetPulsePolarity(0);
2022-08-03 19:00:41 -04:00
dig[0].SetTriggerThreshold(320);
dig[0].SetTriggerHoldOff(20);
dig[0].SetTriggerSmoothingFactor(4);
dig[0].SetTriggerOutputWidth(50);
dig[0].SetInputRiseTime(16);
2022-08-05 16:32:46 -04:00
dig[0].SetTrapezoidRescaling(31);
dig[0].SetTrapezoidRiseTime(100);
dig[0].SetTrapezoidFlatTop(50);
dig[0].SetDecayTime(5000);
dig[0].SetPeakingTime(20);
dig[0].SetPeakingHoldOff(100);
dig[0].SetPeakSampling(2);
dig[0].SetEnergyFineGain(2);
dig[0].SetRiseTimeValidWindow(10);
dig[0].SetEventAggregation(3);
dig[0].SetRollOverFlag(1);
2022-08-05 16:32:46 -04:00
dig[0].SetPileUpFlag(1);
dig[0].SetExtra2WordOption(2);
2022-08-03 19:00:41 -04:00
dig[0].SetRecordLength(1000, 2);
dig[0].SetPreTriggerDuration(400, 2);
dig[0].SetBaselineSampling(3, 2);
dig[0].SetDCOffset(0.4, 2);
dig[0].SetInputDynamicRange(1, 2);
dig[0].SetPulsePolarity(1, 2);
dig[0].SetTriggerThreshold(220, 2);
dig[0].SetTriggerHoldOff(40, 2);
dig[0].SetTriggerSmoothingFactor(2, 2);
dig[0].SetTriggerOutputWidth(100, 2);
dig[0].SetInputRiseTime(100, 2);
dig[0].SetTrapezoidRescaling(31, 2);
dig[0].SetTrapezoidRiseTime(150, 2);
dig[0].SetTrapezoidFlatTop(100, 2);
dig[0].SetDecayTime(6000, 2);
dig[0].SetPeakingTime(30, 2);
dig[0].SetPeakingHoldOff(150, 2);
dig[0].SetPeakSampling(3, 2);
dig[0].SetEnergyFineGain(5, 2);
dig[0].SetRiseTimeValidWindow(40, 2);
dig[0].SetEventAggregation(5, 2);
dig[0].SetRollOverFlag(0, 2);
dig[0].SetPileUpFlag(0, 2);
dig[0].SetExtra2WordOption(0, 2);
2022-08-03 19:00:41 -04:00
dig[0].PrintBoardConfiguration();
dig[0].GetChannelSettingFromDigitizer(0);
dig[0].GetChannelSettingFromDigitizer(2);
2022-08-03 19:00:41 -04:00
dig[0].SetAcqMode("mixed");
2022-08-05 16:32:46 -04:00
2022-08-03 19:00:41 -04:00
delete [] dig;
//delete psd;
2022-08-03 19:00:41 -04:00
return 0;
}