VGM Version 5.3
Loading...
Searching...
No Matches
MaterialMap.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_VOLUME_MAP_H
21#define GEANT4_GM_VOLUME_MAP_H
22
23#include <map>
24
25class G4Material;
26
27namespace VGM {
28class IMaterial;
29}
30
31namespace Geant4GM {
32
33class MaterialMap;
34
36{
37 public:
38 typedef std::map<VGM::IMaterial*, G4Material*> G4MaterialMap;
39 typedef G4MaterialMap::const_iterator G4MaterialMapCIterator;
40
41 typedef std::map<G4Material*, VGM::IMaterial*> VgmMaterialMap;
42 typedef VgmMaterialMap::const_iterator VgmMaterialMapCIterator;
43
44 public:
46 virtual ~MaterialMap();
47
48 // static access methods
49 static MaterialMap* Instance();
50
51 // methods
52 void AddMaterial(VGM::IMaterial*, G4Material*);
53 void Print() const;
54
55 // get methods
56 G4Material* GetMaterial(VGM::IMaterial* iMaterial) const;
57 VGM::IMaterial* GetMaterial(G4Material* g4Material) const;
58
59 protected:
61
62 private:
63 // static data members
64 static MaterialMap* fgInstance;
65
66 // data members
67 G4MaterialMap fG4Materials;
68 VgmMaterialMap fVgmMaterials;
69};
70
71} // namespace Geant4GM
72
73#endif // GEANT4_GM_VOLUME_MAP_H
The map between VGM and Geant4 material.
Definition MaterialMap.h:36
G4MaterialMap::const_iterator G4MaterialMapCIterator
Definition MaterialMap.h:39
std::map< VGM::IMaterial *, G4Material * > G4MaterialMap
Definition MaterialMap.h:38
static MaterialMap * Instance()
G4Material * GetMaterial(VGM::IMaterial *iMaterial) const
VgmMaterialMap::const_iterator VgmMaterialMapCIterator
Definition MaterialMap.h:42
void AddMaterial(VGM::IMaterial *, G4Material *)
std::map< G4Material *, VGM::IMaterial * > VgmMaterialMap
Definition MaterialMap.h:41
The VGM interface to materials.
Definition IMaterial.h:44
VGM implementation for Geant4.
Definition Element.h:29
VGM interfaces.
Definition VMedium.h:28