GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Bugs, Fixes, Releases » shape of a volume
icon5.gif  shape of a volume [message #11303] Mon, 13 December 2010 11:49 Go to previous message
Olaf Hartmann is currently offline  Olaf Hartmann
Messages: 105
Registered: December 2003
Location: Wien-Alsergrund
continuous participant
From: *
Hi all,

I see a somewhat strange behaviour from the following lines of code:

if (!gGeoManager) GetGeoManager();
TGeoVolume* actVolume = gGeoManager->GetCurrentVolume();
TGeoShape* actShape = actVolume->GetShape();
const char* fShapeName = actShape->GetName();

cout << "Volume is " << fShapeName << endl;

Instead of the shape name I get always the volume name in the output. Interactively, at the ROOT prompt, it works:


root [1] TGeoVolume* actVolume = gGeoManager->GetVolume("FscAbsorber")
root [2] TGeoShape* actShape = actVolume->GetShape();
root [3] actShape->GetName();
root [4] actShape->GetName()
(const char* 0x2cfa898)"TGeoBBox"

I wonder how to get the shape name inside the code?


Read Message icon5.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Implementation of PndGemMCPoint::SetSensorId(int) is missing
Next Topic: macro/param/*.root for Fwd EMC
Goto Forum:

Current Time: Fri Jan 28 20:34:26 CET 2022

Total time taken to generate the page: 0.02422 seconds