added all reading in BoardSetting, not tested. next, add change setting
This commit is contained in:
parent
3fc64c86cd
commit
92fe99dd48
|
@ -535,11 +535,11 @@ uint32_t Digitizer::PrintRegister(uint32_t address, std::string msg){
|
||||||
|
|
||||||
uint32_t * value = new uint32_t[1];
|
uint32_t * value = new uint32_t[1];
|
||||||
CAEN_DGTZ_ReadRegister(handle, (uint32_t) Register::BoardConfiguration, value);
|
CAEN_DGTZ_ReadRegister(handle, (uint32_t) Register::BoardConfiguration, value);
|
||||||
printf(" %*s 32 28 24 20 16 12 8 4 0\n", msg.length(), "");
|
printf(" %*s 32 28 24 20 16 12 8 4 0\n", (int) msg.length(), "");
|
||||||
printf(" %*s | | | | | | | | |\n", msg.length(), "");
|
printf(" %*s | | | | | | | | |\n", (int) msg.length(), "");
|
||||||
printf(" %*s", msg.length(), "");
|
printf(" %*s", (int) msg.length(), "");
|
||||||
cout << " : 0b" << bitset<32>(value[0]) << endl;
|
cout << " : 0b" << bitset<32>(value[0]) << endl;
|
||||||
printf(" %*s : 0x%x\n", msg.length(), msg.c_str(), value[0]);
|
printf(" %*s : 0x%x\n", (int) msg.length(), msg.c_str(), value[0]);
|
||||||
|
|
||||||
return value[0];
|
return value[0];
|
||||||
|
|
||||||
|
|
|
@ -90,6 +90,8 @@ class Digitizer{
|
||||||
unsigned int ReadBits(uint32_t address, unsigned int bitLength, unsigned int bitSmallestPos, int ch = -1 );
|
unsigned int ReadBits(uint32_t address, unsigned int bitLength, unsigned int bitSmallestPos, int ch = -1 );
|
||||||
unsigned int GetDPPAlgorithmControl(int ch = -1) {return ReadRegister(Register::DPP::DPPAlgorithmControl, ch);}
|
unsigned int GetDPPAlgorithmControl(int ch = -1) {return ReadRegister(Register::DPP::DPPAlgorithmControl, ch);}
|
||||||
|
|
||||||
|
bool isACQRunning() {return AcqRun;}
|
||||||
|
|
||||||
uint32_t PrintRegister(uint32_t address, std::string msg);
|
uint32_t PrintRegister(uint32_t address, std::string msg);
|
||||||
|
|
||||||
void PrintBoard();
|
void PrintBoard();
|
||||||
|
|
|
@ -182,15 +182,14 @@ void DigitizerPHA::SetSetting(Setting::PHA settingName, float value, int ch){
|
||||||
case Setting::PHA::DisableExternalTrigger_bool: input = value; WriteRegister(Register::DPP::DisableExternalTrigger, input); break;
|
case Setting::PHA::DisableExternalTrigger_bool: input = value; WriteRegister(Register::DPP::DisableExternalTrigger, input); break;
|
||||||
case Setting::PHA::ExtendedVetoDelay_16bit: input = value; WriteRegister(Register::DPP::ExtendedVetoDelay, input); break;
|
case Setting::PHA::ExtendedVetoDelay_16bit: input = value; WriteRegister(Register::DPP::ExtendedVetoDelay, input); break;
|
||||||
case Setting::PHA::AnalogMonitorMode_3bit: input = value; WriteRegister(Register::DPP::AnalogMonitorMode, input); break;
|
case Setting::PHA::AnalogMonitorMode_3bit: input = value; WriteRegister(Register::DPP::AnalogMonitorMode, input); break;
|
||||||
|
case Setting::PHA::BufferOccupancyGain_4bit: input = value; WriteRegister(Register::DPP::BufferOccupancyGain, input); break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ErrorMsg("PHA-" + std::to_string(settingName) );
|
ErrorMsg("PHA-" + std::to_string(settingName) );
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
double DigitizerPHA::GetSetting(Setting::PHA settingName, int ch){
|
double DigitizerPHA::GetSetting(Setting::PHA settingName, int ch){
|
||||||
|
|
||||||
double value = 0;
|
double value = 0;
|
||||||
|
@ -312,6 +311,26 @@ double DigitizerPHA::GetSetting(Setting::PHA settingName, int ch){
|
||||||
case Setting::PHA::DisableExternalTrigger_bool: temp = ReadRegister(Register::DPP::DisableExternalTrigger); value = temp & 0x1; break;
|
case Setting::PHA::DisableExternalTrigger_bool: temp = ReadRegister(Register::DPP::DisableExternalTrigger); value = temp & 0x1; break;
|
||||||
case Setting::PHA::ExtendedVetoDelay_16bit: temp = ReadRegister(Register::DPP::ExtendedVetoDelay); value = temp & 0xffff; break;
|
case Setting::PHA::ExtendedVetoDelay_16bit: temp = ReadRegister(Register::DPP::ExtendedVetoDelay); value = temp & 0xffff; break;
|
||||||
case Setting::PHA::AnalogMonitorMode_3bit: temp = ReadRegister(Register::DPP::AnalogMonitorMode); value = temp & 0x7; break;
|
case Setting::PHA::AnalogMonitorMode_3bit: temp = ReadRegister(Register::DPP::AnalogMonitorMode); value = temp & 0x7; break;
|
||||||
|
case Setting::PHA::BufferOccupancyGain_4bit: temp = ReadRegister(Register::DPP::BufferOccupancyGain); value = temp & 0xf; break;
|
||||||
|
|
||||||
|
/// AMC Firmware Revisiion
|
||||||
|
case Setting::PHA::AMCFirmwareNumber_readOnly_8bit: temp = ReadBits(Register::DPP::AMCFirmwareRevision, 7, 0); value = temp; break;
|
||||||
|
case Setting::PHA::AMCDPPcode_readOnly_8bit: temp = ReadBits(Register::DPP::AMCFirmwareRevision, 8, 8); value = temp; break;
|
||||||
|
case Setting::PHA::AMCBuildDay_readOnly_8bit: temp = ReadBits(Register::DPP::AMCFirmwareRevision, 8, 16); value = temp; break;
|
||||||
|
case Setting::PHA::AMCBuildMonth_readOnly_4bits: temp = ReadBits(Register::DPP::AMCFirmwareRevision, 4, 24); value = temp; break;
|
||||||
|
case Setting::PHA::AMCBuildYear_readOnly_4bits: temp = ReadBits(Register::DPP::AMCFirmwareRevision, 4, 28); value = temp; break;
|
||||||
|
|
||||||
|
/// ACQ Status
|
||||||
|
case Setting::PHA::ACQStatus_readOnly_bool: temp = ReadBits(Register::DPP::AcquisitionStatus, 1, 2); value = temp; break;
|
||||||
|
case Setting::PHA::ACQEventReady_readOnly_bool: temp = ReadBits(Register::DPP::AcquisitionStatus, 1, 3); value = temp; break;
|
||||||
|
case Setting::PHA::ACQEventFull_readOnly_bool: temp = ReadBits(Register::DPP::AcquisitionStatus, 1, 4); value = temp; break;
|
||||||
|
case Setting::PHA::ACQClockSource_readOnly_bool: temp = ReadBits(Register::DPP::AcquisitionStatus, 1, 5); value = temp; break;
|
||||||
|
case Setting::PHA::ACQPLLLock_readOnly_bool: temp = ReadBits(Register::DPP::AcquisitionStatus, 1, 7); value = temp; break;
|
||||||
|
case Setting::PHA::ACQBoardReady_readOnly_bool: temp = ReadBits(Register::DPP::AcquisitionStatus, 1, 8); value = temp; break;
|
||||||
|
case Setting::PHA::ACQ_S_IN_Statue_readOnly_bool: temp = ReadBits(Register::DPP::AcquisitionStatus, 1, 15); value = temp; break;
|
||||||
|
case Setting::PHA::ACQ_TRGIN_Status_readOnly_bool: temp = ReadBits(Register::DPP::AcquisitionStatus, 1, 16); value = temp; break;
|
||||||
|
case Setting::PHA::ACQChannelShutDownStatus_readOnly_bool: temp = ReadBits(Register::DPP::AcquisitionStatus, 1, 19); value = temp; break;
|
||||||
|
case Setting::PHA::ACQTenmperatureStatus_readOnly_4bit: temp = ReadBits(Register::DPP::AcquisitionStatus, 4, 20); value = temp; break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -69,9 +69,9 @@ MainWindow::MainWindow(const TGWindow *p,UInt_t w,UInt_t h) {
|
||||||
fMenuDigitizers->Connect("Activated(Int_t)", "MainWindow", this, "HandleMenu(Int_t)");
|
fMenuDigitizers->Connect("Activated(Int_t)", "MainWindow", this, "HandleMenu(Int_t)");
|
||||||
fMenuBar->AddPopup("&Digitizers", fMenuDigitizers, new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 4, 0, 0));
|
fMenuBar->AddPopup("&Digitizers", fMenuDigitizers, new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 4, 0, 0));
|
||||||
|
|
||||||
fMenuDigitizers->DisableEntry( M_TRIGGER_SUMMARY);
|
//fMenuDigitizers->DisableEntry( M_TRIGGER_SUMMARY);
|
||||||
fMenuDigitizers->DisableEntry( M_BOARD_SETTINGS);
|
//fMenuDigitizers->DisableEntry( M_BOARD_SETTINGS);
|
||||||
fMenuDigitizers->DisableEntry( M_CH_SETTING);
|
//fMenuDigitizers->DisableEntry( M_CH_SETTING);
|
||||||
|
|
||||||
fMenuUtility = new TGPopupMenu(gClient->GetRoot());
|
fMenuUtility = new TGPopupMenu(gClient->GetRoot());
|
||||||
fMenuUtility->AddEntry("Plot Channels Rate", M_SHOW_CHANNELS_RATE);
|
fMenuUtility->AddEntry("Plot Channels Rate", M_SHOW_CHANNELS_RATE);
|
||||||
|
@ -136,7 +136,7 @@ MainWindow::MainWindow(const TGWindow *p,UInt_t w,UInt_t h) {
|
||||||
|
|
||||||
//HandleMenu(M_DIGITIZER_SCAN);
|
//HandleMenu(M_DIGITIZER_SCAN);
|
||||||
//
|
//
|
||||||
//HandleMenu(M_BOARD_SETTINGS);
|
HandleMenu(M_BOARD_SETTINGS);
|
||||||
//HandleMenu(M_CH_SETTING);
|
//HandleMenu(M_CH_SETTING);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -190,7 +190,7 @@ namespace Register {
|
||||||
namespace Setting{
|
namespace Setting{
|
||||||
|
|
||||||
enum PHA{
|
enum PHA{
|
||||||
/// board setting
|
/// board configuration
|
||||||
AutoDataFlush_board_bool,
|
AutoDataFlush_board_bool,
|
||||||
DecimateWaveForm_board_bool,
|
DecimateWaveForm_board_bool,
|
||||||
TriggerPropapation_board_bool,
|
TriggerPropapation_board_bool,
|
||||||
|
@ -261,11 +261,12 @@ namespace Setting{
|
||||||
TriggerValidationSoftwareTrigger_bool,
|
TriggerValidationSoftwareTrigger_bool,
|
||||||
|
|
||||||
/// Readout Control
|
/// Readout Control
|
||||||
//ReadoutCtrl_VMEInterruptLevel_3bit,
|
ReadoutCtrl_VMEInterruptLevel_3bit,
|
||||||
//ReadoutCtrl_OpticalLinkInterrupt_bool,
|
ReadoutCtrl_OpticalLinkInterrupt_bool,
|
||||||
//ReadoutCtrl_VMEBusError_bool,
|
ReadoutCtrl_VMEBusError_bool,
|
||||||
|
ReadoutCtrl_VMEAlign64_bool,
|
||||||
|
|
||||||
/// Registers
|
/// Registers for channel
|
||||||
RecordLength_G_ns,
|
RecordLength_G_ns,
|
||||||
PreTriggerLength_ns,
|
PreTriggerLength_ns,
|
||||||
InputDynamicRange_bool,
|
InputDynamicRange_bool,
|
||||||
|
@ -277,8 +278,8 @@ namespace Setting{
|
||||||
|
|
||||||
TriggerThreshold_LSD,
|
TriggerThreshold_LSD,
|
||||||
TriggerHoldOffWidth_ns,
|
TriggerHoldOffWidth_ns,
|
||||||
TriggerSmoothingFactor_5bit,
|
TriggerSmoothingFactor_5bit, /// RC-CR2 Smoothing Factor
|
||||||
TriggerOutputWidth_ns,
|
TriggerOutputWidth_ns, /// Shaped Trigger Width
|
||||||
InputRiseTime_ns,
|
InputRiseTime_ns,
|
||||||
|
|
||||||
TrapezoidRiseTime_ns,
|
TrapezoidRiseTime_ns,
|
||||||
|
@ -289,16 +290,60 @@ namespace Setting{
|
||||||
EnergyFineGain_16bit,
|
EnergyFineGain_16bit,
|
||||||
RiseTimeValidationWindow_ns,
|
RiseTimeValidationWindow_ns,
|
||||||
|
|
||||||
|
ADCTemperature_8bit,
|
||||||
|
|
||||||
/// Others
|
/// Others
|
||||||
FanSpeedControl_bool,
|
FanSpeedControl_bool,
|
||||||
RunStartStopDelay_8bit,
|
RunStartStopDelay_8bit,
|
||||||
DisableExternalTrigger_bool,
|
DisableExternalTrigger_bool,
|
||||||
ExtendedVetoDelay_16bit,
|
ExtendedVetoDelay_16bit,
|
||||||
AnalogMonitorMode_3bit
|
AnalogMonitorMode_3bit,
|
||||||
|
BufferOccupancyGain_4bit,
|
||||||
|
|
||||||
|
///==========read only
|
||||||
|
|
||||||
|
/// AMC Firmware Revisiion
|
||||||
|
AMCFirmwareNumber_readOnly_8bit,
|
||||||
|
AMCDPPcode_readOnly_8bit,
|
||||||
|
AMCBuildDay_readOnly_8bit,
|
||||||
|
AMCBuildMonth_readOnly_4bits,
|
||||||
|
AMCBuildYear_readOnly_4bits,
|
||||||
|
|
||||||
|
/// ACQ Status
|
||||||
|
ACQStatus_readOnly_bool,
|
||||||
|
ACQEventReady_readOnly_bool,
|
||||||
|
ACQEventFull_readOnly_bool,
|
||||||
|
ACQClockSource_readOnly_bool,
|
||||||
|
ACQPLLLock_readOnly_bool,
|
||||||
|
ACQBoardReady_readOnly_bool,
|
||||||
|
ACQ_S_IN_Statue_readOnly_bool,
|
||||||
|
ACQ_TRGIN_Status_readOnly_bool,
|
||||||
|
ACQChannelShutDownStatus_readOnly_bool,
|
||||||
|
ACQTenmperatureStatus_readOnly_4bit,
|
||||||
|
|
||||||
|
|
||||||
|
///========== not impletementd
|
||||||
|
DataFlush_writeOnly_any, /// any bit write, write only
|
||||||
|
ChannelStopAcq_bool,
|
||||||
|
ChannelSoftwareTrigger_writeOnly_any,
|
||||||
|
|
||||||
|
FineGain_16bit, /// this is complicated value
|
||||||
|
|
||||||
|
ADCCalibration_32bit,
|
||||||
|
|
||||||
|
ChannelsShutdown_bool,
|
||||||
|
|
||||||
|
SoftwareTrigger_writeOnly_any,
|
||||||
|
|
||||||
|
ChannelEnableMask_16bit,
|
||||||
|
|
||||||
|
/// ChannelStatus
|
||||||
|
ChannelStatus_SPI_bool,
|
||||||
|
ChannelStatus_ADCCalib_bool,
|
||||||
|
ChannelStatus_ADCPowerDown_bool
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
383
boardSetting.cpp
383
boardSetting.cpp
|
@ -20,6 +20,31 @@ TString boardSettingName[NUM_BOARD_INFO] = { "Model",
|
||||||
"AMC version"
|
"AMC version"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Pixel_t BoardSetting::red = 0;
|
||||||
|
Pixel_t BoardSetting::blue = 0;
|
||||||
|
TGNumberEntry * BoardSetting::boardIDEntry = NULL;
|
||||||
|
Digitizer ** BoardSetting::digi = NULL;
|
||||||
|
DigitizerPHA * BoardSetting::pha = NULL;
|
||||||
|
DigitizerPSD * BoardSetting::psd = NULL;
|
||||||
|
|
||||||
|
TGTextEntry * BoardSetting::txtACQStatus = NULL;
|
||||||
|
TGTextEntry * BoardSetting::txtACQEventReady = NULL;
|
||||||
|
TGTextEntry * BoardSetting::txtACQEventFull = NULL;
|
||||||
|
TGTextEntry * BoardSetting::txtACQClockSource = NULL;
|
||||||
|
TGTextEntry * BoardSetting::txtACQPLLLock = NULL;
|
||||||
|
TGTextEntry * BoardSetting::txtACQChDown = NULL;
|
||||||
|
TGTextEntry * BoardSetting::txtACQSIN = NULL;
|
||||||
|
TGTextEntry * BoardSetting::txtACQTRIGIN = NULL;
|
||||||
|
TGTextEntry * BoardSetting::txtACQBoardReady = NULL;
|
||||||
|
TGTextEntry * BoardSetting::txtACQTemp0 = NULL;
|
||||||
|
TGTextEntry * BoardSetting::txtACQTemp1 = NULL;
|
||||||
|
TGTextEntry * BoardSetting::txtACQTemp2 = NULL;
|
||||||
|
TGTextEntry * BoardSetting::txtACQTemp3 = NULL;
|
||||||
|
|
||||||
|
TGTextEntry * BoardSetting::txtEventReady = NULL;
|
||||||
|
TGTextEntry * BoardSetting::txtBusError = NULL;
|
||||||
|
TGTextEntry * BoardSetting::txtVMEFIFO = NULL;
|
||||||
|
|
||||||
BoardSetting::BoardSetting(const TGWindow *p, UInt_t w, UInt_t h, Digitizer ** digi, int nBoard){
|
BoardSetting::BoardSetting(const TGWindow *p, UInt_t w, UInt_t h, Digitizer ** digi, int nBoard){
|
||||||
|
|
||||||
this->nDigi = nBoard;
|
this->nDigi = nBoard;
|
||||||
|
@ -29,7 +54,7 @@ BoardSetting::BoardSetting(const TGWindow *p, UInt_t w, UInt_t h, Digitizer ** d
|
||||||
gClient->GetColorByName("blue", blue);
|
gClient->GetColorByName("blue", blue);
|
||||||
|
|
||||||
fMain = new TGMainFrame(p,w,h);
|
fMain = new TGMainFrame(p,w,h);
|
||||||
fMain->SetWindowName("Board Settings ");
|
fMain->SetWindowName("Board Settings & Status");
|
||||||
fMain->Connect("CloseWindow()", "BoardSetting", this, "CloseWindow()");
|
fMain->Connect("CloseWindow()", "BoardSetting", this, "CloseWindow()");
|
||||||
|
|
||||||
TGLayoutHints * layoutHints = new TGLayoutHints(kLHintsCenterX | kLHintsCenterY, 5,5,3,3); /// left, right, top, bottom
|
TGLayoutHints * layoutHints = new TGLayoutHints(kLHintsCenterX | kLHintsCenterY, 5,5,3,3); /// left, right, top, bottom
|
||||||
|
@ -48,7 +73,7 @@ BoardSetting::BoardSetting(const TGWindow *p, UInt_t w, UInt_t h, Digitizer ** d
|
||||||
|
|
||||||
int boardID = boardIDEntry->GetNumber();
|
int boardID = boardIDEntry->GetNumber();
|
||||||
|
|
||||||
///- Board Failure status
|
/// Board Failure status
|
||||||
TGLabel * lbPLLStatus = new TGLabel(hframe0, "PLL status :"); hframe0->AddFrame(lbPLLStatus, layoutHints);
|
TGLabel * lbPLLStatus = new TGLabel(hframe0, "PLL status :"); hframe0->AddFrame(lbPLLStatus, layoutHints);
|
||||||
enPLLStatus = new TGTextEntry(hframe0, ""); hframe0->AddFrame(enPLLStatus, layoutHints);
|
enPLLStatus = new TGTextEntry(hframe0, ""); hframe0->AddFrame(enPLLStatus, layoutHints);
|
||||||
enPLLStatus->SetEnabled(false);
|
enPLLStatus->SetEnabled(false);
|
||||||
|
@ -68,7 +93,7 @@ BoardSetting::BoardSetting(const TGWindow *p, UInt_t w, UInt_t h, Digitizer ** d
|
||||||
TGTextButton * bSoftwareClear = new TGTextButton(hframe0, "Clear Buffer"); hframe0->AddFrame(bSoftwareClear, layoutHints);
|
TGTextButton * bSoftwareClear = new TGTextButton(hframe0, "Clear Buffer"); hframe0->AddFrame(bSoftwareClear, layoutHints);
|
||||||
|
|
||||||
|
|
||||||
///============ fixed info
|
{///============ fixed info
|
||||||
TGHorizontalFrame * hframeInfo = new TGHorizontalFrame(vframe); vframe->AddFrame(hframeInfo, new TGLayoutHints(kLHintsExpandX));
|
TGHorizontalFrame * hframeInfo = new TGHorizontalFrame(vframe); vframe->AddFrame(hframeInfo, new TGLayoutHints(kLHintsExpandX));
|
||||||
|
|
||||||
int numCol = 3;
|
int numCol = 3;
|
||||||
|
@ -80,15 +105,16 @@ BoardSetting::BoardSetting(const TGWindow *p, UInt_t w, UInt_t h, Digitizer ** d
|
||||||
TGHorizontalFrame *hframe[NUM_BOARD_INFO];
|
TGHorizontalFrame *hframe[NUM_BOARD_INFO];
|
||||||
TGLabel * lb[NUM_BOARD_INFO];
|
TGLabel * lb[NUM_BOARD_INFO];
|
||||||
for( int i = 0 ; i < NUM_BOARD_INFO; i++){
|
for( int i = 0 ; i < NUM_BOARD_INFO; i++){
|
||||||
hframe[i] = new TGHorizontalFrame(vframeInfo[i%3], 50, 50 ); vframeInfo[i%3]->AddFrame(hframe[i], new TGLayoutHints(kLHintsRight, 2,2,2,2));
|
hframe[i] = new TGHorizontalFrame(vframeInfo[i%3], 50, 50 ); vframeInfo[i%3]->AddFrame(hframe[i], new TGLayoutHints(kLHintsRight, 2,2,0,0));
|
||||||
|
|
||||||
lb[i] = new TGLabel(hframe[i], boardSettingName[i]); hframe[i]->AddFrame(lb[i], new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 5, 5, 3, 4));
|
lb[i] = new TGLabel(hframe[i], boardSettingName[i]); hframe[i]->AddFrame(lb[i], new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 5, 5, 0, 0));
|
||||||
|
|
||||||
entry[i] = new TGTextEntry(hframe[i], new TGTextBuffer(1)); hframe[i]->AddFrame(entry[i], new TGLayoutHints(kLHintsRight, 5,5,3,4));
|
entry[i] = new TGTextEntry(hframe[i], new TGTextBuffer(1)); hframe[i]->AddFrame(entry[i], new TGLayoutHints(kLHintsRight, 5,5,0,0));
|
||||||
entry[i]->SetEnabled(false);
|
entry[i]->SetEnabled(false);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
///========= Board Configure
|
{///========= Board Configure
|
||||||
TGGroupFrame * gBdCfg = new TGGroupFrame(vframe, "Board Configure", kHorizontalFrame); vframe->AddFrame(gBdCfg , new TGLayoutHints(kLHintsExpandX));
|
TGGroupFrame * gBdCfg = new TGGroupFrame(vframe, "Board Configure", kHorizontalFrame); vframe->AddFrame(gBdCfg , new TGLayoutHints(kLHintsExpandX));
|
||||||
TGVerticalFrame * vBdCfg = new TGVerticalFrame(gBdCfg); gBdCfg->AddFrame(vBdCfg);
|
TGVerticalFrame * vBdCfg = new TGVerticalFrame(gBdCfg); gBdCfg->AddFrame(vBdCfg);
|
||||||
TGHorizontalFrame * hframeBdCfg1 = new TGHorizontalFrame(vBdCfg); vBdCfg->AddFrame(hframeBdCfg1, layoutHints);
|
TGHorizontalFrame * hframeBdCfg1 = new TGHorizontalFrame(vBdCfg); vBdCfg->AddFrame(hframeBdCfg1, layoutHints);
|
||||||
|
@ -194,8 +220,9 @@ BoardSetting::BoardSetting(const TGWindow *p, UInt_t w, UInt_t h, Digitizer ** d
|
||||||
cbFanCtrl->AddEntry("Fast", 0x38);
|
cbFanCtrl->AddEntry("Fast", 0x38);
|
||||||
cbFanCtrl->Select(0x30);
|
cbFanCtrl->Select(0x30);
|
||||||
cbFanCtrl->Resize(100, 20);
|
cbFanCtrl->Resize(100, 20);
|
||||||
|
}
|
||||||
|
|
||||||
///========== ACQ control
|
{///========== ACQ control
|
||||||
TGGroupFrame * gAcqCtrl = new TGGroupFrame(vframe, "ACQ Control", kHorizontalFrame); vframe->AddFrame(gAcqCtrl , new TGLayoutHints(kLHintsExpandX));
|
TGGroupFrame * gAcqCtrl = new TGGroupFrame(vframe, "ACQ Control", kHorizontalFrame); vframe->AddFrame(gAcqCtrl , new TGLayoutHints(kLHintsExpandX));
|
||||||
TGVerticalFrame * vAcqCtrl = new TGVerticalFrame(gAcqCtrl); gAcqCtrl->AddFrame(vAcqCtrl);
|
TGVerticalFrame * vAcqCtrl = new TGVerticalFrame(gAcqCtrl); gAcqCtrl->AddFrame(vAcqCtrl);
|
||||||
|
|
||||||
|
@ -235,8 +262,100 @@ BoardSetting::BoardSetting(const TGWindow *p, UInt_t w, UInt_t h, Digitizer ** d
|
||||||
numRunStartStopDelay = new TGNumberEntry(hfAcqCtrl2, 0, 0, 0, TGNumberFormat::kNESInteger, TGNumberFormat::kNEANonNegative); hfAcqCtrl2->AddFrame(numRunStartStopDelay, layoutHints);
|
numRunStartStopDelay = new TGNumberEntry(hfAcqCtrl2, 0, 0, 0, TGNumberFormat::kNESInteger, TGNumberFormat::kNEANonNegative); hfAcqCtrl2->AddFrame(numRunStartStopDelay, layoutHints);
|
||||||
numRunStartStopDelay->SetWidth(60);
|
numRunStartStopDelay->SetWidth(60);
|
||||||
numRunStartStopDelay->SetLimits(TGNumberFormat::kNELLimitMinMax, 0, 0x0FF);
|
numRunStartStopDelay->SetLimits(TGNumberFormat::kNELLimitMinMax, 0, 0x0FF);
|
||||||
|
}
|
||||||
|
|
||||||
///========= Trigger Configure
|
{///========= ACD Status
|
||||||
|
TGGroupFrame * gAcqStatus = new TGGroupFrame(vframe, "ACQ Status", kHorizontalFrame); vframe->AddFrame(gAcqStatus , new TGLayoutHints(kLHintsExpandX));
|
||||||
|
TGHorizontalFrame * hfAcqStatus = new TGHorizontalFrame(gAcqStatus); gAcqStatus->AddFrame(hfAcqStatus, new TGLayoutHints(kLHintsExpandY , 5, 5, 3, 0));
|
||||||
|
|
||||||
|
TGVerticalFrame * vAcqStatus1 = new TGVerticalFrame(hfAcqStatus); hfAcqStatus->AddFrame(vAcqStatus1);
|
||||||
|
|
||||||
|
txtACQStatus = new TGTextEntry(vAcqStatus1, new TGTextBuffer(1)); vAcqStatus1->AddFrame(txtACQStatus, new TGLayoutHints(kLHintsRight, 5,5,0,0));
|
||||||
|
txtACQStatus->SetEnabled(false);
|
||||||
|
txtACQStatus->SetText( "ACQ is stopped" );
|
||||||
|
|
||||||
|
txtACQEventReady = new TGTextEntry(vAcqStatus1, new TGTextBuffer(1)); vAcqStatus1->AddFrame(txtACQEventReady, new TGLayoutHints(kLHintsRight, 5,5,0,0));
|
||||||
|
txtACQEventReady->SetEnabled(false);
|
||||||
|
txtACQEventReady->SetText( "no Event" );
|
||||||
|
|
||||||
|
txtACQEventFull = new TGTextEntry(vAcqStatus1, new TGTextBuffer(1)); vAcqStatus1->AddFrame(txtACQEventFull, new TGLayoutHints(kLHintsRight, 5,5,0,0));
|
||||||
|
txtACQEventFull->SetEnabled(false);
|
||||||
|
txtACQEventFull->SetText( "no channel FULL" );
|
||||||
|
|
||||||
|
TGVerticalFrame * vAcqStatus2 = new TGVerticalFrame(hfAcqStatus); hfAcqStatus->AddFrame(vAcqStatus2);
|
||||||
|
|
||||||
|
txtACQClockSource = new TGTextEntry(vAcqStatus2, new TGTextBuffer(1)); vAcqStatus2->AddFrame(txtACQClockSource, new TGLayoutHints(kLHintsRight, 5,5,0,0));
|
||||||
|
txtACQClockSource->SetEnabled(false);
|
||||||
|
txtACQClockSource->SetText( "Internal Clock" );
|
||||||
|
|
||||||
|
txtACQPLLLock = new TGTextEntry(vAcqStatus2, new TGTextBuffer(1)); vAcqStatus2->AddFrame(txtACQPLLLock, new TGLayoutHints(kLHintsRight, 5,5,0,0));
|
||||||
|
txtACQPLLLock->SetEnabled(false);
|
||||||
|
txtACQPLLLock->SetText( "PLL unlock" );
|
||||||
|
|
||||||
|
txtACQChDown = new TGTextEntry(vAcqStatus2, new TGTextBuffer(1)); vAcqStatus2->AddFrame(txtACQChDown, new TGLayoutHints(kLHintsRight, 5,5,0,0));
|
||||||
|
txtACQChDown->SetEnabled(false);
|
||||||
|
txtACQChDown->SetText( "Channels are ON" );
|
||||||
|
|
||||||
|
TGVerticalFrame * vAcqStatus3 = new TGVerticalFrame(hfAcqStatus); hfAcqStatus->AddFrame(vAcqStatus3);
|
||||||
|
|
||||||
|
txtACQSIN = new TGTextEntry(vAcqStatus3, new TGTextBuffer(1)); vAcqStatus3->AddFrame(txtACQSIN, new TGLayoutHints(kLHintsRight, 5,5,0,0));
|
||||||
|
txtACQSIN->SetEnabled(false);
|
||||||
|
txtACQSIN->SetText( "S-IN = 0" );
|
||||||
|
|
||||||
|
txtACQTRIGIN = new TGTextEntry(vAcqStatus3, new TGTextBuffer(1)); vAcqStatus3->AddFrame(txtACQTRIGIN, new TGLayoutHints(kLHintsRight, 5,5,0,0));
|
||||||
|
txtACQTRIGIN->SetEnabled(false);
|
||||||
|
txtACQTRIGIN->SetText( "TRG-IN = 0" );
|
||||||
|
|
||||||
|
TGVerticalFrame * vAcqStatus4 = new TGVerticalFrame(hfAcqStatus); hfAcqStatus->AddFrame(vAcqStatus4);
|
||||||
|
|
||||||
|
txtACQBoardReady = new TGTextEntry(vAcqStatus4, new TGTextBuffer(1)); vAcqStatus4->AddFrame(txtACQBoardReady, new TGLayoutHints(kLHintsLeft, 5,5,0,0));
|
||||||
|
txtACQBoardReady->SetEnabled(false);
|
||||||
|
txtACQBoardReady->SetText( "Board NOT Ready (PLL & ADCs are NOT sync)" );
|
||||||
|
txtACQBoardReady->Resize(280, 20);
|
||||||
|
|
||||||
|
TGHorizontalFrame * hfAcqTemp = new TGHorizontalFrame(vAcqStatus4); vAcqStatus4->AddFrame(hfAcqTemp, new TGLayoutHints(kLHintsExpandY , 5, 5, 3, 0));
|
||||||
|
|
||||||
|
TGVerticalFrame * vAcqTemp1 = new TGVerticalFrame(hfAcqTemp); hfAcqTemp->AddFrame(vAcqTemp1);
|
||||||
|
TGLabel * lbdummy0 = new TGLabel(vAcqTemp1, " ch :"); vAcqTemp1->AddFrame(lbdummy0, new TGLayoutHints(kLHintsLeft | kLHintsCenterY , 5, 5, 0, 2));
|
||||||
|
lbdummy0->Resize(60, 20);
|
||||||
|
TGLabel * lbACQTemp = new TGLabel(vAcqTemp1, "Temp. Stat.:"); vAcqTemp1->AddFrame(lbACQTemp, new TGLayoutHints(kLHintsLeft | kLHintsCenterY , 5, 5, 2, 2));
|
||||||
|
lbACQTemp->Resize(60, 20);
|
||||||
|
|
||||||
|
TGVerticalFrame * vAcqTemp2 = new TGVerticalFrame(hfAcqTemp); hfAcqTemp->AddFrame(vAcqTemp2);
|
||||||
|
TGLabel * lbch0 = new TGLabel(vAcqTemp2, "0-3"); vAcqTemp2->AddFrame(lbch0, new TGLayoutHints(kLHintsLeft | kLHintsCenterY , 5, 5, 0, 0));
|
||||||
|
lbch0->Resize(40, 20);
|
||||||
|
txtACQTemp0 = new TGTextEntry(vAcqTemp2, new TGTextBuffer(1)); vAcqTemp2->AddFrame(txtACQTemp0, new TGLayoutHints(kLHintsRight, 5,5,0,0));
|
||||||
|
txtACQTemp0->SetEnabled(false);
|
||||||
|
txtACQTemp0->SetText( "<70" );
|
||||||
|
txtACQTemp0->Resize(40, 20);
|
||||||
|
|
||||||
|
TGVerticalFrame * vAcqTemp3 = new TGVerticalFrame(hfAcqTemp); hfAcqTemp->AddFrame(vAcqTemp3);
|
||||||
|
TGLabel * lbch1 = new TGLabel(vAcqTemp3, "4-7"); vAcqTemp3->AddFrame(lbch1, new TGLayoutHints(kLHintsLeft | kLHintsCenterY , 5, 5, 0, 0));
|
||||||
|
lbch1->Resize(40,20);
|
||||||
|
txtACQTemp1 = new TGTextEntry(vAcqTemp3, new TGTextBuffer(1)); vAcqTemp3->AddFrame(txtACQTemp1, new TGLayoutHints(kLHintsRight, 5,5,0,0));
|
||||||
|
txtACQTemp1->SetEnabled(false);
|
||||||
|
txtACQTemp1->SetText( "<70" );
|
||||||
|
txtACQTemp1->Resize(40,20);
|
||||||
|
|
||||||
|
TGVerticalFrame * vAcqTemp4 = new TGVerticalFrame(hfAcqTemp); hfAcqTemp->AddFrame(vAcqTemp4);
|
||||||
|
TGLabel * lbch2 = new TGLabel(vAcqTemp4, "8-11"); vAcqTemp4->AddFrame(lbch2, new TGLayoutHints(kLHintsLeft | kLHintsCenterY , 5, 5, 0, 0));
|
||||||
|
lbch2->Resize(40, 20);
|
||||||
|
txtACQTemp2 = new TGTextEntry(vAcqTemp4, new TGTextBuffer(1)); vAcqTemp4->AddFrame(txtACQTemp2, new TGLayoutHints(kLHintsRight, 5,5,0,0));
|
||||||
|
txtACQTemp2->SetEnabled(false);
|
||||||
|
txtACQTemp2->SetText( "<70" );
|
||||||
|
txtACQTemp2->Resize(40,20);
|
||||||
|
|
||||||
|
TGVerticalFrame * vAcqTemp5 = new TGVerticalFrame(hfAcqTemp); hfAcqTemp->AddFrame(vAcqTemp5);
|
||||||
|
TGLabel * lbch3 = new TGLabel(vAcqTemp5, "12-15"); vAcqTemp5->AddFrame(lbch3, new TGLayoutHints(kLHintsLeft | kLHintsCenterY , 5, 5, 0, 0));
|
||||||
|
lbch3->Resize(40, 20);
|
||||||
|
txtACQTemp3 = new TGTextEntry(vAcqTemp5, new TGTextBuffer(1)); vAcqTemp5->AddFrame(txtACQTemp3, new TGLayoutHints(kLHintsRight, 5,5,0,0));
|
||||||
|
txtACQTemp3->SetEnabled(false);
|
||||||
|
txtACQTemp3->SetText( "<70" );
|
||||||
|
txtACQTemp3->Resize(40,20);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
{///========= Trigger Configure
|
||||||
TGGroupFrame * gTRGCfg = new TGGroupFrame(vframe, "Trigger Configure", kHorizontalFrame); vframe->AddFrame(gTRGCfg, new TGLayoutHints(kLHintsExpandX));
|
TGGroupFrame * gTRGCfg = new TGGroupFrame(vframe, "Trigger Configure", kHorizontalFrame); vframe->AddFrame(gTRGCfg, new TGLayoutHints(kLHintsExpandX));
|
||||||
TGVerticalFrame * vTRGCfg = new TGVerticalFrame(gTRGCfg); gTRGCfg->AddFrame(vTRGCfg, new TGLayoutHints(kLHintsExpandX));
|
TGVerticalFrame * vTRGCfg = new TGVerticalFrame(gTRGCfg); gTRGCfg->AddFrame(vTRGCfg, new TGLayoutHints(kLHintsExpandX));
|
||||||
|
|
||||||
|
@ -314,17 +433,14 @@ BoardSetting::BoardSetting(const TGWindow *p, UInt_t w, UInt_t h, Digitizer ** d
|
||||||
TRGOUTMajorLevel = new TGNumberEntry(vTRGMsk3, 0, 0, 0, TGNumberFormat::kNESInteger, TGNumberFormat::kNEANonNegative); vTRGMsk3->AddFrame(TRGOUTMajorLevel, new TGLayoutHints(kLHintsCenterY, 2,2,2,2));
|
TRGOUTMajorLevel = new TGNumberEntry(vTRGMsk3, 0, 0, 0, TGNumberFormat::kNESInteger, TGNumberFormat::kNEANonNegative); vTRGMsk3->AddFrame(TRGOUTMajorLevel, new TGLayoutHints(kLHintsCenterY, 2,2,2,2));
|
||||||
TRGOUTMajorLevel->Resize(70, 17);
|
TRGOUTMajorLevel->Resize(70, 17);
|
||||||
|
|
||||||
|
//TGVerticalFrame * vTRGMsk4 = new TGVerticalFrame(hframeTRGCfg); hframeTRGCfg->AddFrame(vTRGMsk4, new TGLayoutHints(kLHintsCenterX , 5, 5, 3, 4));
|
||||||
TGVerticalFrame * vTRGMsk4 = new TGVerticalFrame(hframeTRGCfg); hframeTRGCfg->AddFrame(vTRGMsk4, new TGLayoutHints(kLHintsCenterX , 5, 5, 3, 4));
|
//TGLabel * lbLVDSTrigger = new TGLabel(vTRGMsk4, "LVDS"); vTRGMsk4->AddFrame(lbLVDSTrigger, layoutHints);
|
||||||
TGLabel * lbLVDSTrigger = new TGLabel(vTRGMsk4, "LVDS"); vTRGMsk4->AddFrame(lbLVDSTrigger, layoutHints);
|
//TGLabel * lbdummy1 = new TGLabel(vTRGMsk4, "Trg."); vTRGMsk4->AddFrame(lbdummy1, layoutHints);
|
||||||
TGLabel * lbdummy1 = new TGLabel(vTRGMsk4, "Trg."); vTRGMsk4->AddFrame(lbdummy1, layoutHints);
|
//bGLBLVDSTrigger = new TGCheckButton(vTRGMsk4, "", 1); vTRGMsk4->AddFrame(bGLBLVDSTrigger, layoutHints);
|
||||||
|
//bGLBLVDSTrigger->SetState(kButtonUp);
|
||||||
bGLBLVDSTrigger = new TGCheckButton(vTRGMsk4, "", 1); vTRGMsk4->AddFrame(bGLBLVDSTrigger, layoutHints);
|
//vTRGMsk4->AddFrame(lbdummy0, layoutHints);
|
||||||
bGLBLVDSTrigger->SetState(kButtonUp);
|
//bTRGOUTLVDSTrigger = new TGCheckButton(vTRGMsk4, "", 1); vTRGMsk4->AddFrame(bTRGOUTLVDSTrigger, layoutHints);
|
||||||
vTRGMsk4->AddFrame(lbdummy0, layoutHints);
|
//bTRGOUTLVDSTrigger->SetState(kButtonUp);
|
||||||
|
|
||||||
bTRGOUTLVDSTrigger = new TGCheckButton(vTRGMsk4, "", 1); vTRGMsk4->AddFrame(bTRGOUTLVDSTrigger, layoutHints);
|
|
||||||
bTRGOUTLVDSTrigger->SetState(kButtonUp);
|
|
||||||
|
|
||||||
TGVerticalFrame * vTRGMsk5 = new TGVerticalFrame(hframeTRGCfg); hframeTRGCfg->AddFrame(vTRGMsk5, new TGLayoutHints(kLHintsCenterX , 5, 5, 3, 4));
|
TGVerticalFrame * vTRGMsk5 = new TGVerticalFrame(hframeTRGCfg); hframeTRGCfg->AddFrame(vTRGMsk5, new TGLayoutHints(kLHintsCenterX , 5, 5, 3, 4));
|
||||||
TGLabel * lbExtTrigger = new TGLabel(vTRGMsk5, "Ext."); vTRGMsk5->AddFrame(lbExtTrigger, layoutHints);
|
TGLabel * lbExtTrigger = new TGLabel(vTRGMsk5, "Ext."); vTRGMsk5->AddFrame(lbExtTrigger, layoutHints);
|
||||||
|
@ -337,7 +453,6 @@ BoardSetting::BoardSetting(const TGWindow *p, UInt_t w, UInt_t h, Digitizer ** d
|
||||||
bTRGOUTExtTrigger = new TGCheckButton(vTRGMsk5, "", 1); vTRGMsk5->AddFrame(bTRGOUTExtTrigger, layoutHints);
|
bTRGOUTExtTrigger = new TGCheckButton(vTRGMsk5, "", 1); vTRGMsk5->AddFrame(bTRGOUTExtTrigger, layoutHints);
|
||||||
bTRGOUTExtTrigger->SetState(kButtonUp);
|
bTRGOUTExtTrigger->SetState(kButtonUp);
|
||||||
|
|
||||||
|
|
||||||
TGVerticalFrame * vTRGMsk6 = new TGVerticalFrame(hframeTRGCfg); hframeTRGCfg->AddFrame(vTRGMsk6, new TGLayoutHints(kLHintsCenterX , 5, 5, 3, 4));
|
TGVerticalFrame * vTRGMsk6 = new TGVerticalFrame(hframeTRGCfg); hframeTRGCfg->AddFrame(vTRGMsk6, new TGLayoutHints(kLHintsCenterX , 5, 5, 3, 4));
|
||||||
TGLabel * lbSWTrigger = new TGLabel(vTRGMsk6, "Software"); vTRGMsk6->AddFrame(lbSWTrigger, layoutHints);
|
TGLabel * lbSWTrigger = new TGLabel(vTRGMsk6, "Software"); vTRGMsk6->AddFrame(lbSWTrigger, layoutHints);
|
||||||
TGLabel * lbdummy3 = new TGLabel(vTRGMsk6, "Trg."); vTRGMsk6->AddFrame(lbdummy3, layoutHints);
|
TGLabel * lbdummy3 = new TGLabel(vTRGMsk6, "Trg."); vTRGMsk6->AddFrame(lbdummy3, layoutHints);
|
||||||
|
@ -360,13 +475,11 @@ BoardSetting::BoardSetting(const TGWindow *p, UInt_t w, UInt_t h, Digitizer ** d
|
||||||
TGLabel * lbExtendVetoDelay = new TGLabel(hframeTRGCfg2, "Extended Veto Delay"); hframeTRGCfg2->AddFrame(lbExtendVetoDelay, new TGLayoutHints(kLHintsCenterY , 5, 5, 3, 4));
|
TGLabel * lbExtendVetoDelay = new TGLabel(hframeTRGCfg2, "Extended Veto Delay"); hframeTRGCfg2->AddFrame(lbExtendVetoDelay, new TGLayoutHints(kLHintsCenterY , 5, 5, 3, 4));
|
||||||
numExtendVetoDelay = new TGNumberEntry(hframeTRGCfg2, 0, 0, 0, TGNumberFormat::kNESInteger, TGNumberFormat::kNEANonNegative); hframeTRGCfg2->AddFrame(numExtendVetoDelay, new TGLayoutHints(kLHintsCenterY , 5, 5, 3, 4));
|
numExtendVetoDelay = new TGNumberEntry(hframeTRGCfg2, 0, 0, 0, TGNumberFormat::kNESInteger, TGNumberFormat::kNEANonNegative); hframeTRGCfg2->AddFrame(numExtendVetoDelay, new TGLayoutHints(kLHintsCenterY , 5, 5, 3, 4));
|
||||||
numExtendVetoDelay->Resize(70, 17);
|
numExtendVetoDelay->Resize(70, 17);
|
||||||
|
}
|
||||||
|
|
||||||
|
{///=================="Front Panel IO Control",
|
||||||
TGHorizontalFrame * hRow = new TGHorizontalFrame(vframe); vframe->AddFrame(hRow, new TGLayoutHints(kLHintsExpandX));
|
TGGroupFrame * gFrontIOCtrl = new TGGroupFrame(vframe, "Front Panel IO Control", kHorizontalFrame); vframe->AddFrame(gFrontIOCtrl, new TGLayoutHints(kLHintsExpandX));
|
||||||
|
TGVerticalFrame * vFrontIOCtrl = new TGVerticalFrame(gFrontIOCtrl); gFrontIOCtrl->AddFrame(vFrontIOCtrl, new TGLayoutHints(kLHintsLeft, 5, 5, 3, 4));
|
||||||
///=================="Front Panel IO Control",
|
|
||||||
TGGroupFrame * gFrontIOCtrl = new TGGroupFrame(hRow, "Front Panel IO Control", kHorizontalFrame); hRow->AddFrame(gFrontIOCtrl );
|
|
||||||
TGVerticalFrame * vFrontIOCtrl = new TGVerticalFrame(gFrontIOCtrl); gFrontIOCtrl->AddFrame(vFrontIOCtrl, new TGLayoutHints(kLHintsCenterX , 5, 5, 3, 4));
|
|
||||||
TGHorizontalFrame * hframeFrontIOCtrl = new TGHorizontalFrame(vFrontIOCtrl); vFrontIOCtrl->AddFrame(hframeFrontIOCtrl, new TGLayoutHints(kLHintsCenterY, 5,5,3,4));
|
TGHorizontalFrame * hframeFrontIOCtrl = new TGHorizontalFrame(vFrontIOCtrl); vFrontIOCtrl->AddFrame(hframeFrontIOCtrl, new TGLayoutHints(kLHintsCenterY, 5,5,3,4));
|
||||||
|
|
||||||
TGLabel * lbLEMOIO = new TGLabel(hframeFrontIOCtrl, "LEMO I/O"); hframeFrontIOCtrl->AddFrame(lbLEMOIO, new TGLayoutHints(kLHintsCenterY , 5, 5, 3, 4));
|
TGLabel * lbLEMOIO = new TGLabel(hframeFrontIOCtrl, "LEMO I/O"); hframeFrontIOCtrl->AddFrame(lbLEMOIO, new TGLayoutHints(kLHintsCenterY , 5, 5, 3, 4));
|
||||||
|
@ -393,7 +506,7 @@ BoardSetting::BoardSetting(const TGWindow *p, UInt_t w, UInt_t h, Digitizer ** d
|
||||||
cbTRGOUTmode->Select(0);
|
cbTRGOUTmode->Select(0);
|
||||||
cbTRGOUTmode->Resize(160, 20);
|
cbTRGOUTmode->Resize(160, 20);
|
||||||
|
|
||||||
bTRGOUTImp = new TGCheckButton(hframeFrontIOCtrl, "TRG-OUT high impe.", 1); hframeFrontIOCtrl->AddFrame(bTRGOUTImp, layoutHints);
|
bTRGOUTImp = new TGCheckButton(hframeFrontIOCtrl, "TRG-OUT high impe.(off)", 1); hframeFrontIOCtrl->AddFrame(bTRGOUTImp, layoutHints);
|
||||||
bTRGOUTImp->SetState(kButtonUp);
|
bTRGOUTImp->SetState(kButtonUp);
|
||||||
|
|
||||||
TGHorizontalFrame * hframeFrontIOCtrl1 = new TGHorizontalFrame(vFrontIOCtrl); vFrontIOCtrl->AddFrame(hframeFrontIOCtrl1, new TGLayoutHints(kLHintsCenterY , 5,5,3,4));
|
TGHorizontalFrame * hframeFrontIOCtrl1 = new TGHorizontalFrame(vFrontIOCtrl); vFrontIOCtrl->AddFrame(hframeFrontIOCtrl1, new TGLayoutHints(kLHintsCenterY , 5,5,3,4));
|
||||||
|
@ -435,66 +548,78 @@ BoardSetting::BoardSetting(const TGWindow *p, UInt_t w, UInt_t h, Digitizer ** d
|
||||||
numBufferOccpGain = new TGNumberEntry(hframeFrontIOCtrl2, 0, 0, 0, TGNumberFormat::kNESInteger, TGNumberFormat::kNEANonNegative); hframeFrontIOCtrl2->AddFrame(numBufferOccpGain, new TGLayoutHints(kLHintsCenterY , 5, 5, 3, 2));
|
numBufferOccpGain = new TGNumberEntry(hframeFrontIOCtrl2, 0, 0, 0, TGNumberFormat::kNESInteger, TGNumberFormat::kNEANonNegative); hframeFrontIOCtrl2->AddFrame(numBufferOccpGain, new TGLayoutHints(kLHintsCenterY , 5, 5, 3, 2));
|
||||||
numBufferOccpGain->SetState(false);
|
numBufferOccpGain->SetState(false);
|
||||||
numBufferOccpGain->Resize(70, 17);
|
numBufferOccpGain->Resize(70, 17);
|
||||||
|
}
|
||||||
|
|
||||||
|
TGHorizontalFrame * hRow = new TGHorizontalFrame(vframe); vframe->AddFrame(hRow, new TGLayoutHints(kLHintsExpandX));
|
||||||
|
|
||||||
//TODO check is VME model
|
//TODO check is VME model
|
||||||
///"Readout Control",
|
{///"Readout Control",
|
||||||
TGGroupFrame * gReadoutCtrl = new TGGroupFrame(vframe, "ReadOut Control", kHorizontalFrame); vframe->AddFrame(gReadoutCtrl, new TGLayoutHints(kLHintsExpandX) );
|
TGGroupFrame * gReadoutCtrl = new TGGroupFrame(hRow, "ReadOut Control", kHorizontalFrame); hRow->AddFrame(gReadoutCtrl);
|
||||||
TGVerticalFrame * vReadoutCtrl = new TGVerticalFrame(gReadoutCtrl); gReadoutCtrl->AddFrame(vReadoutCtrl);
|
TGVerticalFrame * vReadoutCtrl = new TGVerticalFrame(gReadoutCtrl); gReadoutCtrl->AddFrame(vReadoutCtrl);
|
||||||
|
|
||||||
TGHorizontalFrame * hReadoutCtrl = new TGHorizontalFrame(vReadoutCtrl); vReadoutCtrl->AddFrame(hReadoutCtrl, new TGLayoutHints(kLHintsCenterY, 5,5,3,4));
|
TGHorizontalFrame * hReadoutCtrl = new TGHorizontalFrame(vReadoutCtrl); vReadoutCtrl->AddFrame(hReadoutCtrl, new TGLayoutHints(kLHintsCenterY, 5,5,3,4));
|
||||||
|
|
||||||
TGLabel * lbVMEInterruptLevel = new TGLabel(hReadoutCtrl, "VME Interrupt Level"); hReadoutCtrl->AddFrame(lbVMEInterruptLevel, new TGLayoutHints(kLHintsCenterY | kLHintsLeft, 5, 5, 3, 4));
|
TGLabel * lbVMEInterruptLevel = new TGLabel(hReadoutCtrl, "VME Interrupt Level"); hReadoutCtrl->AddFrame(lbVMEInterruptLevel, new TGLayoutHints(kLHintsCenterY | kLHintsLeft, 5, 5, 3, 4));
|
||||||
TGNumberEntry * numVMEInterruptLeveln = new TGNumberEntry(hReadoutCtrl, 0, 0, 0, TGNumberFormat::kNESInteger, TGNumberFormat::kNEANonNegative); hReadoutCtrl->AddFrame(numVMEInterruptLeveln, new TGLayoutHints(kLHintsCenterY , 5, 5, 3, 4));
|
|
||||||
numVMEInterruptLeveln->SetLimits(TGNumberFormat::kNELLimitMinMax, 0, 7);
|
|
||||||
numVMEInterruptLeveln->Resize(70, 17);
|
|
||||||
|
|
||||||
TGCheckButton * bOpticalLinkInterrupt= new TGCheckButton(hReadoutCtrl, "Optical Link Interrupt", 1); hReadoutCtrl->AddFrame(bOpticalLinkInterrupt, layoutHints);
|
cbVMEInterrupLevel = new TGComboBox(hReadoutCtrl, "", 1); hReadoutCtrl->AddFrame(cbVMEInterrupLevel, new TGLayoutHints(kLHintsCenterY , 5, 5, 3, 4));
|
||||||
|
cbVMEInterrupLevel->EnableTextInput(false);
|
||||||
|
cbVMEInterrupLevel->AddEntry("Disabled", 0);
|
||||||
|
cbVMEInterrupLevel->AddEntry("1", 1);
|
||||||
|
cbVMEInterrupLevel->AddEntry("2", 2);
|
||||||
|
cbVMEInterrupLevel->AddEntry("3", 3);
|
||||||
|
cbVMEInterrupLevel->AddEntry("4", 4);
|
||||||
|
cbVMEInterrupLevel->AddEntry("5", 5);
|
||||||
|
cbVMEInterrupLevel->AddEntry("6", 6);
|
||||||
|
cbVMEInterrupLevel->AddEntry("7", 7);
|
||||||
|
cbVMEInterrupLevel->Select(0);
|
||||||
|
cbVMEInterrupLevel->Resize(70, 20);
|
||||||
|
|
||||||
|
bOpticalLinkInterrupt = new TGCheckButton(hReadoutCtrl, "Optical Link Interrupt", 1); hReadoutCtrl->AddFrame(bOpticalLinkInterrupt, layoutHints);
|
||||||
bOpticalLinkInterrupt->SetState(kButtonUp);
|
bOpticalLinkInterrupt->SetState(kButtonUp);
|
||||||
|
|
||||||
TGCheckButton * bEventAligned= new TGCheckButton(hReadoutCtrl, "Event Aligned Enabled", 1); hReadoutCtrl->AddFrame(bEventAligned, layoutHints);
|
bEventAligned = new TGCheckButton(hReadoutCtrl, "Event Aligned Enabled", 1); hReadoutCtrl->AddFrame(bEventAligned, layoutHints);
|
||||||
bEventAligned->SetState(kButtonUp);
|
bEventAligned->SetState(kButtonUp);
|
||||||
|
|
||||||
TGCheckButton * bVMEAlogn64Mode= new TGCheckButton(hReadoutCtrl, "64-bit aligned", 1); hReadoutCtrl->AddFrame(bVMEAlogn64Mode, layoutHints);
|
bVMEAlogn64Mode = new TGCheckButton(hReadoutCtrl, "64-bit aligned", 1); hReadoutCtrl->AddFrame(bVMEAlogn64Mode, layoutHints);
|
||||||
bVMEAlogn64Mode->SetState(kButtonUp);
|
bVMEAlogn64Mode->SetState(kButtonUp);
|
||||||
|
|
||||||
|
|
||||||
TGHorizontalFrame * hReadoutCtrl2 = new TGHorizontalFrame(vReadoutCtrl); vReadoutCtrl->AddFrame(hReadoutCtrl2, new TGLayoutHints(kLHintsCenterY, 5,5,3,4));
|
TGHorizontalFrame * hReadoutCtrl2 = new TGHorizontalFrame(vReadoutCtrl); vReadoutCtrl->AddFrame(hReadoutCtrl2, new TGLayoutHints(kLHintsCenterY, 5,5,3,4));
|
||||||
|
|
||||||
//TGCheckButton * bVMEBaseAddRelocation= new TGCheckButton(hReadoutCtrl, "VME baase addr. relocation", 1); hReadoutCtrl->AddFrame(bVMEBaseAddRelocation, layoutHints);
|
//TGCheckButton * bVMEBaseAddRelocation= new TGCheckButton(hReadoutCtrl, "VME baase addr. relocation", 1); hReadoutCtrl->AddFrame(bVMEBaseAddRelocation, layoutHints);
|
||||||
//bVMEBaseAddRelocation->SetState(kButtonUp);
|
//bVMEBaseAddRelocation->SetState(kButtonUp);
|
||||||
//Need Relocation address
|
//Need Relocation address
|
||||||
|
|
||||||
TGCheckButton * bInteruptReleaseMode= new TGCheckButton(hReadoutCtrl2, "Interrupt Release on Acknowldge", 1); hReadoutCtrl2->AddFrame(bInteruptReleaseMode, layoutHints);
|
bInteruptReleaseMode = new TGCheckButton(hReadoutCtrl2, "Interrupt Release on Acknowldge", 1); hReadoutCtrl2->AddFrame(bInteruptReleaseMode, layoutHints);
|
||||||
bInteruptReleaseMode->SetState(kButtonUp);
|
bInteruptReleaseMode->SetState(kButtonUp);
|
||||||
|
|
||||||
TGCheckButton * bEnableExtendedBlockTransfer= new TGCheckButton(hReadoutCtrl2, "Enable Extended Block Transfer", 1); hReadoutCtrl2->AddFrame(bEnableExtendedBlockTransfer, layoutHints);
|
bEnableExtendedBlockTransfer = new TGCheckButton(hReadoutCtrl2, "Enable Extended Block Transfer", 1); hReadoutCtrl2->AddFrame(bEnableExtendedBlockTransfer, layoutHints);
|
||||||
bEnableExtendedBlockTransfer->SetState(kButtonUp);
|
bEnableExtendedBlockTransfer->SetState(kButtonUp);
|
||||||
|
}
|
||||||
|
|
||||||
///==========="Readout Status"
|
{///==========="Readout Status"
|
||||||
TGGroupFrame * gReadoutStatus = new TGGroupFrame(hRow, "Readout Status", kHorizontalFrame); hRow->AddFrame(gReadoutStatus, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 5) );
|
TGGroupFrame * gReadoutStatus = new TGGroupFrame(hRow, "Readout Status", kHorizontalFrame); hRow->AddFrame(gReadoutStatus, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 5, 5, 0, 0) );
|
||||||
TGVerticalFrame * vReadoutStatus = new TGVerticalFrame(gReadoutStatus); gReadoutStatus->AddFrame(vReadoutStatus, new TGLayoutHints(kLHintsExpandY , 5, 5, 3, 2));
|
TGVerticalFrame * vReadoutStatus = new TGVerticalFrame(gReadoutStatus); gReadoutStatus->AddFrame(vReadoutStatus, new TGLayoutHints(kLHintsExpandY , 5, 5, 3, 0));
|
||||||
|
|
||||||
TGTextEntry * txtEventReady = new TGTextEntry(vReadoutStatus, new TGTextBuffer(1)); vReadoutStatus->AddFrame(txtEventReady, new TGLayoutHints(kLHintsRight, 5,5,6,6));
|
txtEventReady = new TGTextEntry(vReadoutStatus, new TGTextBuffer(1)); vReadoutStatus->AddFrame(txtEventReady, new TGLayoutHints(kLHintsRight, 5,5,0,0));
|
||||||
txtEventReady->SetEnabled(false);
|
txtEventReady->SetEnabled(false);
|
||||||
txtEventReady->SetText( "Event Ready" );
|
txtEventReady->SetText( "Event Ready" );
|
||||||
txtEventReady->SetTextColor(blue);
|
txtEventReady->SetTextColor(blue);
|
||||||
|
|
||||||
TGTextEntry * txtBusError = new TGTextEntry(vReadoutStatus, new TGTextBuffer(1)); vReadoutStatus->AddFrame(txtBusError, new TGLayoutHints(kLHintsRight, 5,5,6,6));
|
txtBusError = new TGTextEntry(vReadoutStatus, new TGTextBuffer(1)); vReadoutStatus->AddFrame(txtBusError, new TGLayoutHints(kLHintsRight, 5,5,0,0));
|
||||||
txtBusError->SetEnabled(false);
|
txtBusError->SetEnabled(false);
|
||||||
txtBusError->SetText( "no Bus Error" );
|
txtBusError->SetText( "no Bus Error" );
|
||||||
txtBusError->SetTextColor(blue);
|
txtBusError->SetTextColor(blue);
|
||||||
|
|
||||||
TGTextEntry * txtVMEFIFO = new TGTextEntry(vReadoutStatus, new TGTextBuffer(1)); vReadoutStatus->AddFrame(txtVMEFIFO, new TGLayoutHints(kLHintsRight, 5,5,6,6));
|
txtVMEFIFO = new TGTextEntry(vReadoutStatus, new TGTextBuffer(1)); vReadoutStatus->AddFrame(txtVMEFIFO, new TGLayoutHints(kLHintsRight, 5,5,0,0));
|
||||||
txtVMEFIFO->SetEnabled(false);
|
txtVMEFIFO->SetEnabled(false);
|
||||||
txtVMEFIFO->SetText( "VME FIFO EMPTY" );
|
txtVMEFIFO->SetText( "VME FIFO EMPTY" );
|
||||||
txtVMEFIFO->SetTextColor(blue);
|
txtVMEFIFO->SetTextColor(blue);
|
||||||
|
}
|
||||||
|
|
||||||
///===== LVSD
|
///===== LVSD
|
||||||
TGHorizontalFrame * hframeLVSD = new TGHorizontalFrame(vframe); vframe->AddFrame(hframeLVSD, new TGLayoutHints(kLHintsCenterY , 5,5,3,4));
|
TGHorizontalFrame * hframeLVSD = new TGHorizontalFrame(vframe); vframe->AddFrame(hframeLVSD, new TGLayoutHints(kLHintsCenterY , 5,5,3,4));
|
||||||
TGLabel * lbLVSD = new TGLabel(hframeLVSD, "LVSD Control is not impletmented."); hframeLVSD->AddFrame(lbLVSD, new TGLayoutHints(kLHintsCenterY | kLHintsLeft, 5, 5, 3, 2));
|
TGLabel * lbLVSD = new TGLabel(hframeLVSD, "LVSD Control is not impletmented."); hframeLVSD->AddFrame(lbLVSD, new TGLayoutHints(kLHintsCenterY | kLHintsLeft, 5, 5, 3, 2));
|
||||||
|
|
||||||
|
|
||||||
///==================== Read digitizer Setting
|
///==================== Read digitizer Setting
|
||||||
ChangeBoard();
|
ChangeBoard();
|
||||||
|
|
||||||
|
@ -502,93 +627,100 @@ BoardSetting::BoardSetting(const TGWindow *p, UInt_t w, UInt_t h, Digitizer ** d
|
||||||
fMain->Resize(fMain->GetDefaultSize());
|
fMain->Resize(fMain->GetDefaultSize());
|
||||||
fMain->MapWindow();
|
fMain->MapWindow();
|
||||||
|
|
||||||
|
|
||||||
|
///Setup thread
|
||||||
|
readStatusThread = new TThread("hahaha", ReadStatus, (void *) 1);
|
||||||
|
if( digi != NULL ) {
|
||||||
|
readStatusThread->Run();
|
||||||
|
}
|
||||||
|
|
||||||
isOpened = true;
|
isOpened = true;
|
||||||
}
|
}
|
||||||
BoardSetting::~BoardSetting(){
|
BoardSetting::~BoardSetting(){
|
||||||
|
|
||||||
isOpened = false;
|
isOpened = false;
|
||||||
|
|
||||||
//delete boardIDEntry;
|
for( int i = 0; i < nDigi; i++) digi[i] = 0;
|
||||||
//for( int i = 0; i < NUM_BOARD_INFO; i++) delete entry[i];
|
|
||||||
//
|
|
||||||
//for( int i = 0; i < nDigi; i++) digi[i] = NULL;
|
|
||||||
|
|
||||||
/*
|
pha = 0;
|
||||||
delete enPLLStatus;
|
psd = 0;
|
||||||
delete enTempStatus;
|
|
||||||
delete enADCPwrStatus;
|
|
||||||
|
|
||||||
/// board settings
|
delete readStatusThread;
|
||||||
delete bAutoDataFlush;
|
|
||||||
delete bDecimateWF;
|
|
||||||
delete bWFRecord;
|
|
||||||
delete bTrigPropa;
|
|
||||||
delete bExtrac2;
|
|
||||||
delete bDualTrace;
|
|
||||||
delete cbAP1;
|
|
||||||
delete cbAP2; /// for ComboBox for analog probe 2
|
|
||||||
delete cbDP;
|
|
||||||
delete cbAggOrg;
|
|
||||||
delete numAggBLT; /// number of Agg pre Block transfer
|
|
||||||
delete cbFanCtrl;
|
|
||||||
|
|
||||||
/// ACQ control
|
|
||||||
delete cbAcqMode;
|
|
||||||
delete bAcqArm;
|
|
||||||
delete cbPLLref;
|
|
||||||
|
|
||||||
/// Trigger control
|
|
||||||
delete cbGbTRGMskCh[8];
|
|
||||||
delete cbTRGValMskCh[8];
|
|
||||||
delete cbTRGOUTMskCh[8];
|
|
||||||
|
|
||||||
delete numMajorCoinWin;
|
|
||||||
delete cbTRGMODE;
|
|
||||||
delete cbTRGOUTMODE;
|
|
||||||
|
|
||||||
delete GlbMajorLevel;
|
|
||||||
delete TRGMajorLevel;
|
|
||||||
delete TRGOUTMajorLevel;
|
|
||||||
|
|
||||||
delete bGLBLVDSTrigger;
|
|
||||||
delete bTRGOUTLVDSTrigger;
|
|
||||||
|
|
||||||
delete bGLBExtTrigger;
|
|
||||||
delete bTRGExtTrigger;
|
|
||||||
delete bTRGOUTExtTrigger;
|
|
||||||
|
|
||||||
delete bGLBSoftwareTrigger;
|
|
||||||
delete bTRGSoftwareTrigger;
|
|
||||||
delete bTRGOUTSoftwareTrigger;
|
|
||||||
|
|
||||||
delete bTRGValMskLVSDGLB;
|
|
||||||
delete bTRGValMskLVSDLCL;
|
|
||||||
delete bEnableExtTRG;
|
|
||||||
delete numExtendVetoDelay;
|
|
||||||
|
|
||||||
/// Front Panel IO Control
|
|
||||||
delete cbLEMOIO;
|
|
||||||
delete cbTRGOUTmode;
|
|
||||||
delete bTRGOUTImp;
|
|
||||||
|
|
||||||
delete cbTRGINCtrl;
|
|
||||||
delete cbTRGINMezzanines;
|
|
||||||
|
|
||||||
delete cbAnaMonitor;
|
|
||||||
delete numBufferOccpGain;
|
|
||||||
*/
|
|
||||||
|
|
||||||
/// fMain must be delete last;
|
|
||||||
fMain->Cleanup();
|
fMain->Cleanup();
|
||||||
delete fMain;
|
delete fMain;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void * BoardSetting::ReadStatus(void * ptr){
|
||||||
|
int boardID = boardIDEntry->GetNumber();
|
||||||
|
|
||||||
|
if( digi == NULL ) {
|
||||||
|
printf("no didgitizers\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int pauseTime = 1000; /// msec
|
||||||
|
|
||||||
|
if( digi[boardID]->GetDPPType() == V1730_DPP_PHA_CODE ) {
|
||||||
|
|
||||||
|
pha = dynamic_cast<DigitizerPHA*> (digi[boardID]);
|
||||||
|
|
||||||
|
//while( digi[boardID]->isACQRunning() == false ){
|
||||||
|
while( true ){
|
||||||
|
|
||||||
|
/// ACQ Status
|
||||||
|
uint32_t temp = pha->ReadRegister(Register::DPP::AcquisitionStatus);
|
||||||
|
|
||||||
|
txtACQStatus ->SetText( ((temp >> 2) & 0x1) == 0 ? "ACQ is stopped" : "ACQ is Running"); txtACQStatus->SetTextColor( ((temp >> 2) & 0x1) == 0 ? 1 : blue);
|
||||||
|
txtACQEventReady ->SetText( ((temp >> 3) & 0x1) == 0 ? "no Event" : "Has Events"); txtACQEventReady->SetTextColor( ((temp >> 3) & 0x1) == 0 ? 1 : blue);
|
||||||
|
txtACQEventFull ->SetText( ((temp >> 4) & 0x1) == 0 ? "no channel FULL" : "a channel FULL"); txtACQEventFull->SetTextColor( ((temp >> 4) & 0x1) == 0 ? 1 : red);
|
||||||
|
txtACQClockSource->SetText( ((temp >> 5) & 0x1) == 0 ? "Internal Clock" : "External Clock"); txtACQClockSource->SetTextColor( ((temp >> 5) & 0x1) == 0 ? 1 : blue);
|
||||||
|
txtACQPLLLock ->SetText( ((temp >> 7) & 0x1) == 0 ? "PLL no lock" : "PLL locked"); txtACQPLLLock->SetTextColor( ((temp >> 7) & 0x1) == 0 ? 1 : blue);
|
||||||
|
txtACQBoardReady ->SetText( ((temp >> 8) & 0x1) == 0 ? "Board NOT Ready (PLL & ADCs are NOT sync)" : "Board Ready (PLL & ADCs are sync)");
|
||||||
|
txtACQBoardReady->SetTextColor( ((temp >> 8) & 0x1) == 0 ? red : 1);
|
||||||
|
txtACQChDown ->SetText( ((temp >> 19) & 0x1) == 0 ? "Channels are ON" : "Channels ShutDown");
|
||||||
|
txtACQChDown->SetTextColor( ((temp >> 19) & 0x1) == 0 ? 1 : red);
|
||||||
|
txtACQSIN ->SetText( ((temp >> 15) & 0x1) == 0 ? "S-IN = 0" : "S-IN = 1"); txtACQSIN->SetTextColor( ((temp >> 15) & 0x1) == 0 ? 1 : blue);
|
||||||
|
txtACQTRIGIN ->SetText( ((temp >> 16) & 0x1) == 0 ? "TRG-IN = 0" : "TRG-IN = 1"); txtACQTRIGIN->SetTextColor( ((temp >> 16) & 0x1) == 0 ? 1 : blue);
|
||||||
|
|
||||||
|
txtACQTemp0->SetText( ((temp >> 20) & 0x1) == 0 ? "< 70" : "> 70"); txtACQTemp0->SetTextColor( ((temp >> 20) & 0x1) == 0 ? 1 : red);
|
||||||
|
txtACQTemp1->SetText( ((temp >> 21) & 0x1) == 0 ? "< 70" : "> 70"); txtACQTemp1->SetTextColor( ((temp >> 21) & 0x1) == 0 ? 1 : red);
|
||||||
|
txtACQTemp2->SetText( ((temp >> 22) & 0x1) == 0 ? "< 70" : "> 70"); txtACQTemp2->SetTextColor( ((temp >> 22) & 0x1) == 0 ? 1 : red);
|
||||||
|
txtACQTemp3->SetText( ((temp >> 23) & 0x1) == 0 ? "< 70" : "> 70"); txtACQTemp3->SetTextColor( ((temp >> 23) & 0x1) == 0 ? 1 : red);
|
||||||
|
|
||||||
|
/// Redaout Status
|
||||||
|
temp = pha->ReadRegister(Register::DPP::ReadoutStatus);
|
||||||
|
if( (temp & 0x1) == 1 ){
|
||||||
|
txtEventReady->SetText( "Event Ready" ); txtEventReady->SetTextColor(blue);
|
||||||
|
}else{
|
||||||
|
txtEventReady->SetText( "No Data Ready" ); txtEventReady->SetTextColor(red);
|
||||||
|
}
|
||||||
|
|
||||||
|
if( (( temp >> 2 ) & 0x1 ) == 0 ){
|
||||||
|
txtBusError->SetText( "no Bus Error" ); txtBusError->SetTextColor(blue);
|
||||||
|
}else{
|
||||||
|
txtBusError->SetText( "Bus Error" ); txtBusError->SetTextColor(red);
|
||||||
|
}
|
||||||
|
|
||||||
|
if( (( temp >> 3 ) & 0x1 ) == 0 ){
|
||||||
|
txtVMEFIFO->SetText( "VME FIFO NOT EMPTY" ); txtVMEFIFO->SetTextColor(red);
|
||||||
|
}else{
|
||||||
|
txtVMEFIFO->SetText( "VME FIFO EMPTY" ); txtVMEFIFO->SetTextColor(red);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
pha = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void BoardSetting::ChangeBoard(){
|
void BoardSetting::ChangeBoard(){
|
||||||
int boardID = boardIDEntry->GetNumber();
|
int boardID = boardIDEntry->GetNumber();
|
||||||
|
|
||||||
if( digi == NULL ) {
|
if( digi == NULL ) {
|
||||||
printf("no didgitizers\n");
|
printf("no didgitizers\n");
|
||||||
|
return;
|
||||||
}else{
|
}else{
|
||||||
digi[boardID]->PrintBoard();
|
digi[boardID]->PrintBoard();
|
||||||
}
|
}
|
||||||
|
@ -637,7 +769,7 @@ void BoardSetting::ChangeBoard(){
|
||||||
}
|
}
|
||||||
|
|
||||||
if( (temp & 0x20) == 0 ) {
|
if( (temp & 0x20) == 0 ) {
|
||||||
enTempStatus->SetText( "OK" ); enTempStatus->SetTextColor(1);
|
enTempStatus->SetText( "OK (<70)" ); enTempStatus->SetTextColor(1);
|
||||||
}else{
|
}else{
|
||||||
enTempStatus->SetText( "Failure" ); enTempStatus->SetTextColor(red);
|
enTempStatus->SetText( "Failure" ); enTempStatus->SetTextColor(red);
|
||||||
}
|
}
|
||||||
|
@ -681,7 +813,7 @@ void BoardSetting::ChangeBoard(){
|
||||||
}
|
}
|
||||||
numMajorCoinWin->SetNumber( (temp >> 20 ) & 0x7 );
|
numMajorCoinWin->SetNumber( (temp >> 20 ) & 0x7 );
|
||||||
GlbMajorLevel->SetNumber( ( temp >> 24) & 0x7 );
|
GlbMajorLevel->SetNumber( ( temp >> 24) & 0x7 );
|
||||||
bGLBLVDSTrigger->SetState( (( temp >> 29) & 0x1 ) == 0 ? kButtonUp : kButtonDown);
|
//bGLBLVDSTrigger->SetState( (( temp >> 29) & 0x1 ) == 0 ? kButtonUp : kButtonDown);
|
||||||
bGLBExtTrigger->SetState( (( temp >> 30) & 0x1 ) == 0 ? kButtonUp : kButtonDown);
|
bGLBExtTrigger->SetState( (( temp >> 30) & 0x1 ) == 0 ? kButtonUp : kButtonDown);
|
||||||
bGLBSoftwareTrigger->SetState( (( temp >> 31) & 0x1 ) == 0 ? kButtonUp : kButtonDown);
|
bGLBSoftwareTrigger->SetState( (( temp >> 31) & 0x1 ) == 0 ? kButtonUp : kButtonDown);
|
||||||
|
|
||||||
|
@ -705,14 +837,13 @@ void BoardSetting::ChangeBoard(){
|
||||||
}
|
}
|
||||||
cbTRGOUTMODE->Select( ( temp >> 8 ) & 0x3) ;
|
cbTRGOUTMODE->Select( ( temp >> 8 ) & 0x3) ;
|
||||||
TRGOUTMajorLevel->SetNumber( ( temp >> 10 ) & 0x7);
|
TRGOUTMajorLevel->SetNumber( ( temp >> 10 ) & 0x7);
|
||||||
bTRGOUTLVDSTrigger->SetState( (( temp >> 29) & 0x1 ) == 0 ? kButtonUp : kButtonDown);
|
//bTRGOUTLVDSTrigger->SetState( (( temp >> 29) & 0x1 ) == 0 ? kButtonUp : kButtonDown);
|
||||||
bTRGOUTExtTrigger->SetState( (( temp >> 30) & 0x1 ) == 0 ? kButtonUp : kButtonDown);
|
bTRGOUTExtTrigger->SetState( (( temp >> 30) & 0x1 ) == 0 ? kButtonUp : kButtonDown);
|
||||||
bTRGOUTSoftwareTrigger->SetState( (( temp >> 30) & 0x1 ) == 0 ? kButtonUp : kButtonDown);
|
bTRGOUTSoftwareTrigger->SetState( (( temp >> 30) & 0x1 ) == 0 ? kButtonUp : kButtonDown);
|
||||||
|
|
||||||
|
|
||||||
bEnableExtTRG->SetState( pha->GetSetting(Setting::PHA::DisableExternalTrigger_bool) == 1.0 ? kButtonDown : kButtonUp);
|
bEnableExtTRG->SetState( pha->GetSetting(Setting::PHA::DisableExternalTrigger_bool) == 1.0 ? kButtonDown : kButtonUp);
|
||||||
|
|
||||||
//numExtendVetoDelay->SetNumber( pha->GetSetting(Setting::PHA::
|
numExtendVetoDelay->SetNumber( pha->GetSetting(Setting::PHA::ExtendedVetoDelay_16bit) );
|
||||||
|
|
||||||
/// Front Panel I/O Control
|
/// Front Panel I/O Control
|
||||||
temp = pha->ReadRegister(Register::DPP::FrontPanelIOControl);
|
temp = pha->ReadRegister(Register::DPP::FrontPanelIOControl);
|
||||||
|
@ -723,8 +854,18 @@ void BoardSetting::ChangeBoard(){
|
||||||
cbTRGINMezzanines->Select( (temp >> 11) & 0x1 );
|
cbTRGINMezzanines->Select( (temp >> 11) & 0x1 );
|
||||||
|
|
||||||
cbAnaMonitor->Select( pha->GetSetting(Setting::PHA::AnalogMonitorMode_3bit) );
|
cbAnaMonitor->Select( pha->GetSetting(Setting::PHA::AnalogMonitorMode_3bit) );
|
||||||
|
numBufferOccpGain->SetNumber( pha->GetSetting(Setting::PHA::BufferOccupancyGain_4bit));
|
||||||
|
|
||||||
|
/// Readout Control
|
||||||
|
temp = pha->ReadRegister(Register::DPP::ReadoutControl);
|
||||||
|
cbVMEInterrupLevel->Select( temp & 0x3 );
|
||||||
|
bOpticalLinkInterrupt->SetState( (( temp >> 3 ) & 0x1 ) == 0 ? kButtonUp : kButtonDown) ;
|
||||||
|
bEventAligned->SetState( (( temp >> 4 ) & 0x1 ) == 0 ? kButtonUp : kButtonDown) ;
|
||||||
|
bVMEAlogn64Mode->SetState( (( temp >> 5 ) & 0x1 ) == 0 ? kButtonUp : kButtonDown) ;
|
||||||
|
bInteruptReleaseMode->SetState( (( temp >> 7 ) & 0x1 ) == 0 ? kButtonUp : kButtonDown) ;
|
||||||
|
bEnableExtendedBlockTransfer->SetState( (( temp >> 8 ) & 0x1 ) == 0 ? kButtonUp : kButtonDown) ;
|
||||||
|
|
||||||
|
|
||||||
//numBufferOccpGain
|
|
||||||
|
|
||||||
pha = NULL; ///unlink the pointer
|
pha = NULL; ///unlink the pointer
|
||||||
}else if( digi[boardID]->GetDPPType() == V1730_DPP_PSD_CODE ) {
|
}else if( digi[boardID]->GetDPPType() == V1730_DPP_PSD_CODE ) {
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
#include <TGNumberEntry.h>
|
#include <TGNumberEntry.h>
|
||||||
#include <TGButton.h>
|
#include <TGButton.h>
|
||||||
#include <TGComboBox.h>
|
#include <TGComboBox.h>
|
||||||
|
#include <TThread.h>
|
||||||
#include <TGLabel.h>
|
#include <TGLabel.h>
|
||||||
#include "DigitizerPHA.h"
|
#include "DigitizerPHA.h"
|
||||||
#include "DigitizerPSD.h"
|
#include "DigitizerPSD.h"
|
||||||
|
@ -18,16 +19,16 @@ class BoardSetting{
|
||||||
private:
|
private:
|
||||||
TGMainFrame * fMain;
|
TGMainFrame * fMain;
|
||||||
|
|
||||||
Pixel_t red, blue;
|
static Pixel_t red, blue;
|
||||||
|
|
||||||
TGNumberEntry * boardIDEntry;
|
static TGNumberEntry * boardIDEntry;
|
||||||
|
|
||||||
TGTextEntry * entry[NUM_BOARD_INFO];
|
TGTextEntry * entry[NUM_BOARD_INFO];
|
||||||
|
|
||||||
int nDigi;
|
int nDigi;
|
||||||
Digitizer ** digi;
|
static Digitizer ** digi;
|
||||||
DigitizerPHA * pha;
|
static DigitizerPHA * pha;
|
||||||
DigitizerPSD * psd;
|
static DigitizerPSD * psd;
|
||||||
|
|
||||||
/// board failure status
|
/// board failure status
|
||||||
TGTextEntry * enPLLStatus;
|
TGTextEntry * enPLLStatus;
|
||||||
|
@ -57,6 +58,21 @@ class BoardSetting{
|
||||||
TGTextButton * bSWClockSync;
|
TGTextButton * bSWClockSync;
|
||||||
TGNumberEntry * numRunStartStopDelay;
|
TGNumberEntry * numRunStartStopDelay;
|
||||||
|
|
||||||
|
/// ACQ Status
|
||||||
|
static TGTextEntry * txtACQStatus;
|
||||||
|
static TGTextEntry * txtACQEventReady;
|
||||||
|
static TGTextEntry * txtACQEventFull;
|
||||||
|
static TGTextEntry * txtACQClockSource;
|
||||||
|
static TGTextEntry * txtACQPLLLock;
|
||||||
|
static TGTextEntry * txtACQChDown;
|
||||||
|
static TGTextEntry * txtACQSIN;
|
||||||
|
static TGTextEntry * txtACQTRIGIN;
|
||||||
|
static TGTextEntry * txtACQBoardReady;
|
||||||
|
static TGTextEntry * txtACQTemp0;
|
||||||
|
static TGTextEntry * txtACQTemp1;
|
||||||
|
static TGTextEntry * txtACQTemp2;
|
||||||
|
static TGTextEntry * txtACQTemp3;
|
||||||
|
|
||||||
/// Trigger control
|
/// Trigger control
|
||||||
TGCheckButton * cbGbTRGMskCh[8];
|
TGCheckButton * cbGbTRGMskCh[8];
|
||||||
TGCheckButton * cbTRGValMskCh[8];
|
TGCheckButton * cbTRGValMskCh[8];
|
||||||
|
@ -90,13 +106,26 @@ class BoardSetting{
|
||||||
TGComboBox * cbLEMOIO;
|
TGComboBox * cbLEMOIO;
|
||||||
TGComboBox * cbTRGOUTmode;
|
TGComboBox * cbTRGOUTmode;
|
||||||
TGCheckButton * bTRGOUTImp;
|
TGCheckButton * bTRGOUTImp;
|
||||||
|
|
||||||
TGComboBox * cbTRGINCtrl;
|
TGComboBox * cbTRGINCtrl;
|
||||||
TGComboBox * cbTRGINMezzanines;
|
TGComboBox * cbTRGINMezzanines;
|
||||||
|
|
||||||
TGComboBox * cbAnaMonitor;
|
TGComboBox * cbAnaMonitor;
|
||||||
TGNumberEntry * numBufferOccpGain;
|
TGNumberEntry * numBufferOccpGain;
|
||||||
|
|
||||||
|
/// Readout Control
|
||||||
|
TGComboBox * cbVMEInterrupLevel;
|
||||||
|
TGCheckButton * bOpticalLinkInterrupt;
|
||||||
|
TGCheckButton * bEventAligned;
|
||||||
|
TGCheckButton * bVMEAlogn64Mode;
|
||||||
|
TGCheckButton * bInteruptReleaseMode;
|
||||||
|
TGCheckButton * bEnableExtendedBlockTransfer;
|
||||||
|
|
||||||
|
/// Redaout Status
|
||||||
|
static TGTextEntry * txtEventReady;
|
||||||
|
static TGTextEntry * txtBusError;
|
||||||
|
static TGTextEntry * txtVMEFIFO;
|
||||||
|
|
||||||
|
TThread * readStatusThread;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
BoardSetting(const TGWindow *p, UInt_t w, UInt_t h, Digitizer ** digi, int nBoard);
|
BoardSetting(const TGWindow *p, UInt_t w, UInt_t h, Digitizer ** digi, int nBoard);
|
||||||
virtual ~BoardSetting();
|
virtual ~BoardSetting();
|
||||||
|
@ -108,6 +137,8 @@ class BoardSetting{
|
||||||
}
|
}
|
||||||
void ChangeBoard();
|
void ChangeBoard();
|
||||||
|
|
||||||
|
static void * ReadStatus(void * ptr); /// thread.
|
||||||
|
|
||||||
///=== Board Configure
|
///=== Board Configure
|
||||||
void SetAutoDataFlush();
|
void SetAutoDataFlush();
|
||||||
void SetDecimateWF();
|
void SetDecimateWF();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user