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
AlignmentsLoaderImp.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;
23 
26  : m_manager(mgr), m_refCount(1)
27 {
28 }
29 
32 }
33 
36  ++m_refCount;
37 }
38 
41  if ( --m_refCount <= 0 ) {
42  delete this;
43  }
44 }
45 
48  AlignmentCondition cond = m_manager.ptr()->get(key, iov);
49  return &cond.data();
50 }
51 
54  AlignmentCondition cond = pool.get(key);
55  return &cond.data();
56 }
Data & data()
Data accessor for the use of decorators.
Definition: Alignments.cpp:86
Interface for conditions pool optimized to host conditions updates.
Main handle class to hold an alignment object.
Definition: Alignments.h:65
virtual Condition get(key_type key) const =0
Check if a condition exists in the pool and return it to the caller.
virtual Alignment get(key_type key, const iov_type &iov)
Access the alignments loading mechanism.
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.
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...
AlignmentsLoaderImp(ConditionsManager mgr)
Default constructor.
Alignment::key_type key_type
Forward defintion of the key type.
virtual void release()
Release object. The client may not use any reference any further.
Main handle class to hold an alignment conditions object.
Definition: Alignments.h:142
ConditionsManager m_manager
Reference to conditions manager.
virtual ~AlignmentsLoaderImp()
Default destructor.
virtual void addRef()
Addreference count. Use object.