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
ConditionsAccess.h
Go to the documentation of this file.
1 // $Id$
2 //==========================================================================
3 // AIDA Detector description implementation for LCD
4 //--------------------------------------------------------------------------
5 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
6 // All rights reserved.
7 //
8 // For the licensing terms see $DD4hepINSTALL/LICENSE.
9 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
10 //
11 // Author : M.Frank
12 //
13 //==========================================================================
14 #ifndef DD4HEP_DDCOND_CONDITIONSACCESS_H
15 #define DD4HEP_DDCOND_CONDITIONSACCESS_H
16 
17 // Framework include files
18 #include "DD4hep/Conditions.h"
19 
21 namespace DD4hep {
22 
24  namespace Conditions {
25 
26  // Forward declarations
27  class ConditionsManagerObject;
28 
30 
35  class ConditionsAccess : public Handle<ConditionsManagerObject> {
36  public:
37 
40 
41  public:
42 
45 
48 
51  : Handle<Object>(c) {
52  }
53 
55  template <typename Q> ConditionsAccess(const Handle<Q>& e)
56  : Handle<Object>(e) {
57  }
58 
61 
63  const std::vector<const IOVType*> iovTypesUsed() const;
64 
66  const IOVType* iovType (const std::string& iov_name) const;
67 
69  void clean(const IOVType* typ, int max_age);
70 
72  Condition get(Condition::key_type key, const Condition::iov_type& req_validity);
74  Condition get(const std::string& path, const Condition::iov_type& req_validity);
78  RangeConditions getRange(const std::string& path, const Condition::iov_type& req_validity);
79  };
80 
81  } /* End namespace Geometry */
82 } /* End namespace DD4hep */
83 #endif /* DD4HEP_DDCOND_CONDITIONSACCESS_H */
ConditionsAccess(const ConditionsAccess &c)
Constructor to assing handle of the same type.
ConditionsManagerObject Object
Standard object type.
const std::vector< const IOVType * > iovTypesUsed() const
Access the used/registered IOV types.
Main condition object handle.
Definition: Conditions.h:70
ConditionsAccess(Object *p)
Constructor to be used with valid pointer to object.
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
Class describing the interval of validty type.
Definition: IOV.h:33
Conditions internal namespace declaration.
ConditionsAccess(const Handle< Q > &e)
Constructor to be used assigning from different type.
Manager class for condition handles.
Handle: a templated class like a shared pointer, which allows specialized access to tgeometry objects...
Definition: Handle.h:87
void clean(const IOVType *typ, int max_age)
Clean conditions, which are above the age limit.
ConditionsAccess()
Default constructor.
std::vector< Condition > RangeConditions
Definition: Conditions.h:359
RangeConditions getRange(Condition::key_type key, const Condition::iov_type &req_validity)
Retrieve a condition given a Detector Element and the conditions name.
const IOVType * iovType(const std::string &iov_name) const
Access IOV by its name.