Skip to content

Warnings should mean something

Zach Marshall requested to merge zmarshal/athena:21.2_WarningCrusade into 21.2

This MR is the first phase of my little crusade against warning messages that really shouldn't be warning messages.

First is the EventInfoCnvTool, which complains if the beam conditions service is not available (in some cases it isn't, and that's fine).

Second is the FileMetaDataCreatorTool, which complains if it doesn't find the geometry or conditions tag - perfectly normal if we're running on an EVNT file. Added a flag to say that we're running on an EVNT file, passed it in, and only warn if we expect those things to be there. The change to DerivationFrameworkCore is to support the flag. Also to stop using tabs. Tabs are evil.

Then in the Higgs truth categories tool, only give info that this is not a Higgs file - perfectly normal if it's not being run on Higgs samples. Also, stop using tabs.

Then is JetMet, where the bad batman flag warns but says it's fine in some cases. Just checking if that case is met, and if it is, don't print the warning.

Then RecExCommon, putting a few things under logging in the top options. The only warning change here is if the global event tag builder can't be included - which is fine under some circumstances. So don't warn about it then.

In RecExCommon's useful flags, it's great that these are useful. Changing all these warnings about not loading things that might be useful into info messages. If the build fails, we'll know it other ways. We have many builds now with a sub-set of packages, and we shouldn't print warnings just because some package isn't available (of course, all this should be solved in the new config setup).

Then comes Reco_tf itself - again, same story with importing packages. It's fine if we can't import the digitization arguments and we never use them. If someone tries to use them, they'll get an error. That's the right behavior.

In job transforms, setting a couple more things to false when running on EVNT to avoid other warnings.

Merge request reports