Message: Re: Getting a G4LogicalVolume from its name Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Feedback Re: Getting a G4LogicalVolume from its name 

Keywords: G4LogicalVolume
Forum: Geometry
Re: None Getting a G4LogicalVolume from its name (Mathieu Trocmé)
Date: 05 Apr, 2007
From: Gabriele Cosmo <Gabriele Cosmo>

Hi Mathieu,

> I'm trying to find a way to get a G4LogicalVolume* from its name (G4String). 
> The only thing I've found lies in G4SensitiveVolumeList but does not seem
> to be finished... (getters are not defined)
> Is there any function doing this? If not, would it possible to add it, for instance
> in G4LogicalVolumeStore?
>> G4LogicalVolume* myLogicalVolume = G4LogicalVolumeStore::GetInstance()->GetVolume("MyLogicalVolume") ;

G4LogicalVolumeStore is an std::vector of pointers to logical volumes.
It is pretty simple to scan the vector for searching the volume of interest using the
standard std::vector tools. We can certainly add such method for convenience,
it's not a problem.

Cheers, Gabriele

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: Getting a G4LogicalVolume from its name   (Mathieu Trocmé - 05 Apr, 2007)
(_ None: Re: Getting a G4LogicalVolume from its name   (Mathieu Trocmé - 06 May, 2010)
(_ Question: Re: Getting a G4LogicalVolume from its name   (Gabriele Cosmo - 10 May, 2010)
(_ None: Re: Getting a G4LogicalVolume from its name   (Mathieu Trocmé - 10 May, 2010)
 Add Message Add Message
to: "Re: Getting a G4LogicalVolume from its name"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]