-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: print exceptions when they happen, and summarize failed collections at the end #1053
base: main
Are you sure you want to change the base?
fix: print exceptions when they happen, and summarize failed collections at the end #1053
Conversation
Some thoughts:
|
I was thinking in this direction as well. Essentially I was going to suggest a boolean parameter |
I think it would be interesting to develop an interface where someone can provide a JANA2 compatible logger that is then used for all JANA2 logging (and if not provided it falls back to the current default). We already do something like that with Acts::Logger. For JANA2 my question would be when we pass this to JANA2: we can't exactly wait until we have a Log_service. |
Moved Nathan's comment 2 to separate issue, #1056, to be implemented in different PR. |
@@ -281,41 +281,47 @@ void JEventProcessorPODIO::Process(const std::shared_ptr<const JEvent> &event) { | |||
// that are determined by hash, we have to ensure they are reproducible | |||
// even if the collections are filled in unpredictable order (or not at | |||
// all). See also below, at "TODO: NWB:". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From CI, it doesn't look like any exceptions are triggered by missing collection id's. So we can delete this, perhaps?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am certainly open to making it a requirement that factories have to catch exceptions due to missing collections, instead of catching this in the event processor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant something like #1069
@@ -32,4 +32,6 @@ class JEventProcessorPODIO : public JEventProcessor { | |||
std::vector<std::string> m_collections_to_write; // derived from above config. parameters | |||
std::vector<std::string> m_collections_to_print; | |||
|
|||
private: | |||
std::set<std::string> m_failed_collections; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've submitted a few PRs for HcalEndcapP. With those merged, we could fail immediately instead of just making warnings.
…FHCAL (#1061) https://github.com/eic/EICrecon/actions/runs/6421965316/job/17439067008?pr=1053#step:5:577 as discovered in #1053 This fixes track propagations.
That detector was removed from the geometry configurations long time ago. cc #1053
…ore, use LFHCAL https://github.com/eic/EICrecon/actions/runs/6421965316/job/17439067008?pr=1053#step:5:577 as discovered in #1053 (cherry picked from commit 373305a)
b1f956b
to
f4f5741
Compare
Merge queue setting changed
Briefly, what does this PR introduce?
Instead of silently eating the exception, this modifies the JEventProcessorPODIO to print the failed collection and its exception when it first happens, and then prints the failed collections again at the end, all using the error log stream. That results in log streams such as:
(obtained with
$PWD/bin/eicrecon -Ppodio:output_include_collections=CentralTrackSeedingResults -Ppodio:output_file=rec_e_1GeV_20GeV_craterlake.edm4eic.root sim_e_1GeV_20GeV_craterlake.edm4hep.root
with reverted #1050)We may be able to go further and not allow any exceptions at all now. I don't think we need that functionality anymore since we now expect algorithms to catch their exceptions and we don't have any unused factories.
What kind of change does this PR introduce?
Please check if this PR fulfills the following:
Does this PR introduce breaking changes? What changes might users need to make to their code?
No.
Does this PR change default behavior?
No.