From 106fe3f15533a01eb1427def6e178e0dafa1110c Mon Sep 17 00:00:00 2001 From: "Ryan@SOLARIS_testStation" Date: Thu, 13 Jun 2024 16:12:29 -0400 Subject: [PATCH] change some names in MultiBuilder.h, add setting for event time window in SPlitpotle analyszer --- MultiBuilder.h | 6 +++--- analyzers/SplitPoleAnalyzer.h | 20 +++++++++++++++++--- analyzers/SplitPoleHit.h | 2 +- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/MultiBuilder.h b/MultiBuilder.h index 9251b94..dd09f58 100644 --- a/MultiBuilder.h +++ b/MultiBuilder.h @@ -14,16 +14,16 @@ public: MultiBuilder(Data * singleData, int type, int sn); ~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;} void SetTimeJump(unsigned long long TimeJumpInNanoSec) {timeJump = TimeJumpInNanoSec;} 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;} - void SetBreakTime(unsigned long long ticks) {breakTime = ticks;} + void SetBreakTime(unsigned long long nanosec) {breakTime = nanosec;} unsigned long long GetBreakTime() const{return breakTime;} unsigned int GetNumOfDigitizer() const {return nData;} diff --git a/analyzers/SplitPoleAnalyzer.h b/analyzers/SplitPoleAnalyzer.h index cee5b81..0bd1748 100644 --- a/analyzers/SplitPoleAnalyzer.h +++ b/analyzers/SplitPoleAnalyzer.h @@ -31,7 +31,7 @@ public: 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. evtbder = GetEventBuilder(); - evtbder->SetTimeWindow(500); + evtbder->SetTimeWindow(1000); //========== use the influx from the Analyzer influx = new InfluxDB("https://fsunuc.physics.fsu.edu/influx/"); @@ -87,6 +87,7 @@ private: RSpinBox * sbEnergy; RSpinBox * sbAngle; + RSpinBox * sbEventWin; QCheckBox * chkRunAnalyzer; QLineEdit * leMassTablePath; @@ -212,9 +213,22 @@ inline void SplitPole::SetUpCanvas(){ 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); separator->setFrameShape(QFrame::HLine); diff --git a/analyzers/SplitPoleHit.h b/analyzers/SplitPoleHit.h index cd2d005..43fbdc0 100644 --- a/analyzers/SplitPoleHit.h +++ b/analyzers/SplitPoleHit.h @@ -42,7 +42,7 @@ namespace SPS{ const short dBR = 10; const short dBL = 11; const short Cathode = 7; - const short AnodeF = 13; + const short AnodeF = 12; const short AnodeB = 15; };