GeoModel - GeoModelCore
GeoPrintGraphAction.h
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef GEOMODELKERNEL_GEOPRINTGRAPHACTION_H
6 #define GEOMODELKERNEL_GEOPRINTGRAPHACTION_H
7 
20 #include "GeoModelKernel/GeoNodeAction.h"
21 #include <iostream>
22 
24 {
25  enum Type { TRANSFORM,
26  VOLUME,
27  NAMETAG,
28  IDENTIFIERTAG};
29  public:
30  GeoPrintGraphAction (std::ostream &o);
31  virtual ~GeoPrintGraphAction();
32 
33  // Handles a Transform.
34  virtual void handleTransform (const GeoTransform *xform);
35 
36  // Handles a physical volume.
37  virtual void handlePhysVol (const GeoPhysVol *vol);
38 
39  // Handles a physical volume.
40  virtual void handleFullPhysVol (const GeoFullPhysVol *vol);
41 
42  // Handles a Name Tag.
43  virtual void handleNameTag (const GeoNameTag *nameTag);
44 
45  // Handles a Serial Denominator.
46  virtual void handleSerialDenominator (const GeoSerialDenominator *sD);
47 
48  // Handles a Serial Transformer
49  virtual void handleSerialTransformer (const GeoSerialTransformer *sT);
50 
51  // Handles an Identifier Tag.
52  virtual void handleIdentifierTag (const GeoIdentifierTag *idTag);
53 
54  // Sets the notification state. Default: everything on.
55  void setNotification (Type type, bool state);
56 
57  private:
59  GeoPrintGraphAction & operator=(const GeoPrintGraphAction &right);
60 
61  // Indent the print.
62  void indent ();
63 
64  // A pointer to a name tag. If the volume is named.
65  const GeoNameTag *m_nameTag;
66 
67  // A pointer to a serial denominator. If one exists.
68  const GeoSerialDenominator *m_serialDenominator;
69 
70  // A pointer to an identifier tag. If the volume is
71  // identified.
72  const GeoIdentifierTag *m_idTag;
73 
74  // List of Pending Transformations.
75  std::vector<const GeoTransform *> m_pendingTransformList;
76 
77  // On/off flag for transforms.
78  bool m_transformState;
79 
80  // On/off flag for physical volumes.
81  bool m_volumeState;
82 
83  // On/off flag for name tags.
84  bool m_nametagState;
85 
86  // On/off flag for serial denominators.
87  bool m_serialDenominatorState;
88 
89  // On/off flag for serial transformers.
90  bool m_serialTransformerState;
91 
92  // On/off flag for identifier tags.
93  bool m_identifierState;
94 
95  std::ostream &m_o;
96 
97  // Flag for indent (intially 0)
98  mutable bool m_indented;
99 };
100 
101 
102 #endif
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 action prints the node tree. It can be configured to print a message on the following types of n...
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
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