Skip to content

TOF: add start publishing#2233

Merged
knopers8 merged 6 commits intoAliceO2Group:masterfrom
njacazio:nj-tofconfig
Apr 12, 2024
Merged

TOF: add start publishing#2233
knopers8 merged 6 commits intoAliceO2Group:masterfrom
njacazio:nj-tofconfig

Conversation

@njacazio
Copy link
Copy Markdown
Collaborator

No description provided.

@njacazio
Copy link
Copy Markdown
Collaborator Author

@ercolessi

Comment thread Modules/TOF/src/PostProcessHitMap.cxx Outdated
TCanvas* canvas = new TCanvas(mHistoHitMap->GetName(), mHistoHitMap->GetName());
if (!mCanvasMo) {
mCanvasMo = std::make_shared<TCanvas>(mHistoHitMap->GetName(), mHistoHitMap->GetName());
getObjectsManager()->startPublishing(mCanvasMo.get());
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Piotr, that's right, many thanks!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, the if is not needed, let's use the initialize directly and change the name accordingly for each call.

Copy link
Copy Markdown
Collaborator

@knopers8 knopers8 Apr 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Top, many thanks

@knopers8 knopers8 merged commit 66154b5 into AliceO2Group:master Apr 12, 2024
@njacazio njacazio deleted the nj-tofconfig branch April 12, 2024 06:42
anabananana98 pushed a commit to anabananana98/QualityControlEMC that referenced this pull request Apr 23, 2024
* TOF: add start publishing

* Fix header

* Fix

* Deleting MO

* Use initialize

* ResetBefore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants