change some names in MultiBuilder.h, add setting for event time window in SPlitpotle analyszer

This commit is contained in:
Ryan Tang 2024-06-13 16:12:29 -04:00
parent e9e5ae3023
commit 106fe3f155
3 changed files with 21 additions and 7 deletions

View File

@ -14,16 +14,16 @@ public:
MultiBuilder(Data * singleData, int type, int sn); MultiBuilder(Data * singleData, int type, int sn);
~MultiBuilder(); ~MultiBuilder();
void SetTimeWindow(unsigned short ticks) {timeWindow = ticks; leftOverTime = ticks;} void SetTimeWindow(unsigned short nanosec) {timeWindow = nanosec; leftOverTime = nanosec;}
unsigned short GetTimeWindow() const{return timeWindow;} unsigned short GetTimeWindow() const{return timeWindow;}
void SetTimeJump(unsigned long long TimeJumpInNanoSec) {timeJump = TimeJumpInNanoSec;} void SetTimeJump(unsigned long long TimeJumpInNanoSec) {timeJump = TimeJumpInNanoSec;}
unsigned long long GetTimeJump() const {return timeJump;} unsigned long long GetTimeJump() const {return timeJump;}
void SetLeftOverTime(unsigned long long ticks) {leftOverTime = ticks;} void SetLeftOverTime(unsigned long long nanosec) {leftOverTime = nanosec;}
unsigned long long GetLeftOverTime() const{return leftOverTime;} unsigned long long GetLeftOverTime() const{return leftOverTime;}
void SetBreakTime(unsigned long long ticks) {breakTime = ticks;} void SetBreakTime(unsigned long long nanosec) {breakTime = nanosec;}
unsigned long long GetBreakTime() const{return breakTime;} unsigned long long GetBreakTime() const{return breakTime;}
unsigned int GetNumOfDigitizer() const {return nData;} unsigned int GetNumOfDigitizer() const {return nData;}

View File

@ -31,7 +31,7 @@ public:
tick2ns = digi[0]->GetTick2ns(); tick2ns = digi[0]->GetTick2ns();
SetBackwardBuild(false, 100); // using normal building (acceding in time) or backward building, int the case of backward building, default events to be build is 100. SetBackwardBuild(false, 100); // using normal building (acceding in time) or backward building, int the case of backward building, default events to be build is 100.
evtbder = GetEventBuilder(); evtbder = GetEventBuilder();
evtbder->SetTimeWindow(500); evtbder->SetTimeWindow(1000);
//========== use the influx from the Analyzer //========== use the influx from the Analyzer
influx = new InfluxDB("https://fsunuc.physics.fsu.edu/influx/"); influx = new InfluxDB("https://fsunuc.physics.fsu.edu/influx/");
@ -87,6 +87,7 @@ private:
RSpinBox * sbEnergy; RSpinBox * sbEnergy;
RSpinBox * sbAngle; RSpinBox * sbAngle;
RSpinBox * sbEventWin;
QCheckBox * chkRunAnalyzer; QCheckBox * chkRunAnalyzer;
QLineEdit * leMassTablePath; QLineEdit * leMassTablePath;
@ -212,9 +213,22 @@ inline void SplitPole::SetUpCanvas(){
FillConstants(); FillConstants();
}); });
chkRunAnalyzer = new QCheckBox("Run Analyzer", this);
boxLayout->addWidget(chkRunAnalyzer, 4, 1);
QLabel * lbEventWindow = new QLabel("Event Window [ns] ", box);
lbEventWindow->setAlignment(Qt::AlignRight | Qt::AlignCenter);
boxLayout->addWidget(lbEventWindow, 4, 0);
sbEventWin = new RSpinBox(this);
sbEventWin->setDecimals(0);
sbEventWin->setSingleStep(100);
sbEventWin->setMaximum(1000000);
boxLayout->addWidget(sbEventWin, 4, 1);
sbEventWin->setValue(1000);
connect(sbEventWin, &RSpinBox::returnPressed, this, [=](){
evtbder->SetTimeWindow(sbEventWin->value());
});
chkRunAnalyzer = new QCheckBox("Run Analyzer", this);
boxLayout->addWidget(chkRunAnalyzer, 4, 3);
QFrame *separator = new QFrame(box); QFrame *separator = new QFrame(box);
separator->setFrameShape(QFrame::HLine); separator->setFrameShape(QFrame::HLine);

View File

@ -42,7 +42,7 @@ namespace SPS{
const short dBR = 10; const short dBR = 10;
const short dBL = 11; const short dBL = 11;
const short Cathode = 7; const short Cathode = 7;
const short AnodeF = 13; const short AnodeF = 12;
const short AnodeB = 15; const short AnodeB = 15;
}; };