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.cpp
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 // Framework include files
15 #include "DD4hep/Conditions.h"
18 
19 using namespace std;
20 using namespace DD4hep;
21 using namespace DD4hep::Conditions;
22 
24 ConditionsAccess::~ConditionsAccess() {
25 }
26 
28 const IOVType* ConditionsAccess::iovType (const string& iov_name) const {
29  return access()->iovType(iov_name);
30 }
31 
33 const vector<const IOVType*> ConditionsAccess::iovTypesUsed() const {
34  Object* obj = access();
35  vector<const IOVType*> result;
36  const Object::IOVTypes& types = obj->iovTypes();
37  for(const auto& i : types )
38  if ( int(i.type) != IOVType::UNKNOWN_IOV ) result.push_back(&i);
39  return result;
40 }
41 
43 Condition
44 ConditionsAccess::get(Condition::key_type key, const Condition::iov_type& req_validity) {
45  return access()->get(key, req_validity);
46 }
47 
49 Condition
50 ConditionsAccess::get(const string& path, const Condition::iov_type& req_validity) {
51  Condition::key_type key = ConditionKey::hashCode(path);
52  return access()->get(key, req_validity);
53 }
54 
57 ConditionsAccess::getRange(Condition::key_type key, const Condition::iov_type& req_validity) {
58  return access()->getRange(key, req_validity);
59 }
60 
63 ConditionsAccess::getRange(const string& path, const Condition::iov_type& req_validity) {
64  Condition::key_type key = ConditionKey::hashCode(path);
65  return access()->getRange(key, req_validity);
66 }
const IOVTypes & iovTypes() const
Access IOV by its type.
T & get()
Generic getter. Specify the exact type, not a polymorph type.
Main condition object handle.
Definition: Conditions.h:70
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.
std::vector< Condition > RangeConditions
Definition: Conditions.h:359