GeoModel - GeoModelCore
GeoNodeAction.h
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef GEOMODELKERNEL_GEONODEACTION_H
6 #define GEOMODELKERNEL_GEONODEACTION_H
7 
19 #include "GeoModelKernel/GeoGraphNode.h"
20 #include "GeoModelKernel/GeoPhysVol.h"
21 #include "GeoModelKernel/GeoFullPhysVol.h"
22 #include "GeoModelKernel/GeoTransform.h"
23 #include "GeoModelKernel/GeoNameTag.h"
24 #include "GeoModelKernel/GeoIdentifierTag.h"
25 #include "GeoModelKernel/GeoSerialDenominator.h"
26 #include "GeoModelKernel/GeoSerialIdentifier.h"
27 #include "GeoModelKernel/GeoSerialTransformer.h"
28 #include "GeoModelKernel/GeoNodePath.h"
29 
31 {
32  public:
33 
34  enum Depth
35  { ALL_ANCESTORS = -1, SELF = 0, SELF_AND_CHILDREN = 1 };
36 
37  public:
38  GeoNodeAction();
39  virtual ~GeoNodeAction();
40 
41  // Handles a Node.
42  virtual void handleNode (const GeoGraphNode *);
43 
44  // Handles a Transform.
45  virtual void handleTransform (const GeoTransform *);
46 
47  // Handles a physical volume.
48  virtual void handlePhysVol (const GeoPhysVol *);
49 
50  // Handles a physical volume.
51  virtual void handleFullPhysVol (const GeoFullPhysVol *);
52 
53  // Returns a pointer to the path object.
54  GeoNodePath* getPath ();
55 
56  Query<unsigned int> getDepthLimit ();
57 
58  // Cause the action to terminate.
59  void terminate ();
60 
61  // Determine whether the action should terminate.
62  bool shouldTerminate () const;
63 
64  // Handles a Name Tag.
65  virtual void handleNameTag (const GeoNameTag *);
66 
67  // Handles a Serial Denominator.
68  virtual void handleSerialDenominator (const GeoSerialDenominator *);
69 
70  // Sets a depth limit.
71  void setDepthLimit (unsigned int limit);
72 
73  // Clears a depth limit, if any.
74  void clearDepthLimit ();
75 
76  // Handles a Serial Transformer
77  virtual void handleSerialTransformer (const GeoSerialTransformer *);
78 
79  // Handles an Identifier Tag.
80  virtual void handleIdentifierTag (const GeoIdentifierTag *);
81 
82  virtual void handleSerialIdentifier(const GeoSerialIdentifier *);
83 
84  protected:
85  // Termination flag; causes an abortion of action execution.
86  bool m_terminate;
87 
88  private:
89  GeoNodeAction(const GeoNodeAction &right);
90  GeoNodeAction & operator=(const GeoNodeAction &right);
91 
92  // A limit may be placed upon the depth to which the action
93  // descends. 0 = self. 1 = self and children.
94  Query<unsigned int> m_depth;
95 
96  GeoNodePath m_path;
97 };
98 
99 #endif
Like a GeoSerialDenominator. Identifies volumes, including virtual volumes.
This class generates a name for all physical volumes following it. The name is a prefix string follow...
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
This class gives an integral identifer to the following physical volume.
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
Represents Nodes that can be assembled together to make a graph. Subclasses (for now): ...
Definition: GeoGraphNode.h:28
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