#ifndef CHANNEL_SETTING_H #define CHANNEL_SETTING_H #include #include #include #include #include #include #include "ClassDigitizer.h" #include "macro.h" class TGWindow; class TGMainFrame; class ChannelSetting{ RQ_OBJECT("ChannelSetting") private: TGMainFrame * fMain; TGNumberEntry * boardIDEntry, * chIDEntry; TGTextEntry * eTemp ; TGComboBox * cbOnOff; TGComboBox * cbPolarity; TGComboBox * cbInputDynamicRange; TGNumberEntry * numRecordLength; TGNumberEntry * numPreTrigger; TGNumberEntry * numEventAgg; TGNumberEntry * numTriggerThreshold; TGNumberEntry * numTriggerHoldOff; TGNumberEntry * numDCOffset; TGComboBox * cbTriggerSmoothing; TGNumberEntry * numInputRiseTime; TGNumberEntry * numRiseTimeValidWin; TGComboBox * cbTriggerMode; 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; Digitizer ** digi; int NChannel; bool isOpened; unsigned short ch2ns; void ChangeAStep(TGNumberEntry * numEntry, unsigned short stepSize, uint32_t address); public: ChannelSetting(const TGWindow *p, UInt_t w, UInt_t h, Digitizer ** digi, int nDigi); virtual ~ChannelSetting(); 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 SetTrapRiseTime(); void SetTrapFlatTop(); void SetDecay(); void SetPeaking(); void SetPeakHoldOff(); void ChLogMsg(TString); // *SIGNAL* }; #endif