GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » General » Problem in creating geometry from root file
Problem in creating geometry from root file [message #14984] Fri, 19 July 2013 19:08 Go to next message
Shyam Kumar is currently offline  Shyam Kumar
Messages: 78
Registered: September 2012
Location: Mumbai, Maharashtra India
continuous participant
From: 103.21.127*
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 ***
Re: Problem in creating geometry from root file [message #14985 is a reply to message #14984] Fri, 19 July 2013 19:52 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: 2.235.190*
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.
Re: Problem in creating geometry from root file [message #14986 is a reply to message #14985] Fri, 19 July 2013 20:48 Go to previous messageGo to next message
Shyam Kumar is currently offline  Shyam Kumar
Messages: 78
Registered: September 2012
Location: Mumbai, Maharashtra India
continuous participant
From: 103.21.124*
I have taken this from fts/ drawGeo.C for the purpose of just drawing .root type geometry file.

Re: Problem in creating geometry from root file [message #14987 is a reply to message #14986] Fri, 19 July 2013 21:13 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: 2.235.190*
The default folder is macro/run
Re: Problem in creating geometry from root file [message #14988 is a reply to message #14987] Sat, 20 July 2013 16:19 Go to previous message
Florian Uhlig is currently offline  Florian Uhlig
Messages: 424
Registered: May 2007
first-grade participant
From: *pools.arcor-ip.net
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

Previous Topic: Constant magnetic field instead Solenoid Field maps
Next Topic: Help in Creating a new diamond detector for Pid
Goto Forum:
  


Current Time: Tue May 14 04:49:24 CEST 2024

Total time taken to generate the page: 0.01188 seconds