FSUDAQ/test.cpp

37 lines
802 B
C++
Raw Normal View History

2022-08-03 19:00:41 -04:00
#include "DigitizerClass.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].SetTrapezoidRescaling(0x1F);
dig[0].SetPulsePolarity(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].GetChannelSetting(0);
dig[0].GetChannelSetting(1);
printf("temp : %d \n", dig[0].GetChTemperature(1));
delete [] dig;
return 0;
}