From db3486d6c952e30959af442fc6780d7ab1f113a4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fernando=20Hueso=20Gonz=C3=A1lez?=
 <58-ferhue@users.noreply.igit.ific.uv.es>
Date: Thu, 19 Sep 2024 09:16:24 +0200
Subject: [PATCH] fix start args

---
 test_gui.cpp | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/test_gui.cpp b/test_gui.cpp
index 484ad50..debb24c 100644
--- a/test_gui.cpp
+++ b/test_gui.cpp
@@ -26,12 +26,12 @@ PulseSurfer* ps = NULL;//global variable pointer
  * \param bytesPerSample 2 bytes (int16) are used per sample point. Other things are not supported
  * \param subtractBaseline automatic baseline subtraction
  * \param persist set 2D persistency accumulation
- * \param xmin zoom min x value
+ * \param xmin zoom min x value, use == xmax to skip this setting
  * \param xmax zoom max x value
- * \param ymin zoom min y value
+ * \param ymin zoom min y value, use == ymax to autozoom instead
  * \param ymax zoom max y value
  */
-void test_gui(const TString fileName, const UInt_t samplesPerPulse=32768, const UInt_t preTrigger=0, const Short_t overflow=32767, const UShort_t bytesPerSample=2, const Bool_t subtractBaseline=kFALSE, const Bool_t persist=kFALSE, const Int_t xmin=0, const Int_t xmax=32767, const Int_t ymin=0, const Int_t ymax=16383)
+void test_gui(const TString fileName, const UInt_t samplesPerPulse=32768, const UInt_t preTrigger=0, const Short_t overflow=32767, const UShort_t bytesPerSample=2, const Bool_t subtractBaseline=kFALSE, const Bool_t persist=kFALSE, const Int_t xmin=0, const Int_t xmax=0, const Int_t ymin=0, const Int_t ymax=0)
 {
     ps = new PulseSurfer();
     ps->Open(fileName,samplesPerPulse,preTrigger,overflow,bytesPerSample);
@@ -43,8 +43,8 @@ void test_gui(const TString fileName, const UInt_t samplesPerPulse=32768, const
     if(!c) return;
     TH1* h = (TH1*)gROOT->FindObject(kHistName);
     if(!h) return;
-    h->GetXaxis()->SetRangeUser(xmin,xmax);
-    h->GetYaxis()->SetRangeUser(ymin,ymax);
+    if(xmin!= xmax) h->GetXaxis()->SetRangeUser(xmin,xmax);
+    if(ymin!= ymax) h->GetYaxis()->SetRangeUser(ymin,ymax);
 }
 
 /**
-- 
GitLab