|
|
|
|
|
|
|
|
|
|
|
|
Re: Problems with FairRootManager [message #11653 is a reply to message #11649] |
Sat, 09 April 2011 12:18 ![Go to previous message Go to previous message](/theme/gsi/images/up.png) ![Go to next message Go to next message](/theme/gsi/images/down.png) |
Felix Boehmer
Messages: 149 Registered: May 2007 Location: Munich
|
first-grade participant |
![40854656](/theme/gsi/images/icq.png) From: *gsi.de
|
|
Dear Mohammad, Dear Florian,
thank you very much for your prompt help!
I got the macro running again using FairRun::CreateGeometryFile() and setting it up as Mohammad explained.
However, to make it finally work, I had to hack FairRunAna:
FairRunAna::SetGeomFile() does NOT instantly set the gGeoManager pointer, instead it sets the fInputGeoFile. This is then used in FairRunAna::Init() to load the actual TGeoManager into memory.
The problem with this approach is that Init() can only be called once,
if(fIsInitialized) {
fLogger->Fatal(MESSAGE_ORIGIN,"Error Init is already called before!");
exit(-1);
} else {
fIsInitialized=kTRUE;
}
... and this has to happen after all Tasks have been added to FairRunAna in order to call the tasks' Init() - but reco tasks may require the geometry to be present during construction already (e.g. the KalmanTask)! One would have to call FairRunAna::Init() twice ...
Maybe I am overlooking some already present method to do this properly, but for now to make it work I hacked the setting of the gGeoManager pointer into the SetGeomFile() method of FairRunAna. I don't see a conceptual problem of doing that there, so maybe this should be changed ... what is your opinion?
Cheers and have a nice weekend!
Felix
|
|
|
|
|
|
|
|
|
|