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