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
DetConditions.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 
14 #ifndef DD4HEP_DETCONDITIONS_H
15 #define DD4HEP_DETCONDITIONS_H
16 
17 // Framework include files
18 #include "DD4hep/Detector.h"
19 #include "DD4hep/Conditions.h"
20 
21 // C/C++ include files
22 
24 namespace DD4hep {
25 
27  namespace Geometry {
28  // Forward declarations
29  class DetElementObject;
30  } /* End namespace Geometry */
31 
32 
34  namespace Conditions {
35 
37 
43  class DetConditions: public Handle<Geometry::DetElementObject> {
44  public:
49 
50  public:
51 
54 
56  DetConditions(Object* object_ptr) : RefObject(object_ptr) { }
57 
59  template <typename Q> DetConditions(const Handle<Q>& e) : RefObject(e) {}
60 
63 
66 
67 #ifdef __MAKECINT__
68  DetConditions(const Ref_t& e)
70  : RefObject(e) {
71  }
72 #endif
73  Object& _data() const {
75  return object<Object>();
76  }
79  m_element = e.m_element;
80  return *this;
81  }
83  bool hasConditions() const;
85  Container conditions() const;
87  Condition get(const std::string& key, const UserPool& pool);
89  Condition get(Condition::key_type key, const UserPool& pool);
91  Condition get(const std::string& key, const Condition::iov_type& iov);
94  };
95 
96  } /* End namespace Geometry */
97 } /* End namespace DD4hep */
98 
99 #endif /* DD4HEP_DETCONDITIONS_H */
Container conditions() const
Access to the conditions information.
DetConditions & operator=(const DetConditions &e)
Assignment operator.
Definition: DetConditions.h:78
Interface for conditions pool optimized to host conditions updates.
DetConditions(Object *object_ptr)
Constructor to hold handled object.
Definition: DetConditions.h:56
Main condition object handle.
Definition: Conditions.h:70
Handle< Object > RefObject
Definition of the base handle type.
Definition: DetConditions.h:48
Container class for condition handles aggregated by a detector element.
Definition: Conditions.h:206
bool hasConditions() const
Check if conditions are at all present.
DetConditions(const Handle< Q > &e)
Templated constructor for handle conversions.
Definition: DetConditions.h:59
return e
Definition: Volumes.cpp:297
unsigned int key_type
Forward definition of the key type.
Definition: Conditions.h:75
Class describing the interval of validty.
Definition: IOV.h:59
DetConditions(const DetConditions &e)
Constructor to copy handle.
Definition: DetConditions.h:62
Object & _data() const
Additional data accessor.
Definition: DetConditions.h:74
Geometry::DetElementObject Object
Internal object type.
Definition: DetConditions.h:46
Handle class describing the access to DetElement dependent conditions.
Definition: DetConditions.h:43
DetConditions(const Geometry::DetElement &e)
Constructor to copy handle.
Definition: DetConditions.h:65
Handle class describing a detector element.
Definition: Detector.h:172
DetConditions()
Default constructor.
Definition: DetConditions.h:53
Handle: a templated class like a shared pointer, which allows specialized access to tgeometry objects...
Definition: Handle.h:87
Geometry::DetElementObject * m_element
Single and only data member: Reference to the actual element.
Definition: Handle.h:96
Data class with properties of a detector element.