DD4hep - The AIDA detector description toolkit for high energy physics experiments
DD4hep  Rev:Unversioneddirectory
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DetAlign.h
Go to the documentation of this file.
1 //==========================================================================
2 // AIDA Detector description implementation for LCD
3 //--------------------------------------------------------------------------
4 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
5 // All rights reserved.
6 //
7 // For the licensing terms see $DD4hepINSTALL/LICENSE.
8 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
9 //
10 // Author : M.Frank
11 //
12 //==========================================================================
13 #ifndef DD4HEP_DETALIGNMENTS_H
14 #define DD4HEP_DETALIGNMENTS_H
15 
16 // Framework include files
17 #include "DD4hep/Detector.h"
18 #include "DD4hep/Alignments.h"
19 
20 // C/C++ include files
21 
23 namespace DD4hep {
24 
26  namespace Geometry {
27  // Forward declarations
28  class DetElementObject;
29  } /* End namespace Geometry */
30 
31 
33  namespace Alignments {
34 
36 
42  class DetAlign: public Handle<Geometry::DetElementObject> {
43  public:
50 
51  public:
52 
54  DetAlign() : RefObject() { }
55 
57  DetAlign(Object* object_ptr) : RefObject(object_ptr) { }
58 
60  template <typename Q> DetAlign(const Handle<Q>& e) : RefObject(e) {}
61 
63  DetAlign(const DetAlign& e) : RefObject(e) { }
64 
67 
68 #ifdef __MAKECINT__
69  DetAlign(const Ref_t& e)
71  : RefObject(e) {
72  }
73 #endif
74  Object& _data() const {
76  return object<Object>();
77  }
80  m_element = e.m_element;
81  return *this;
82  }
84  Alignment nominal() const;
86  Alignment survey() const;
88  bool hasAlignments() const;
90  Container alignments() const;
92  Alignment get(const std::string& key, const UserPool& pool);
94  Alignment get(Alignment::key_type key, const UserPool& pool);
96  Alignment get(const std::string& key, const Alignment::iov_type& iov);
99  };
100 
101  } /* End namespace Geometry */
102 } /* End namespace DD4hep */
103 #endif /* DD4HEP_DETALIGNMENTS_H */
DetAlign()
Default constructor.
Definition: DetAlign.h:54
Alignment nominal() const
Access to the constant nominal alignment information.
Definition: DetAlign.cpp:27
Interface for conditions pool optimized to host conditions updates.
Object & _data() const
Additional data accessor.
Definition: DetAlign.h:75
Main handle class to hold an alignment object.
Definition: Alignments.h:65
return e
Definition: Volumes.cpp:297
bool hasAlignments() const
Check if alignments are at all present.
Definition: DetAlign.cpp:37
Class describing the interval of validty.
Definition: IOV.h:59
DetAlign(const Geometry::DetElement &e)
Constructor to copy handle.
Definition: DetAlign.h:66
Alignment survey() const
Access to the constant survey alignment information.
Definition: DetAlign.cpp:32
Container alignments() const
Access to the alignments information.
Definition: DetAlign.cpp:45
Geometry::DetElementObject Object
Internal object type.
Definition: DetAlign.h:45
DetAlign & operator=(const DetAlign &e)
Assignment operator.
Definition: DetAlign.h:79
Handle< Object > RefObject
Definition of the base handle type.
Definition: DetAlign.h:47
Handle class describing a detector element.
Definition: Detector.h:172
Handle class describing the access to DetElement dependent alignments.
Definition: DetAlign.h:42
Handle: a templated class like a shared pointer, which allows specialized access to tgeometry objects...
Definition: Handle.h:87
DetAlign(const DetAlign &e)
Constructor to copy handle.
Definition: DetAlign.h:63
Container class for alignment handles aggregated by a detector element.
Definition: Alignments.h:206
unsigned int key_type
Forward definition of the key type.
Definition: Alignments.h:94
Conditions::UserPool UserPool
Pool definition.
Definition: DetAlign.h:49
DetAlign(Object *object_ptr)
Constructor to hold handled object.
Definition: DetAlign.h:57
Geometry::DetElementObject * m_element
Single and only data member: Reference to the actual element.
Definition: Handle.h:96
DetAlign(const Handle< Q > &e)
Templated constructor for handle conversions.
Definition: DetAlign.h:60
Data class with properties of a detector element.