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
ConditionsLoaderImp.cpp
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 
15 // Framework include files
16 #include "DDCond/ConditionsPool.h"
19 
20 using namespace DD4hep::Conditions;
21 
24  : m_manager(mgr), m_refCount(1)
25 {
26 }
27 
30 }
31 
34  ++m_refCount;
35 }
36 
39  if ( --m_refCount <= 0 ) {
40  delete this;
41  }
42 }
43 
46  return m_manager.ptr()->get(key, iov);
47 }
48 
51  return pool.get(key);
52 }
Interface for conditions pool optimized to host conditions updates.
Main condition object handle.
Definition: Conditions.h:70
virtual Condition get(key_type key) const =0
Check if a condition exists in the pool and return it to the caller.
virtual ~ConditionsLoaderImp()
Default destructor.
T * ptr() const
Access to the held object.
Definition: Handle.h:149
Class describing the interval of validty.
Definition: IOV.h:59
Manager class for condition handles.
virtual void addRef()
Addreference count. Use object.
virtual Condition get(key_type key, const iov_type &iov)
Access the conditions loading mechanism.
Condition get(key_type key, const iov_type &req_validity)
Retrieve a condition set given a Detector Element and the conditions name according to their validity...
ConditionsLoaderImp(ConditionsManager mgr)
Default constructor.
ConditionsManager m_manager
Reference to conditions manager.
virtual void release()
Release object. The client may not use any reference any further.