-
Notifications
You must be signed in to change notification settings - Fork 96
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
Error message for empty container in FairRunTimeDB #1541
Comments
In rare cases, when parameteres deriving from `FairParSet` are not present in the input parameter file and are meant to be created during the run, `FairParSet::init()` throws an error message. By using the newly introduced setter `setCreationMode` this message is suppressed. This allows solution to issue FairRootGroup#1541.
I added #1551 to improve the logging of this. (I had this patch around for a while anyway. So a good opportunity to turn it into a PR). @karabowi and I had a quick chat two days ago. And we agreed, that this error is generally a good thing. And users who know what they're doing (@TobiasStockmanns that's you) should be able to turn a knob and disable this error in a fine granular way. This error happens in FairParSet::init(). This member function is virtual (whether is was a good design or not… other topic). Options:
TBH, I have no particular preference. |
Next possible option: FairParSet seems to have a "static" mode: FairRoot/fairroot/parbase/FairParSet.h Lines 63 to 64 in 32bb52f
This completely disables running FairRoot/fairroot/parbase/FairRuntimeDb.cxx Lines 545 to 547 in 32bb52f
But it also disables FairRoot/fairroot/parbase/FairRuntimeDb.cxx Lines 681 to 683 in 32bb52f
If I understood @karabowi correctly in a private chat, then this "static" feature is meant for something else anyway? |
After having thought about option (1) above, I consider it quite useful. There are some options: struct PndEmcGeoPar : public FairParGenericSet {
bool do_not_call_init_at_all{false}; //!
bool ignore_errors_from_init{false}; //!
bool init() override {
if (do_not_call_init_at_all) {
return true;
}
return FairParGenericSet::init();
// or:
bool retval = FairParGenericSet::init();
if (ignore_errors_from_init && !retval) {
LOG(info) << "The previous error is just informational, please ignore\n"
return true;
}
return retval;
}
} |
could you please have a look at the issue since you already discussed with @TobiasStockmanns . |
The issue has been solved in PR #1551. |
#1551 improves the situation by moving the error out of The above mentioned override variants should still work on older versions, just their output might be a bit confusing (that's why I put the "The previous error is just informational, please ignore" there). |
FairRunTimeDB generates an error message
when a parameter container is not filled with existing data from one of the two input possibilities (either an ASCII or root par file).
In some cases these parameters are generated inside the program code and then stored into the runtime DB creating this error message even though it is not an error.
The desired behaviour would be that the message is marked as [INFO] and not as [ERROR].
The text could look like:
[INFO] init() PndEmcGeoPar does not contain any data.
The text was updated successfully, but these errors were encountered: