#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); dig[1].OpenDigitizer(1,0); //psd->OpenDigitizer(2,0); 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); //dig[0].SetNumSamplePreTrigger(500); //dig[0].SetDCOffset(0.1); //dig[0].SetTriggerPolarity(0); // //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); //for( int ch = 0; ch < dig[0].GetNChannel(); ch++){ // uint32_t data = dig[0].ReadRegister((uint32_t) RegisterDPP::ChannelDCOffset, ch); // printf(" %d %% \n", data ); //} dig[0].SetTriggerThreshold(2400); dig[0].SetTriggerHoldOff(100); dig[0].PrintBoardConfiguration(); dig[0].GetChannelSettingFromDigitizer(0); dig[0].GetChannelSettingFromDigitizer(1); delete [] dig; //delete psd; return 0; }