GeoModel - GeoModelCore
GeoUnidentifiedShape.h
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 //=========================================================================
5 //
6 // GeoUnidentifiedShape
7 //
8 // This class is essentially a bundle of data with no fixed format.
9 // ASCII information can be added and retreived. It serves as a
10 // proxy for shapes that are not part of the kernel, i.e. extender-
11 // class shapes.
12 //
13 // Joe Boudreau 2020
14 //
15 //=========================================================================
16 
17 #ifndef _GeoUnidentifiedShape_h_
18 #define _GeoUnidentifiedShape_h_
19 #include "GeoModelKernel/GeoShape.h"
20 #include "GeoModelKernel/Query.h"
21 #include <string>
23 
24  public:
25 
26  // Constructor:
27  GeoUnidentifiedShape(const std::string & name);
28 
29  // Constructor:
30  GeoUnidentifiedShape(const std::string & name, const std::string & asciiData);
31 
32  // Constructor with volume:
33  GeoUnidentifiedShape(const std::string & name, const std::string & asciiData, double volume);
34 
35  // Returns the user-provided name of the volume (eg "MySpecialShape");
36  const std::string & name() const;
37 
38  // Returns the ascii data associated with this object (possibly empty);
39  const std::string & asciiData() const;
40 
41  // Returns the volume of the shape, for mass inventory
42  virtual double volume () const;
43 
44  // Returns the shape type, as a string.
45  virtual const std::string & type () const;
46 
47  // Returns the shape type, as an coded integer.
48  virtual ShapeType typeID () const;
49 
50  // For type identification.
51  static const std::string& getClassType ();
52 
53  // For type identification.,
54  static ShapeType getClassTypeID ();
55 
56 
57  // Executes a GeoShapeAction
58  virtual void exec (GeoShapeAction *action) const;
59 
60 
61 
62  protected:
63  // Destructor:
65 
66  private:
67 
68  const std::string _name;
69  const std::string _asciiData;
70  const Query<double> _volume;
71  static const std::string _classType;
72  static const ShapeType _classTypeID;
73 
74 };
75 
76 inline const std::string& GeoUnidentifiedShape::getClassType ()
77 {
78  return _classType;
79 }
80 
81 inline ShapeType GeoUnidentifiedShape::getClassTypeID ()
82 {
83  return _classTypeID;
84 }
85 #endif
This class is a visitor for shapes. It allows a navigation of the boolean expression tree for shapes...
This class describes a Shape. Shapes will be able to do the following things:
Definition: GeoShape.h:38