VGM
Version 5.5
Toggle main menu visibility
Loading...
Searching...
No Matches
packages
RootGM
source
volumes
PlacementMap.cxx
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
12
//
13
// Class PlacementMap
14
// ---------------------
15
// The map between VGM and Root placements.
16
//
17
// Author: Ivana Hrivnacova; IPN Orsay
18
19
#include "
VGM/volumes/IPlacement.h
"
20
21
#include "
RootGM/volumes/PlacementMap.h
"
22
23
#include "TGeoNode.h"
24
25
RootGM::PlacementMap
* RootGM::PlacementMap::fgInstance = 0;
26
27
//_____________________________________________________________________________
28
RootGM::PlacementMap
*
RootGM::PlacementMap::Instance
()
29
{
31
32
if
(!fgInstance)
new
RootGM::PlacementMap
();
33
34
return
fgInstance;
35
}
36
37
//_____________________________________________________________________________
38
RootGM::PlacementMap::PlacementMap
()
39
{
41
42
fgInstance =
this
;
43
}
44
45
//_____________________________________________________________________________
46
RootGM::PlacementMap::PlacementMap
(
const
PlacementMap
&)
47
{
49
}
50
51
//_____________________________________________________________________________
52
RootGM::PlacementMap::~PlacementMap
()
53
{
54
//
55
fgInstance = 0;
56
}
57
58
//
59
// public methods
60
//
61
62
//_____________________________________________________________________________
63
void
RootGM::PlacementMap::AddPlacement
(
64
VGM::IPlacement
* iPlacement, TGeoNode* rtPlacement)
65
{
67
68
fPlacements[iPlacement] = rtPlacement;
69
}
70
71
//_____________________________________________________________________________
72
TGeoNode*
RootGM::PlacementMap::GetPlacement
(
VGM::IPlacement
* iPlacement)
const
73
{
75
76
RootPlacementMapCIterator
i = fPlacements.find(iPlacement);
77
if
(i != fPlacements.end())
78
return
(*i).second;
79
else
80
return
0;
81
}
IPlacement.h
PlacementMap.h
RootGM::PlacementMap
The map between VGM and Root placements.
Definition
PlacementMap.h:36
RootGM::PlacementMap::~PlacementMap
virtual ~PlacementMap()
Definition
PlacementMap.cxx:52
RootGM::PlacementMap::RootPlacementMapCIterator
RootPlacementMap::const_iterator RootPlacementMapCIterator
Definition
PlacementMap.h:39
RootGM::PlacementMap::GetPlacement
TGeoNode * GetPlacement(VGM::IPlacement *iPlacement) const
Definition
PlacementMap.cxx:72
RootGM::PlacementMap::PlacementMap
PlacementMap()
Definition
PlacementMap.cxx:38
RootGM::PlacementMap::Instance
static PlacementMap * Instance()
Definition
PlacementMap.cxx:28
RootGM::PlacementMap::AddPlacement
void AddPlacement(VGM::IPlacement *, TGeoNode *)
Definition
PlacementMap.cxx:63
VGM::IPlacement
The VGM interface to positions of volumes.
Definition
IPlacement.h:44
Generated on
for VGM by
1.17.0