JeffersonLab / JANA2

Multi-threaded HENP Event Reconstruction
https://jeffersonlab.github.io/JANA2/
Other
6 stars 9 forks source link

Parameter/Component tables are too wide #358

Closed veprbl closed 1 month ago

veprbl commented 2 months ago

These tables are unreadable in EICrecon because C++'s typeinfo's can be very long.

Can we also remove those from JApplication::Run()?

nathanwbrei commented 2 months ago

We sure can

DraTeots commented 2 months ago

Those actually are very handy for some debug and new app build cases. EICrecon has more or less static number of components/flags from run to run and established code, so they are not useful. DAQ and BeamTest apps has plugins set depending on runs and vary a lot, so the table helps sometimes to understand what is happening. So I would leave a flag to show them. Indeed they might be difficult to read especially if one uses C++20 modules. Maybe make it less "table-y"?

nathanwbrei commented 2 months ago

Yeah, there's definitely a conflict between "what makes sense for a user running in a terminal" vs "what makes sense for debugging". I know that @DraTeots has been clamoring for JSON structured output for a long time! Here's some semi-organized thoughts that have been bouncing around in my head:

nathanwbrei commented 2 months ago

I think one particularly tricky thing to get right is actually the status ticker. In principle, JANA can run without any supervisor thread, but in practice we want to do things like detect timeouts, so having a built-in supervisor thread is the way to go. The supervisor thread is the obvious choice for printing the ticker. However, if the built-in supervisor thread isn't responsible for printing the ticker, there has to something at the EICrecon level that is polling the JApplication in order to print the ticker. I don't want EICrecon to have to implement another supervisor thread! As it turns out, a bunch of JANA plugins also want to create the own thread that occasionally interacts with the JApplication, so I'm tempted to create a new kind of component so that users can add callbacks that get run by the supervisor thread, instead of having n threads floating around. One of which could be an eicrecon-specific status ticker...

nathanwbrei commented 1 month ago

Also, parameters are shown at level WARN and components are shown at level INFO, so if you want to suppress the collection tables (and everything else that is non-essential), simply run with -Pjana:loglevel=warn. WARN now includes the signal handler instructions, the JANA version and install prefix, the loaded plugin paths, parameters, ticker, and final event count+rate.

veprbl commented 1 month ago

Why component table printout has to be hardcoded in JApplication? Can't you move the call to your CLI.