Comments (6)
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:
-
So the most quickest (and probably a bit dirty) way: Override this function in
PndEmcGeoPar
and implement it like you want, maybe by copying anything interesting from the original (possibly dropping all theinit(io)
logic from the original?). -
We split up the current
init()
into more peaces and make them available as helper functions that don't throw errors but have the "important" logic and let them be re-used in our main, providedinit()
. So that you can re-arrange those helpers as needed and implement different error handling. -
We add another knob (probably something like
virtual bool NotBeingAbleToLoadFromIoIsOk() { return false; }
– yes, this long, you're not supposed to have an easy live disabling errors) and call it from the currentinit()
.
TBH, I have no particular preference.
from fairroot.
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 init()
(and thus avoid the error completely by not even trying to initialize things):
FairRoot/fairroot/parbase/FairRuntimeDb.cxx
Lines 545 to 547 in 32bb52f
But it also disables resetInputVersions
:
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?
from fairroot.
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;
}
}
from fairroot.
could you please have a look at the issue since you already discussed with @TobiasStockmanns .
from fairroot.
The issue has been solved in PR #1551.
@TobiasStockmanns , can you check the solution?
from fairroot.
#1551 improves the situation by moving the error out of init()
to the caller of init()
. So if it returns true (by overriding it), then no error will be printed. Maybe a warning is printed for init(io)
return values.
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).
from fairroot.
Related Issues (20)
- RPATH resolution sometimes broken when linking against `FairRoot::FastSim` HOT 7
- Further cleanup ascii geometry related classes
- Make install tree FHS compliant
- Document `clang-format` version used by our CI
- Can we deprecate FairGeoInterface::{createGeometry,createAll,deleteSet}
- Catch2 Test failed when using the compiler from a custom location HOT 5
- FairRootConfig.cmake should find relevant dependencies HOT 16
- Move CMake find modules to FairCMakeModules
- Export more `FairRoot_*_DIR` variables in the new CMake package
- Re-evaluate support of `find_dependency`-style CMake package mode
- Dedicated CI tests that run examples and project templates against `n >= 2` latest FairRoot releases
- [BUG] FairRootManager::GetObject is broken in FairRoot19 HOT 4
- Write down the definition of `$VMCWORKDIR`
- Design a composable env script
- Document the state machine for all `FairRun` types
- Cannot register any branch in the Init() of FairGenerator HOT 3
- Inconsistent "Register" APIs and semantics in `FairRootManager`
- ERROR during installation: doing cmake -DCMAKE_INSTALL_PREFIX="~/fair_install/FairRoot/install" .. ( CMake Error at CMakeLists.txt:79 (find_package): ) HOT 2
- CMake warnings on mcconfigurator HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fairroot.