FairRoot
FairRoot copied to clipboard
Create EventDisplay test
Is your feature request related to a problem? Please describe. We do not have any test for event display. Naively adding such test results in:
Command: "/Users/karabowi/fairroot/dev/build_oct22rc_mt_D21.5_c13.1/examples/advanced/Tutorial3/macro/eventDisplay.sh" ""TGeant4""
Directory: /Users/karabowi/fairroot/dev/build_oct22rc_mt_D21.5_c13.1/examples/advanced/Tutorial3/macro
"ex_tutorial3_ED_TGeant4" start time: May 12 11:19 CEST
Output:
----------------------------------------------------------
------------------------------------------------------------------
| Welcome to ROOT 6.26/06 https://root.cern |
| (c) 1995-2021, The ROOT Team; conception: R. Brun, F. Rademakers |
| Built for macosx64 on Oct 19 2022, 11:01:00 |
| From tags/v6-26-06@v6-26-06 |
| With Apple clang version 13.1.6 (clang-1316.0.21.2.5) |
| Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |
------------------------------------------------------------------
Processing /Users/karabowi/fairroot/dev/FairRoot/examples/advanced/Tutorial3/macro/eventDisplay.C("TGeant4")...
libc++abi: terminating with uncaught exception of type TEveException: TEveManager::Create ROOT is running in batch mode.
<end of output>
Test time = 3.49 sec
Describe the solution you'd like Have a way to run tests with graphics.
Describe alternatives you've considered Anyone has idea on how to test ED without graphics?
Have a way to run tests with graphics.
On a system with X11 graphics you could use Xvfb. It ships with a command-line tool xvfb-run
, so you can run a macro with graphics output like this: xvfb-run root -q eventDisplay.C
(make sure to not use root -b
) and it would draw the graphics in an off-screen buffer.
However, what exactly do you want to test? I guess, you also want to simulate certain user input and check if the GUI behaves as expected?
I would merely like to make sure that the ED does not crash when opened. That's the minimum we can check. I will have a look into your solution.
I would merely like to make sure that the ED does not crash when opened. That's the minimum we can check.
Then we would need at least a macro that closes the event display window again, right? As the ones we currently have in FairRoot will just keep it open forever.
IMO if you root -l -q the ED, it will close the window immediately on exit.