fix of fix
This commit is contained in:
parent
f8105a081d
commit
6fe5041b4c
@ -95,7 +95,7 @@ PMusrCanvas::PMusrCanvas(const int number, const char* title,
|
||||
*/
|
||||
PMusrCanvas::~PMusrCanvas()
|
||||
{
|
||||
cout << "~PMusrCanvas() called" << endl;
|
||||
cout << "~PMusrCanvas() called. fMainCanvas name=" << fMainCanvas->GetName() << endl;
|
||||
// cleanup
|
||||
if (fStyle) {
|
||||
delete fStyle;
|
||||
@ -332,7 +332,7 @@ void PMusrCanvas::UpdateParamTheoryPad()
|
||||
if (param[i].fPosErrorPresent) { // minos was used
|
||||
// calculate the arithmetic average of the pos. and neg. error
|
||||
double err;
|
||||
err = param[i].fPosError + param[i].fStep / 2.0;
|
||||
err = (param[i].fPosError - param[i].fStep) / 2.0;
|
||||
// check if the pos. and neg. error within 10%
|
||||
if ((fabs(fabs(param[i].fStep) - param[i].fPosError) < 0.1*fabs(param[i].fStep)) &&
|
||||
(fabs(fabs(param[i].fStep) - param[i].fPosError) < 0.1*param[i].fPosError)) {
|
||||
|
@ -38,6 +38,7 @@ using namespace std;
|
||||
|
||||
#include <TApplication.h>
|
||||
#include <TSAXParser.h>
|
||||
#include <TROOT.h>
|
||||
|
||||
#include "PMusr.h"
|
||||
#include "PStartupHandler.h"
|
||||
@ -264,9 +265,16 @@ cout << endl;
|
||||
|
||||
// clean up
|
||||
cout << endl << "clean up canvas vector ...";
|
||||
char canvasName[32];
|
||||
for (unsigned int i=0; i<canvasVector.size(); i++) {
|
||||
// check if canvas is still there before calling the destructor **TO BE DONE**
|
||||
canvasVector[i]->~PMusrCanvas();
|
||||
sprintf(canvasName, "fMainCanvas%d", i);
|
||||
cout << endl << ">> canvasName=" << canvasName;
|
||||
if (gROOT->GetListOfCanvases()->FindObject(canvasName) != 0) {
|
||||
cout << endl << ">> canvasName=" << canvasName << ", found ...";
|
||||
cout << endl;
|
||||
canvasVector[i]->~PMusrCanvas();
|
||||
}
|
||||
}
|
||||
canvasVector.empty();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user