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
AlignmentsManager.h
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 #ifndef DD4HEP_DDALIGN_ALIGNMENTMANAGER_H
14 #define DD4HEP_DDALIGN_ALIGNMENTMANAGER_H
15 
16 // Framework include files
17 #include "DD4hep/Memory.h"
18 #include "DD4hep/Alignments.h"
20 
22 namespace DD4hep {
23 
25  namespace Conditions {
26  class UserPool;
27  class ConditionDependency;
28  class ConditionUpdateContext;
29  class ConditionsDependencyCollection;
30  }
31 
33  namespace Alignments {
34 
36  class AlignContext;
37  class AlignmentsManager;
38  class AlignmentsManagerObject;
39 
41 
46  class AlignmentsManager : public Handle<AlignmentsManagerObject> {
47  public:
56 
57  public:
58 
60 
67  template <typename T> static AlignmentsManager from(T& host);
68 
70  AlignmentsManager() = default;
72  AlignmentsManager(const AlignmentsManager& copy) = default;
76  template <typename Q> AlignmentsManager(const Handle<Q>& e) : Handle<Object>(e) {}
78  AlignmentsManager(const std::string& name);
80  AlignmentsManager(char const* name);
82  AlignmentsManager& operator=(const AlignmentsManager& mgr) = default;
84  void destroy();
86  bool adoptDependency(Dependency* dependency) const;
88  const Dependencies& knownDependencies() const;
90  void compute(dd4hep_ptr<UserPool>& user_pool) const;
92  void compute(dd4hep_ptr<UserPool>& user_pool, const Dependencies& deps) const;
94  static void newEntry(const Context& parameter,
95  DetElement& det,
96  const Dependency* dep,
97  AlignmentCondition& con);
98  };
99 
100 
102 
110  public:
112 
117 
118  protected:
120  void to_world(AlignContext& new_alignments, UserPool& pool, DetElement det, TGeoHMatrix& mat) const;
122  void compute(AlignContext& new_alignments, UserPool& pool, DetElement child) const;
123 
124  public:
128  virtual ~AlignmentsManagerObject();
130  void compute(UserPool& user_pool) const;
132  void compute(UserPool& user_pool, const Dependencies& deps) const;
133  };
134 
135  } /* End namespace Geometry */
136 } /* End namespace DD4hep */
137 #endif /* DD4HEP_DDALIGN_ALIGNMENTMANAGER_H */
void destroy()
Delete the manager. Be careful: this affects all referencing handles!
Conditions::ConditionsDependencyCollection Dependencies
Alignments re-use conditions dependency container def from the conditions manager.
const char * name() const
Access the object name (or "" if not supported by the object)
AlignmentsManager(const Handle< Object > &e)
Constructor to be used for proper handles.
Conditions::ConditionDependency Dependency
Alignments re-use conditions dependency definition from the conditions manager.
virtual ~AlignmentsManagerObject()
Default destructor.
void copy(Alignment from, Alignment to)
Copy alignment object from source object.
Out version of the std auto_ptr implementation base either on auto_ptr or unique_ptr.
Definition: Memory.h:43
return e
Definition: Volumes.cpp:297
bool adoptDependency(Dependency *dependency) const
Adopy alignment dependency for later recalculation.
const Dependencies & knownDependencies() const
Access all known dependencies.
DD4hep::Geometry::DetElement DetElement
AlignmentsManager & operator=(const AlignmentsManager &mgr)=default
Assignment operator.
Condition dependency definition.
Alignment manager instance to handle alignment dependencies.
Implementation of a named object.
Definition: NamedObject.h:31
AlignmentsManager::Dependencies Dependencies
ConditionUpdateContext class used by the derived conditions calculation mechanism.
Dependencies * dependencies
Full list of alignment dependencies.
void compute(AlignContext &new_alignments, UserPool &pool, DetElement child) const
Compute all alignment conditions of the lower levels.
AlignmentsManager(const Handle< Q > &e)
Constructor to be used for proper handles.
AlignmentsManagerObject()
Initializing constructor.
static AlignmentsManager from(T &host)
Static accessor if installed as an extension.
static void newEntry(const Context &parameter, DetElement &det, const Dependency *dep, AlignmentCondition &con)
Register new updated derived alignment during the computation step.
void compute(dd4hep_ptr< UserPool > &user_pool) const
Compute all alignment conditions of the internal dependency list.
AlignmentsManagerObject Object
Standard object type.
AlignmentsManager()=default
Default constructor.
Handle: a templated class like a shared pointer, which allows specialized access to tgeometry objects...
Definition: Handle.h:87
Main handle class to hold an alignment conditions object.
Definition: Alignments.h:142
Conditions::ConditionUpdateContext Context
Conditions derivation context.
AlignContext * all_alignments
References to all alignment possibilities known.
void to_world(AlignContext &new_alignments, UserPool &pool, DetElement det, TGeoHMatrix &mat) const
Compute the transformation from the closest detector element of the alignment to the world system...