87 lines
2.2 KiB
C++
87 lines
2.2 KiB
C++
#include "DigitizerPHA.h"
|
|
//#include "DigitizerPSD.h"
|
|
|
|
int main(int argc, char* argv[]){
|
|
|
|
DigitizerPHA * dig = new DigitizerPHA[2];
|
|
//DigitizerPSD * psd = new DigitizerPSD();
|
|
|
|
dig[0].OpenDigitizer(0,0, true);
|
|
//dig[1].OpenDigitizer(1,0, true);
|
|
|
|
//psd->OpenDigitizer(2,0);
|
|
|
|
|
|
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);
|
|
|
|
dig[0].SetTriggerThreshold(320);
|
|
dig[0].SetTriggerHoldOff(20);
|
|
dig[0].SetTriggerSmoothingFactor(4);
|
|
dig[0].SetTriggerOutputWidth(50);
|
|
dig[0].SetInputRiseTime(16);
|
|
|
|
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);
|
|
dig[0].SetPileUpFlag(1);
|
|
dig[0].SetExtra2WordOption(2);
|
|
|
|
|
|
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);
|
|
|
|
|
|
dig[0].PrintBoardConfiguration();
|
|
dig[0].GetChannelSettingFromDigitizer(0);
|
|
dig[0].GetChannelSettingFromDigitizer(2);
|
|
|
|
|
|
dig[0].SetAcqMode("mixed");
|
|
|
|
delete [] dig;
|
|
//delete psd;
|
|
|
|
return 0;
|
|
}
|