Skip to content

Use ModifiedUpdate in dynamic tutorials#21363

Open
couet wants to merge 4 commits intoroot-project:masterfrom
couet:hist007-fix
Open

Use ModifiedUpdate in dynamic tutorials#21363
couet wants to merge 4 commits intoroot-project:masterfrom
couet:hist007-fix

Conversation

@couet
Copy link
Member

@couet couet commented Feb 24, 2026

Use ModifiedUpdate in dynamic tutorials to make sure thy work on Mac also.

@couet couet self-assigned this Feb 24, 2026
@couet couet mentioned this pull request Feb 24, 2026
1 task
@couet couet changed the title Use UpdateModified in dynamic tutorials Use ModifiedUpdate in dynamic tutorials Feb 24, 2026
@couet
Copy link
Member Author

couet commented Feb 24, 2026

Ah ... the python version is different form the C++ one ... not sure why .. it should in principle. The C++ version has only one ModifiedUpdate. I can apply wht you suggest in the python version but I do not garanty the result ...

@couet
Copy link
Member Author

couet commented Feb 24, 2026

how do you run hist007_TH1_liveupdate.py in normal "Cocoa mode" ? when I do python3 hist007_TH1_liveupdate.py it start web graphics...

@vepadulano
Copy link
Member

Ah ... the python version is different form the C++ one ... not sure why .. it should in principle. The C++ version has only one ModifiedUpdate. I can apply wht you suggest in the python version but I do not garanty the result ...

The difference is because of how the Python interpreter vs the ROOT interpreter work. There is no need to "guarantee", everything stays exactly the same. The only extra bit is one single line of code at the end of the script, as I suggested. This is the whole reason why all of this started, see #21243, so it's necessary to add that line to avoid the canvas randomly dying at the end of the Python script.

@vepadulano
Copy link
Member

how do you run hist007_TH1_liveupdate.py in normal "Cocoa mode" ? when I do python3 hist007_TH1_liveupdate.py it start web graphics...

This is not because of Python, nor Cocoa, nor MacOS. This is how ROOT works. webgraphics are the default in master, you have to deactivate them to get the traditional graphics.

@github-actions
Copy link

Test Results

    22 files      22 suites   3d 5h 34m 23s ⏱️
 3 795 tests  3 794 ✅ 0 💤 1 ❌
76 350 runs  76 349 ✅ 0 💤 1 ❌

For more details on these failures, see this check.

Results for commit dbb8d20.

Copy link
Member

@vepadulano vepadulano left a comment

Choose a reason for hiding this comment

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

Thanks! Changes LGTM but before merging please squash the history such that there are only 2 commits:

  • One with the changes related to ModifiedUpdate.
  • And another one just with the one extra line of Python code c1.Draw(block=True) explaining that this is done to let the canvas survive before the Python script is exited.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants