hanging musrt0's should be eliminated now (MUSR-153)

This commit is contained in:
nemu 2010-10-29 05:29:49 +00:00
parent 622f656849
commit a6466e2dac
4 changed files with 18 additions and 2 deletions

View File

@ -22,6 +22,7 @@ NEW integration of a few external musrfit plug-ins into the standard build proce
NEW default estimates for 'data' and 'background' entries in RUN blocks
NEW directory with some msr- and data-files for quick testing of new musrfit installations
NEW option to musrt0: the key 'T' will set the t0 cursor to the maximum of the histogram
FIXED hanging musrt0's should be eliminated now (MUSR-153)
FIXED wrong WARNING message for use_fit_ranges
FIXED bug in event handling leading to crash for non-muSR when switching between view and difference view
FIXED chisq/maxLH lables in the statistics block are properly handled now (MUSR-148)

View File

@ -511,6 +511,7 @@ PMusrT0::PMusrT0(PMusrT0Data &data) : fMusrT0Data(data)
fMainCanvas->Connect("ProcessedEvent(Int_t,Int_t,Int_t,TObject*)", "PMusrT0",
this, "HandleCmdKey(Int_t,Int_t,Int_t,TObject*)");
fMainCanvas->Connect("Closed()", "PMusrT0", this, "Quit()");
if (fMusrT0Data.GetCmdTag() != PMUSRT0_GET_T0)
fDataAndBkgEnabled = true;
@ -592,7 +593,7 @@ PMusrT0::~PMusrT0()
delete fLastDataLine;
fLastDataLine = 0;
}
if (fMainCanvas) {
if (fMainCanvas && (fStatus != 2)) {
delete fMainCanvas;
fMainCanvas = 0;
}
@ -665,6 +666,19 @@ void PMusrT0::HandleCmdKey(Int_t event, Int_t x, Int_t y, TObject *selected)
}
}
//--------------------------------------------------------------------------
// Quit (public)
//--------------------------------------------------------------------------
/**
* <p>Slot called when the canvas is closed via the close icon (cross top right corner).
* It is emitting a global quit singal.
*/
void PMusrT0::Quit()
{
fStatus = 2; // will quit globally
Done(0);
}
//--------------------------------------------------------------------------
// SetMsrHandler
//--------------------------------------------------------------------------

View File

@ -126,6 +126,7 @@ class PMusrT0 : public TObject, public TQObject
virtual void Done(Int_t status=0); // *SIGNAL*
virtual void HandleCmdKey(Int_t event, Int_t x, Int_t y, TObject *selected); // SLOT
virtual void Quit(); // SLOT
#ifndef __MAKECINT__
virtual void SetMsrHandler(PMsrHandler *msrHandler);

View File

@ -111,7 +111,7 @@ Bool_t musrt0_item(TApplication &app, PMsrHandler *msrHandler, PMusrT0Data &data
app.Run(true); // true needed that Run will return after quit
Bool_t result = true;
if (musrT0->GetStatus() == 1)
if (musrT0->GetStatus() >= 1)
result = false;
else
result = true;