Hi,
I have a ROOT file with a few geometry volumes. If I open file in TBrowser I can see that every TGeoVolumeAssembly object has actual non-null fGeoManager member. Please refer to the screenshot below:
When I Dump() the “BarrelEMC” object from TBrowser UI, it provides:
*fGeoManager ->402fc60
However, when I am trying to access same TGeoVolumeAssembly’s fGeoManager member from a ROOT script, I get NULL pointer:
TFile* f = new TFile("emc_module12_2018v1.root", "READ");
TGeoVolumeAssembly* assembly = (TGeoVolumeAssembly*)f->Get("BarrelEMC");
assembly->Dump();
Code outputs *fGeoManager ->0. I do not understand why am I getting NULL instead of the real object? Script archive is attached below.
emc-panda-test.zip (269.5 KB)
P.S.: my ROOT file does not seem to have TGeoManager object explicitly saved in it. Is there still a way to extract it from one of the TGeoVolumes?
Please read tips for efficient and successful posting and posting code
ROOT Version: 6.24.02
Platform: fedora 5.13.19-200.fc34.x86_64
Compiler: gcc (GCC) 11.2.1
