TOF: add start publishing#2233
Conversation
| TCanvas* canvas = new TCanvas(mHistoHitMap->GetName(), mHistoHitMap->GetName()); | ||
| if (!mCanvasMo) { | ||
| mCanvasMo = std::make_shared<TCanvas>(mHistoHitMap->GetName(), mHistoHitMap->GetName()); | ||
| getObjectsManager()->startPublishing(mCanvasMo.get()); |
There was a problem hiding this comment.
In case of START STOP START, at the 2nd start the object will be still there in mCanvasMo, but it will not be registered to publish again.
You could consider deleting it in finalize() to be in a fresh state after you enter update() first time after the 2nd start.
There was a problem hiding this comment.
Hi Piotr, that's right, many thanks!
There was a problem hiding this comment.
Actually, the if is not needed, let's use the initialize directly and change the name accordingly for each call.
There was a problem hiding this comment.
this is in principle ok, but the small problem is that at 2nd START for a brief moment there will be two instances of the TCanvas with the same name, here:
mCanvasMo = std::make_shared<TCanvas>("defaultMap", "defaultMap");
one on the left, one on the right. unfortunately this makes ROOT crash sometimes.
It will be all good if you reset the sh. pointer before:
mCanvasMo.reset();
the same issue might happen with mPhosPad
* TOF: add start publishing * Fix header * Fix * Deleting MO * Use initialize * ResetBefore
No description provided.