Hi Mohammad,
I tried to access geometry from the parameter file in the following way:
gROOT->LoadMacro("$VMCWORKDIR/gconfig/rootlogon.C");
gROOT->LoadMacro("$VMCWORKDIR/gconfig/basiclibs.C");
rootlogon();
basiclibs();
FairRunAna *fRun= new FairRunAna();
fRun->SetInputFile("sim_emc.root");
fRun->SetOutputFile("test.root");
fRun->Init();
TString parFile = "simparams.root";
FairRuntimeDb* rtdb = fRun->GetRuntimeDb();
FairParRootFileIo* parInput1 = new FairParRootFileIo();
parInput1->open(parFile.Data());
rtdb->setFirstInput(parInput1);
FairBaseParSet* par=(FairBaseParSet*) (rtdb->getContainer("FairBaseParSet"));
geom = par->GetGeometry();
sim_emc.root and simparams.root are files produced by /macro/emc/sim_emc.C
I supposed that "geom" should be a pointer to TGeoManager. But it is 0 in this case. What is wrong here?
I tried to create emc initialization task to initialize properly EmcMapper and I need access to TGeoManager there.
Dima