VGM Version 5.3
Loading...
Searching...
No Matches
SolidMap.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_SOLID_MAP_H
21#define ROOT_GM_SOLID_MAP_H
22
23#include <map>
24
25class TGeoShape;
26
27namespace VGM {
28class ISolid;
29}
30
31namespace RootGM {
32
33class SolidMap;
34
36{
37 public:
38 typedef std::map<VGM::ISolid*, TGeoShape*> RootSolidMap;
39 typedef RootSolidMap::const_iterator RootSolidMapCIterator;
40
41 typedef std::map<TGeoShape*, VGM::ISolid*> VgmSolidMap;
42 typedef VgmSolidMap::const_iterator VgmSolidMapCIterator;
43
44 public:
45 SolidMap();
46 virtual ~SolidMap();
47
48 // static access methods
49 static SolidMap* Instance();
50
51 // methods
52 void AddSolid(VGM::ISolid*, TGeoShape*);
53 void AddSolidInRootMapOnly(VGM::ISolid*, TGeoShape*);
54 void AddSolidInVGMMapOnly(VGM::ISolid*, TGeoShape*);
55
56 // get methods
57 TGeoShape* GetSolid(VGM::ISolid* iSolid) const;
58 VGM::ISolid* GetSolid(TGeoShape* solid) const;
59
60 private:
61 SolidMap(const SolidMap&);
62
63 // static data members
64 static SolidMap* fgInstance;
65
66 // data members
67 RootSolidMap fRootSolids;
68 VgmSolidMap fVgmSolids;
69};
70
71} // namespace RootGM
72
73#endif // ROOT_GM_SOLID_MAP_H
The map between VGM and Root solids.
Definition SolidMap.h:36
TGeoShape * GetSolid(VGM::ISolid *iSolid) const
Definition SolidMap.cxx:86
std::map< VGM::ISolid *, TGeoShape * > RootSolidMap
Definition SolidMap.h:38
VgmSolidMap::const_iterator VgmSolidMapCIterator
Definition SolidMap.h:42
virtual ~SolidMap()
Definition SolidMap.cxx:52
void AddSolidInRootMapOnly(VGM::ISolid *, TGeoShape *)
Definition SolidMap.cxx:68
std::map< TGeoShape *, VGM::ISolid * > VgmSolidMap
Definition SolidMap.h:41
void AddSolid(VGM::ISolid *, TGeoShape *)
Definition SolidMap.cxx:59
void AddSolidInVGMMapOnly(VGM::ISolid *, TGeoShape *)
Definition SolidMap.cxx:77
RootSolidMap::const_iterator RootSolidMapCIterator
Definition SolidMap.h:39
static SolidMap * Instance()
Definition SolidMap.cxx:28
The VGM interface to solids.
Definition ISolid.h:58
VGM implementation for Root.
Definition axis.h:28
VGM interfaces.
Definition VMedium.h:28