GeoModel - GeoModelCore
GeoSelClearAbsPosAction.cxx
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "GeoSelClearAbsPosAction.h"
6 #include "GeoModelKernel/GeoClearAbsPosAction.h"
7 #include "GeoModelKernel/GeoAlignableTransform.h"
8 #include <sstream>
9 
10 GeoSelClearAbsPosAction::GeoSelClearAbsPosAction(const GeoAlignableTransform* alignTrans)
11  : m_alignTrans(alignTrans)
12  , m_needToClearCache(false)
13 {
14  setDepthLimit(1);
15 }
16 
17 GeoSelClearAbsPosAction::~GeoSelClearAbsPosAction()
18 {
19 }
20 
21 void GeoSelClearAbsPosAction::handleTransform(const GeoTransform *xform)
22 {
23  if(xform==m_alignTrans)
24  m_needToClearCache = true;
25 }
26 
27 void GeoSelClearAbsPosAction::handlePhysVol(const GeoPhysVol *vol)
28 {
29  if(getPath()->getLength()>1 && m_needToClearCache) {
31  vol->exec(&cc);
32  m_needToClearCache = false;
33  }
34 }
35 
36 void GeoSelClearAbsPosAction::handleFullPhysVol(const GeoFullPhysVol *vol)
37 {
38  if(getPath()->getLength()>1 && m_needToClearCache) {
40  vol->exec(&cc);
41  m_needToClearCache = false;
42  }
43 }
44 
45 
46 
virtual void exec(GeoNodeAction *action) const override final
Executes a GeoNodeAction.
Definition: GeoPhysVol.cxx:64
Clears absolute postion information from full physical volume nodes. This action is initiated from a ...
This class represent a physical volume whose absolute default and aligned positions are known and hel...
virtual void exec(GeoNodeAction *action) const override
Executes a GeoNodeAction.
A basic geometrical (Euclidean) transform. Can return a GeoTrf::Transform3D. Reference counted...
Definition: GeoTransform.h:22
A GeoPhysVol is a physical volume for normal recursive access only. This means, normally, that it represents a piece of detector that nobody cares about except for tracing engines like GEANT. More specifically:
Definition: GeoPhysVol.h:31