GSI Forum - RDF feed
type: channel
description: GSI Helmholtzzentrum für Schwerionenforschung
items: Problem in creating geometry from root file
items: Re: Problem in creating geometry from root file

Problem in creating geometry from root file
type: item
description: Hi, I want to draw the geometry from the root file given in /pandaroot/geometry folder although I can draw the geometry in TBrowser but not in code. I am using the code below which was for params.root file.The Error is shown below. Also tell me can I draw a .geo file to see its geometry?. drawGeo() { gROOT->LoadMacro("$VMCWORKDIR/gconfig/rootlogon.C"); rootlogon(); gSystem->Load("libGeom"); TFile *f = TFile::Open("/home/shyam/fairsoft/pandaroot/geometry/LambdaDisksNew.root "); //TFile* file = new TFile("params.root"); f->Get("FairBaseParSet"); gGeoManager->SetVisLevel(3); //defoult 3 gGeoManager->GetMasterVolume()->Draw("ogl"); } Processing drawGeo.C... Note: File "/home/shyam/fairsoft/pandaroot/buildPanda/lib/libDrc.so" already loaded Error: illegal pointer to class object gGeoManager 0x0 2182 drawGeo.C:17: *** Interpreter error recovered ***
creator: Shyam Kumar
date: 2013-07-19T17:08:07-00:00

Re: Problem in creating geometry from root file
type: item
description: Where did you take such code? It is very very old. Please use the default macro. However, you cannot see the geometry from the geo root file, you need to open a param file.
creator: StefanoSpataro
date: 2013-07-19T17:52:02-00:00

Re: Problem in creating geometry from root file
type: item
description: I have taken this from fts/ drawGeo.C for the purpose of just drawing .root type geometry file.
creator: Shyam Kumar
date: 2013-07-19T18:48:46-00:00

Re: Problem in creating geometry from root file
type: item
description: The default folder is macro/run
creator: StefanoSpataro
date: 2013-07-19T19:13:07-00:00

Re: Problem in creating geometry from root file
type: item
description: Hi, you can also add the following line at the end of a simulation macro to write the complete geomanager to file. fRun->CreateGeometryFile("<your_filename>"); Ciao Florian
creator: Florian Uhlig
date: 2013-07-20T14:19:10-00:00