VGM Version 5.3
Loading...
Searching...
No Matches
VolumeMap.h
Go to the documentation of this file.
1// $Id$
2
3// -----------------------------------------------------------------------
4// The RootGM 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 ROOT_GM_VOLUME_MAP_H
21#define ROOT_GM_VOLUME_MAP_H
22
23#include <map>
24
25class TGeoVolume;
26
27namespace VGM {
28class IVolume;
29}
30
31namespace RootGM {
32
33class VolumeMap;
34
36{
37 public:
38 typedef std::map<VGM::IVolume*, TGeoVolume*> RootVolumeMap;
39 typedef RootVolumeMap::const_iterator RootVolumeMapCIterator;
40
41 typedef std::map<TGeoVolume*, VGM::IVolume*> VgmVolumeMap;
42 typedef VgmVolumeMap::const_iterator VgmVolumeMapCIterator;
43
44 public:
45 VolumeMap();
46 virtual ~VolumeMap();
47
48 // static access methods
49 static VolumeMap* Instance();
50
51 // methods
52 void AddVolume(VGM::IVolume*, TGeoVolume*);
53 void Print() const;
54
55 // get methods
56 TGeoVolume* GetVolume(VGM::IVolume* iVolume) const;
57 VGM::IVolume* GetVolume(TGeoVolume* rootVolume) const;
58
59 private:
60 VolumeMap(const VolumeMap&);
61
62 // static data members
63 static VolumeMap* fgInstance;
64
65 // data members
66 RootVolumeMap fRootVolumes;
67 VgmVolumeMap fVgmVolumes;
68};
69
70} // namespace RootGM
71
72#endif // ROOT_GM_VOLUME_MAP_H
The map between VGM and Root volumes.
Definition VolumeMap.h:36
static VolumeMap * Instance()
Definition VolumeMap.cxx:28
RootVolumeMap::const_iterator RootVolumeMapCIterator
Definition VolumeMap.h:39
void Print() const
Definition VolumeMap.cxx:72
TGeoVolume * GetVolume(VGM::IVolume *iVolume) const
Definition VolumeMap.cxx:92
std::map< TGeoVolume *, VGM::IVolume * > VgmVolumeMap
Definition VolumeMap.h:41
void AddVolume(VGM::IVolume *, TGeoVolume *)
Definition VolumeMap.cxx:63
std::map< VGM::IVolume *, TGeoVolume * > RootVolumeMap
Definition VolumeMap.h:38
virtual ~VolumeMap()
Definition VolumeMap.cxx:52
VgmVolumeMap::const_iterator VgmVolumeMapCIterator
Definition VolumeMap.h:42
The VGM interface to volumes.
Definition IVolume.h:32
VGM implementation for Root.
Definition axis.h:28
VGM interfaces.
Definition VMedium.h:28