From e55ac4ecee7b12751dbe89cade89b733e6c209c8 Mon Sep 17 00:00:00 2001 From: Suter Andreas Date: Fri, 18 Sep 2015 16:21:15 +0200 Subject: [PATCH 1/2] after cross-check with BMW cleaned up, removed one copy/paste error (break;) and re-enabled the other twos which are indeed needed. --- ChangeLog | 2 ++ src/classes/PMsr2Data.cpp | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 51e8c3c3..e84cfb16 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,8 @@ NEW 2015-02-21 add proper Mac icon to musredit FIXED 2015-09-17 in PMsr2Data::PrepareGlobalInputFile() there seem to be 'unmotivated' break; commands in some loops. They prevent a proper map handling. Since this is a real puzzle I contacted BMW for clarification. + 2015-09-18: there is only one unmotivated break; cleaned up the code + accordingly. FIXED 2015-09-14 any2many export of MusrRoot crashed when first histo group was != 0. This happend when exporting to PSI-BIN or WKM. This is fixed now. FIXED 2015-09-08 fixed error in view_packing for single histo (wrong norm of the theory). diff --git a/src/classes/PMsr2Data.cpp b/src/classes/PMsr2Data.cpp index bf5fd68e..d00cd073 100644 --- a/src/classes/PMsr2Data.cpp +++ b/src/classes/PMsr2Data.cpp @@ -813,7 +813,7 @@ bool PMsr2Data::PrepareGlobalInputFile(unsigned int tempRun, const string &msrOu tempVec[j].append(boost::lexical_cast(l + 1)); } } -//as break; + break; } } } @@ -902,7 +902,7 @@ bool PMsr2Data::PrepareGlobalInputFile(unsigned int tempRun, const string &msrOu } mapExists = false; } -//as break; + break; } } } @@ -1111,7 +1111,6 @@ bool PMsr2Data::PrepareGlobalInputFile(unsigned int tempRun, const string &msrOu lineChanged = true; } } -//as break; } catch(boost::bad_lexical_cast &) { // in case the cast does not work: do nothing - this means the entry is not a simple parameter From fc9c573f2af134fdb13c26a18a568879a350ae11 Mon Sep 17 00:00:00 2001 From: Suter Andreas Date: Sun, 20 Sep 2015 19:06:38 +0200 Subject: [PATCH 2/2] some minor improvements proposed by BMW: fix data to graph --- src/classes/PMusrCanvas.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/classes/PMusrCanvas.cpp b/src/classes/PMusrCanvas.cpp index 760d7b2f..e34486bf 100644 --- a/src/classes/PMusrCanvas.cpp +++ b/src/classes/PMusrCanvas.cpp @@ -4780,18 +4780,22 @@ void PMusrCanvas::PlotData(Bool_t unzoom) // add all data to fMultiGraphData for (UInt_t i=0; iSetEditable(false); fMultiGraphData->Add(ge, "p"); } // add all the theory to fMultiGraphData for (UInt_t i=0; iSetEditable(false); fMultiGraphData->Add(ge, "l"); } @@ -4836,6 +4840,11 @@ void PMusrCanvas::PlotData(Bool_t unzoom) if (fMultiGraphLegend) fMultiGraphLegend->Draw(); } + + // report canvas status events in non-musr plots + if (!fMainCanvas->GetShowEventStatus()) { + fMainCanvas->ToggleEventStatus(); + } } fDataTheoryPad->Update(); @@ -5018,10 +5027,12 @@ void PMusrCanvas::PlotDifference(Bool_t unzoom) // add all diff data to fMultiGraphDiff for (UInt_t i=0; iSetEditable(false); fMultiGraphDiff->Add(ge, "p"); }