VGM Version 5.3
Loading...
Searching...
No Matches
PlacementMap.h
Go to the documentation of this file.
1// $Id$
2
3// -----------------------------------------------------------------------
4// The Geant4GM package of the Virtual Geometry Model
5// Copyright (C) 2007, Ivana Hrivnacova
6// All rights reserved.
7//
8// For the licensing terms see vgm/LICENSE.
9// Contact: ivana@ipno.in2p3.fr
10// -----------------------------------------------------------------------
11
13//
19
20#ifndef GEANT4_GM_PLACEMENT_MAP_H
21#define GEANT4_GM_PLACEMENT_MAP_H
22
24
25#include <map>
26
27class G4VPhysicalVolume;
28
29namespace VGM {
30class IPlacement;
31}
32
33namespace Geant4GM {
34
35class PlacementMap;
36
38{
39 public:
40 typedef std::map<VGM::IPlacement*, G4VPhysicalVolume*> G4PlacementMap;
41 typedef G4PlacementMap::const_iterator G4PlacementMapCIterator;
42
43 typedef std::map<G4VPhysicalVolume*, VGM::IPlacement*> VgmPlacementMap;
44 typedef VgmPlacementMap::const_iterator VgmPlacementMapCIterator;
45
46 public:
48 virtual ~PlacementMap();
49
50 // static access methods
51 static PlacementMap* Instance();
52
53 // methods
54 void AddPlacement(VGM::IPlacement*, G4VPhysicalVolume*);
55 G4VPhysicalVolume* GetPlacement(VGM::IPlacement* iPlacement) const;
56 VGM::IPlacement* GetPlacement(G4VPhysicalVolume* pv) const;
57
58 private:
60
61 // static data members
62 static PlacementMap* fgInstance;
63
64 // data members
65 G4PlacementMap fG4Placements;
66 VgmPlacementMap fVgmPlacements;
67};
68
69} // namespace Geant4GM
70
71#endif // GEANT4_GM_PLACEMENT_MAP_H
The map between VGM and Geant4 placements.
static PlacementMap * Instance()
void AddPlacement(VGM::IPlacement *, G4VPhysicalVolume *)
G4VPhysicalVolume * GetPlacement(VGM::IPlacement *iPlacement) const
std::map< VGM::IPlacement *, G4VPhysicalVolume * > G4PlacementMap
std::map< G4VPhysicalVolume *, VGM::IPlacement * > VgmPlacementMap
VgmPlacementMap::const_iterator VgmPlacementMapCIterator
G4PlacementMap::const_iterator G4PlacementMapCIterator
The VGM interface to positions of volumes.
Definition IPlacement.h:44
VGM implementation for Geant4.
Definition Element.h:29
VGM interfaces.
Definition VMedium.h:28