#ifndef CHANNEL_SETTING_PHA_H #define CHANNEL_SETTING_PHA_H #include #include #include #include #include #include #include "ClassDigitizer.h" #include "macro.h" class TGWindow; class TGMainFrame; class ChannelSettingPHA{ RQ_OBJECT("ChannelSettingPHA") private: TGMainFrame * fMain; TGNumberEntry * boardIDEntry, * chIDEntry; TGTextEntry * eTemp ; TGTextEntry * txtSPIBus; TGTextEntry * txtADCCaliStatus; TGTextEntry * txtADCPowerStatus; TGComboBox * cbOnOff; TGComboBox * cbPolarity; TGComboBox * cbInputDynamicRange; TGNumberEntry * numRecordLength; TGNumberEntry * numPreTrigger; TGNumberEntry * numEventAgg; TGTextEntry * eBuffer ; TGNumberEntry * numTriggerThreshold; TGNumberEntry * numTriggerHoldOff; TGNumberEntry * numDCOffset; TGComboBox * cbTriggerSmoothing; TGNumberEntry * numInputRiseTime; TGNumberEntry * numRiseTimeValidWin; TGComboBox * cbTriggerMode; TGNumberEntry * numShapedTriggerWidth; TGNumberEntry * numTrapRiseTime; TGNumberEntry * numTrapFlatTop; TGNumberEntry * numDecay; TGNumberEntry * numPeaking; TGNumberEntry * numPeakHoldOff; TGComboBox * cbPeakMean; TGComboBox * cbBaseLineAvg; TGNumberEntry * numTrapScale; TGComboBox * cbDecimation; TGComboBox * cbDecimationGain; TGComboBox * cbRollOver; TGComboBox * cbPileUp; TGComboBox * cbLocalShapedTrigger; TGComboBox * cbLocalTriggerValid; TGComboBox * cbVetoSource; TGComboBox * cbTriggerCounterRate; TGComboBox * cbBaselineCal; TGComboBox * cbTagCorrelatedEvent; TGComboBox * cbBaselineOptimize; TGComboBox * cbDisableSelfTrigger; TGComboBox * cbExtra2WordOption; int NChannel; // hard coded = 16 bool isOpened; int presentBoardID; unsigned short ch2ns; void ChangeAStep(TGNumberEntry * numEntry, unsigned short stepSize, uint32_t address); public: ChannelSettingPHA(const TGWindow *p, UInt_t w, UInt_t h, int boardID); virtual ~ChannelSettingPHA(); void CloseWindow() { delete this; } bool IsOpen() {return isOpened;} void ChangeBoard(); void ChangeCh(); /// also get all settings void SetAllChannels(); void SetChannelMask(); void SetDPPAlgorithm1(); void SetDPPAlgorithm2(); void SetInputDynamicRange(); void SetRecordLength(); void SetPreTrigger(); void SetEventAggregate(); void SetTriggerThreshold(); void SetTriggerHoldOff(); void SetDCOffset(); void SetTriggerSmoothing(); void SetInputRiseTime(); void SetRiseTimeValidWin(); void SetShaperTriggerWidth(); void SetTrapRiseTime(); void SetTrapFlatTop(); void SetDecay(); void SetPeaking(); void SetPeakHoldOff(); void ReadTrace(); void LogMsg(TString msg); // *SIGNAL* void SendPlotTraceCmd(); // *SIGNAL* }; #endif