DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
AlignmentsInterna.cpp
Go to the documentation of this file.
1 //==========================================================================
2 // AIDA Detector description implementation
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 includes
15 #include <DD4hep/IOV.h>
16 #include <DD4hep/World.h>
17 #include <DD4hep/Printout.h>
18 #include <DD4hep/InstanceCount.h>
19 #include <DD4hep/detail/Handle.inl>
22 
23 using namespace dd4hep;
25 
27 #if defined(DD4HEP_MINIMAL_CONDITIONS)
29 #else
31 #endif
32 
35  : ConditionObject(), alignment_data(0)
36 {
40  alignment_data = &d;
41 }
42 
44 AlignmentObject::AlignmentObject(const std::string& nam, const std::string& tit, void* p, size_t len)
45  : ConditionObject(nam, tit), alignment_data(0)
46 {
49  AlignmentData& d = data.bind<AlignmentData>(p,len);
50  alignment_data = &d;
51 }
52 
56 }
57 
60  AlignmentCondition a(this);
61  AlignmentData& d = a.data();
62  d.trToWorld = Transform3D();
63  d.detectorTrafo.Clear();
64  d.worldTrafo.Clear();
65  d.nodes.clear();
67 }
68 
69 #include <DD4hep/GrammarUnparsed.h>
70 static auto s_registry = GrammarRegistry::pre_note<AlignmentObject>();
dd4hep::AlignmentData::nodes
std::vector< PlacedVolume > nodes
The list of TGeoNodes (physical placements)
Definition: AlignmentData.h:122
AlignmentObject
detail::AlignmentObject AlignmentObject
Definition: AlignmentsInterna.cpp:24
dd4hep::detail::AlignmentObject::AlignmentObject
AlignmentObject()
This variable is internally bound and not ROOT persistent!
Definition: AlignmentsInterna.cpp:34
dd4hep::detail::AlignmentObject::clear
void clear()
Clear data.
Definition: AlignmentsInterna.cpp:59
dd4hep::Condition::ONSTACK
@ ONSTACK
Definition: Conditions.h:80
dd4hep::AlignmentCondition
Main handle class to hold an alignment conditions object.
Definition: Alignments.h:68
IOV.h
dd4hep::OpaqueDataBlock::construct
T & construct(Args... args)
Construct conditions object and bind the data.
Definition: OpaqueData.h:193
World.h
dd4hep::detail::AlignmentObject::~AlignmentObject
virtual ~AlignmentObject()
Standard Destructor.
Definition: AlignmentsInterna.cpp:54
dd4hep::detail::ConditionObject::flags
Condition::mask_type flags
Flags.
Definition: ConditionsInterna.h:87
DetectorInterna.h
dd4hep::InstanceCount::increment
static void increment(T *)
Increment count according to type information.
Definition: InstanceCount.h:98
dd4hep::OpaqueDataBlock::bind
void * bind(const BasicGrammar *grammar)
Bind data value.
Definition: OpaqueData.cpp:124
dd4hep::AlignmentCondition::data
AlignmentData & data()
Data accessor for the use of decorators.
Definition: Alignments.cpp:157
dd4hep::AlignmentData::trToWorld
Transform3D trToWorld
Transformation from volume to the world.
Definition: AlignmentData.h:124
dd4hep::InstanceCount::decrement
static void decrement(T *)
Decrement count according to type information.
Definition: InstanceCount.h:102
dd4hep::AlignmentData
Derived condition data-object definition.
Definition: AlignmentData.h:98
dd4hep::AlignmentData::detectorTrafo
TGeoHMatrix detectorTrafo
Intermediate buffer to store the transformation to the parent detector element.
Definition: AlignmentData.h:120
dd4hep::detail::AlignmentObject::alignment_data
AlignmentData * alignment_data
Cached pointer to the bound conditions data, since these may be accessed very frequently.
Definition: AlignmentsInterna.h:59
GrammarUnparsed.h
dd4hep::Transform3D
ROOT::Math::Transform3D Transform3D
Definition: Objects.h:117
dd4hep::AlignmentData::worldTrafo
TGeoHMatrix worldTrafo
Intermediate buffer to store the transformation to the world coordination system.
Definition: AlignmentData.h:118
dd4hep::detail::ConditionObject
The data class behind a conditions handle.
Definition: ConditionsInterna.h:68
DD4HEP_INSTANTIATE_HANDLE_NAMED
DD4HEP_INSTANTIATE_HANDLE_NAMED(AlignmentObject, ConditionObject)
DD4HEP_INSTANTIATE_HANDLE_UNNAMED
DD4HEP_INSTANTIATE_HANDLE_UNNAMED(AlignmentData)
dd4hep
Namespace for the AIDA detector description toolkit.
Definition: AlignmentsCalib.h:28
dd4hep::Condition::ALIGNMENT_DERIVED
@ ALIGNMENT_DERIVED
Definition: Conditions.h:87
dd4hep::detail::ConditionObject::data
OpaqueDataBlock data
Data block.
Definition: ConditionsInterna.h:81
AlignmentsInterna.h
InstanceCount.h
Printout.h
dd4hep::detail::AlignmentObject
The data class behind an alignments handle.
Definition: AlignmentsInterna.h:56