added ch2ns, remove Pixie16Msg.log at begin of test.cpp

This commit is contained in:
Ryan Tang 2022-03-07 16:20:50 -05:00
parent 2f640d6e51
commit 9e16a53075
3 changed files with 12 additions and 1 deletions

View File

@ -62,7 +62,7 @@ Pixie16::~Pixie16(){
CheckError("Pixie16ExitSystem");
delete PXISlotMap;
delete ch2ns;
delete ComFPGAConfigFile;
delete SPFPGAConfigFile;
delete TrigFPGAConfigFile;
@ -85,6 +85,8 @@ bool Pixie16::LoadConfigFile(std::string fileName){
OfflineMode = 0;
PXISlotMap = new unsigned short[NumModules];
ch2ns = new unsigned short[NumModules];
ComFPGAConfigFile = new char* [NumModules];
SPFPGAConfigFile = new char* [NumModules];
TrigFPGAConfigFile = new char* [NumModules];
@ -185,6 +187,8 @@ void Pixie16::GetDigitizerInfo(unsigned short modID){
printf(" ADC Bits : %d \n", ModADCBits);
printf("ADC sampling rate : %d \n", ModADCMSPS);
ch2ns[modID] = 1000/ModADCMSPS;
}

View File

@ -49,6 +49,8 @@ private:
unsigned short * PXISlotMap;
unsigned short OfflineMode;
unsigned short * ch2ns;
char ** ComFPGAConfigFile;
char ** SPFPGAConfigFile;
char ** TrigFPGAConfigFile;
@ -93,6 +95,8 @@ public:
void GetDigitizerInfo(unsigned short modID);
void BootDigitizers();
unsigned short GetCh2ns(unsigned short modID) {return ch2ns[modID];}
void AdjustOffset();
void CaptureBaseLine(unsigned short modID, unsigned short ch);
int GetBaslineLength() {return 3640;}

View File

@ -61,6 +61,9 @@ void PrintCommands(){
///##################################################
int main(int argc, char *argv[]){
printf("Removing Pixie16Msg.log \n");
remove( "Pixie16Msg.log");
Pixie16 * pixie = new Pixie16();
if ( pixie->GetStatus() < 0 ) {
QuitFlag = true;