GeoModel - GeoModelCore
GeoVolumeCursor.h
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef GEOMODELKERNEL_GEOVOLUMECURSOR_H
6 #define GEOMODELKERNEL_GEOVOLUMECURSOR_H
7 
8 #include "GeoModelKernel/GeoNodeAction.h"
9 #include "GeoModelKernel/GeoDefinitions.h"
10 #include <vector>
11 
12 class GeoVAlignmentStore;
13 
14 class GeoVolumeCursor final : public GeoNodeAction
15 {
16  public:
17  GeoVolumeCursor (PVConstLink parent, GeoVAlignmentStore* store=nullptr);
18  virtual ~GeoVolumeCursor() override;
19 
20  GeoVolumeCursor(const GeoVolumeCursor &right) = delete;
21  GeoVolumeCursor & operator=(const GeoVolumeCursor &right) = delete;
22 
24  void next();
25 
27  bool atEnd() const;
28 
30  PVConstLink getVolume () const;
31 
33  GeoTrf::Transform3D getTransform () const;
34 
36  GeoTrf::Transform3D getDefTransform () const;
37 
39  std::string getName () const;
40 
42  Query<int> getId () const;
43 
44  bool hasAlignableTransform() const;
45 
46  private:
48  virtual void handleTransform (const GeoTransform *xform) override;
49 
51  virtual void handlePhysVol (const GeoPhysVol *vol) override;
52 
54  virtual void handleFullPhysVol (const GeoFullPhysVol *vol) override;
55 
57  virtual void handleNameTag (const GeoNameTag *nameTag) override;
58 
60  virtual void handleSerialDenominator (const GeoSerialDenominator *sD) override;
61 
63  virtual void handleSerialTransformer (const GeoSerialTransformer *sT) override;
64 
66  virtual void handleIdentifierTag (const GeoIdentifierTag *idTag) override;
67 
69  virtual void handleSerialIdentifier(const GeoSerialIdentifier *sI) override;
70 
72  void resuscitate();
73 
74 
75  PVConstLink m_parent;
76  PVConstLink m_volume;
77  GeoTrf::Transform3D m_transform;
78  GeoTrf::Transform3D m_defTransform;
79 
80  unsigned int m_majorIndex;
81  unsigned int m_minorIndex;
82  unsigned int m_minorLimit;
83  const GeoSerialTransformer *m_serialTransformer;
84 
85  const GeoNameTag *m_nameTag;
86  const GeoSerialDenominator *m_serialDenominator;
87  const GeoIdentifierTag *m_idTag;
88  std::vector<const GeoTransform *> m_pendingTransformList;
89  unsigned int m_serialDenomPosition;
90  const GeoSerialIdentifier *m_serialIdentifier;
91  unsigned int m_serialIdentPosition;
92  unsigned int m_volCount;
93 
94  bool m_hasAlignTrans;
95 
96  GeoVAlignmentStore *m_alignStore;
97 };
98 
99 #endif
Like a GeoSerialDenominator. Identifies volumes, including virtual volumes.
void next()
Advance.
This class generates a name for all physical volumes following it. The name is a prefix string follow...
Abstract base class for GeoModel alignment stores The interface allows to store/retrieve transformati...
This class represent a physical volume whose absolute default and aligned positions are known and hel...
This class gives a name to the next physical volume.
Definition: GeoNameTag.h:17
PVConstLink getVolume() const
Returns the selected physical volume or nullptr if not found.
GeoTrf::Transform3D getDefTransform() const
Returns the default ransformation to the volume.
virtual void handleSerialDenominator(const GeoSerialDenominator *sD) override
Handles a Serial Denominator.
virtual void handleTransform(const GeoTransform *xform) override
Handles a Transform.
Query< int > getId() const
Returns the id of the volume. From the identifier.
bool atEnd() const
Check if we are at the last volume.
virtual void handleSerialTransformer(const GeoSerialTransformer *sT) override
Handles a Serial Transformer.
This class gives an integral identifer to the following physical volume.
void resuscitate()
Ressucitate (undo terminate)
GeoTrf::Transform3D getTransform() const
Returns the transformation to the volume.
virtual void handleFullPhysVol(const GeoFullPhysVol *vol) override
Handles a physical volume.
virtual void handleNameTag(const GeoNameTag *nameTag) override
Handles a Name Tag.
This class takes a physical volume and places it according to a transformation field, N times.
This type of action sees the geometry graph in full detail, including each transformation and propert...
Definition: GeoNodeAction.h:30
virtual void handleSerialIdentifier(const GeoSerialIdentifier *sI) override
Handles a Serial Identifier.
virtual void handlePhysVol(const GeoPhysVol *vol) override
Handles a physical volume.
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
virtual void handleIdentifierTag(const GeoIdentifierTag *idTag) override
Handles an Identifier Tag.
std::string getName() const
Returns the name of the volume. From nametag or serial denominator.