From cdbdca74de2d016a22f42fbea0e2081b4772790e Mon Sep 17 00:00:00 2001 From: Benjamin Linnik Date: Wed, 31 Jan 2018 18:39:30 +0100 Subject: [PATCH] Analyzer: small Cosmetics --- MABS_run_analyzer/ChargeSpektrum.c | 2 +- MABS_run_analyzer/ChargeSpektrumFunctions.cpp | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/MABS_run_analyzer/ChargeSpektrum.c b/MABS_run_analyzer/ChargeSpektrum.c index 51c69e3..f0f55ca 100644 --- a/MABS_run_analyzer/ChargeSpektrum.c +++ b/MABS_run_analyzer/ChargeSpektrum.c @@ -524,6 +524,6 @@ void ChargeSpektrum(TString runnumber = "") // Don't change this gROOT->SetBatch(kTRUE); - plotAllRuns(&compareHistogramClassVectorMABSBot, kTRUE); + plotAllRuns(&compareHistogramClassVectorMABSBot, kTRUE, kTRUE); cout << "" << endl; } diff --git a/MABS_run_analyzer/ChargeSpektrumFunctions.cpp b/MABS_run_analyzer/ChargeSpektrumFunctions.cpp index 27c7445..1261047 100644 --- a/MABS_run_analyzer/ChargeSpektrumFunctions.cpp +++ b/MABS_run_analyzer/ChargeSpektrumFunctions.cpp @@ -25,7 +25,7 @@ using namespace std; Int_t* ReadRunList(); Int_t ReadRunList(std::vector*); void InterpreteUserInput(TString, std::vector*, std::vector*, std::vector*, std::vector*, TString* analysisis); -Bool_t plotAllRuns(vector*, Bool_t unZoom); +Bool_t plotAllRuns(vector*, Bool_t unZoom, Bool_t useLog); // vector wich is used to save a good title by the function FindGoodTitle() vector headerStringsVector; // vector wich is used to save good legend entries by the function FindGoodTitle() @@ -916,7 +916,7 @@ Bool_t testifMixingCalibration(vector* ptCompareHistogramClassVe * Plots all runs pushed into the input vector in one canvas, shows Seed, Sum, Veto and Noise spectra * */ -Bool_t plotAllRuns(vector* ptCompareHistogramClassVector, Bool_t unZoom = kFALSE) +Bool_t plotAllRuns(vector* ptCompareHistogramClassVector, Bool_t unZoom = kFALSE, Bool_t useLog = kFALSE) { if (ptCompareHistogramClassVector->size()>0) { @@ -1037,7 +1037,8 @@ Bool_t plotAllRuns(vector* ptCompareHistogramClassVector, Bool_t curhistogramclone->SetAxisRange(0,lastbin1*1.1,"X"); curhistogramclone->SetAxisRange(0,heighestval1*1.1,"Y"); curhistogramclone->GetYaxis()->SetRangeUser(1,heighestval1*1.2); - // gPad->SetLogy(1); + if (useLog) + gPad->SetLogy(1); gPad->SetGrid(1); gPad->SetGridy(1); owntitle->Clear(); @@ -1063,7 +1064,8 @@ Bool_t plotAllRuns(vector* ptCompareHistogramClassVector, Bool_t // heighestval2 = (curhistogramclone->GetMaximum()>heighestval2?curhistogramclone->GetMaximum():heighestval2); curhistogramclone->GetYaxis()->SetRangeUser(1,heighestval2*1.2); curhistogramclone->Draw("SAME"); - // gPad->SetLogy(1); + if (useLog) + gPad->SetLogy(1); gPad->SetGrid(1); gPad->SetGridy(1); -- 2.43.0