VGM Version 5.3
Loading...
Searching...
No Matches
ElementMap.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 - 2010 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_ELEMENT_MAP_H
21#define ROOT_GM_ELEMENT_MAP_H
22
23#include <map>
24
25class TGeoElement;
26
27namespace VGM {
28class IElement;
29}
30
31namespace RootGM {
32
33class ElementMap;
34
36{
37 public:
38 typedef std::map<VGM::IElement*, TGeoElement*> TGeoElementMap;
39 typedef TGeoElementMap::const_iterator TGeoElementMapCIterator;
40
41 typedef std::map<TGeoElement*, VGM::IElement*> VgmElementMap;
42 typedef VgmElementMap::const_iterator VgmElementMapCIterator;
43
44 public:
45 ElementMap();
46 virtual ~ElementMap();
47
48 // static access methods
49 static ElementMap* Instance();
50
51 // methods
52 void AddElement(VGM::IElement*, TGeoElement*);
53 void Print() const;
54
55 // get methods
56 TGeoElement* GetElement(VGM::IElement* iElement) const;
57 VGM::IElement* GetElement(TGeoElement* tgeoElement) const;
58
59 protected:
60 ElementMap(const ElementMap&);
61
62 private:
63 // static data members
64 static ElementMap* fgInstance;
65
66 // data members
67 TGeoElementMap fTGeoElements;
68 VgmElementMap fVgmElements;
69};
70
71} // namespace RootGM
72
73#endif // GEANT4_GM_ELEMENT_MAP_H
The map between VGM and Root elements.
Definition ElementMap.h:36
VgmElementMap::const_iterator VgmElementMapCIterator
Definition ElementMap.h:42
virtual ~ElementMap()
std::map< TGeoElement *, VGM::IElement * > VgmElementMap
Definition ElementMap.h:41
void AddElement(VGM::IElement *, TGeoElement *)
std::map< VGM::IElement *, TGeoElement * > TGeoElementMap
Definition ElementMap.h:38
TGeoElement * GetElement(VGM::IElement *iElement) const
static ElementMap * Instance()
TGeoElementMap::const_iterator TGeoElementMapCIterator
Definition ElementMap.h:39
void Print() const
The VGM interface to elements.
Definition IElement.h:34
VGM implementation for Root.
Definition axis.h:28
VGM interfaces.
Definition VMedium.h:28