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
DetAlign.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
18 #include "DD4hep/DetAlign.h"
19 #include "DD4hep/World.h"
20 #include "DD4hep/LCDD.h"
21 
22 using namespace std;
23 using namespace DD4hep::Alignments;
24 
25 
27 Alignment DetAlign::nominal() const {
28  return access()->nominal;
29 }
30 
32 Alignment DetAlign::survey() const {
33  return access()->survey;
34 }
35 
37 bool DetAlign::hasAlignments() const {
38  Object* o = access();
39  if ( o->alignments.isValid() && !o->alignments->keys.empty() )
40  return true;
41  return false;
42 }
43 
45 Container DetAlign::alignments() const {
46  Object* o = access();
47  if ( o->alignments.isValid() ) return o->alignments;
48  o->alignments.assign(new Container::Object(o),"alignments","");
49  return o->alignments;
50 }
51 
53 Alignment DetAlign::get(const std::string& key, const Alignment::iov_type& iov) {
54  return alignments().get(key, iov);
55 }
56 
58 Alignment DetAlign::get(Alignment::key_type key, const Alignment::iov_type& iov) {
59  return alignments().get(key, iov);
60 }
61 
63 Alignment DetAlign::get(const std::string& key, const UserPool& pool) {
64  return alignments().get(key, pool);
65 }
66 
68 Alignment DetAlign::get(Alignment::key_type key, const UserPool& pool) {
69  return alignments().get(key, pool);
70 }
71 
The data class behind an alignments container handle.
Interface for conditions pool optimized to host conditions updates.
bool isValid() const
Check the validity of the object held by the handle.
Definition: Handle.h:124
Main handle class to hold an alignment object.
Definition: Alignments.h:65
const Keys & keys() const
Known keys of conditions in this container.
Definition: Alignments.cpp:132
Class describing the interval of validty.
Definition: IOV.h:59
void assign(Implementation *n, const std::string &nam, const std::string &title)
Assign a new named object. Note: object references must be managed by the user.
Definition: Handle.inl:27
Container class for alignment handles aggregated by a detector element.
Definition: Alignments.h:206
unsigned int key_type
Forward definition of the key type.
Definition: Alignments.h:94
Data class with properties of a detector element.
AlignmentsContainer alignments
The detector elements alignments access.