DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
GlobalAlignmentOperators.h
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 #ifndef DDALIGN_GLOBALALIGNMENTOPERATORS_H
14 #define DDALIGN_GLOBALALIGNMENTOPERATORS_H
15 
16 // Framework include files
17 #include <DD4hep/Alignments.h>
18 #include <DD4hep/GlobalAlignment.h>
20 
22 namespace dd4hep {
23 
25  namespace align {
26 
28 
34  public:
37  typedef std::vector<Entry*> Entries;
38  typedef std::map<std::string,std::pair<TGeoPhysicalNode*,Entry*> > Nodes;
41 
42  public:
46  void insert(GlobalAlignment alignment) const;
47  };
48 
50 
56  public:
57  const Entries& entries;
61  {
62  }
63  const GlobalAlignmentSelector& reset() const {
64  nodes.clear();
65  return *this;
66  }
68  void operator()(const GlobalAlignmentCache::Cache::value_type& e) const;
70  void operator()(Entry* e) const;
71  };
72 
74 
79  template <typename T> class GlobalAlignmentActor : public GlobalAlignmentOperator {
80  public:
84  {
85  init();
86  }
87  void init() {
88  }
90  void operator()(Nodes::value_type& e) const;
91  };
92 
94  namespace DDAlign_standard_operations {
95  class node_print;
96  class node_reset;
97  class node_align;
98  class node_delete;
99  }
100 
101  // Specializations
107  } /* End namespace align */
108 } /* End namespace dd4hep */
109 #endif // DDALIGN_GLOBALALIGNMENTOPERATORS_H
dd4hep::align::GlobalAlignmentSelector::operator()
void operator()(const GlobalAlignmentCache::Cache::value_type &e) const
Function callback for cache entries.
dd4hep::align::GlobalAlignmentSelector::GlobalAlignmentSelector
GlobalAlignmentSelector(GlobalAlignmentCache &c, Nodes &n, const Entries &e)
Initializing functor constructor.
Definition: GlobalAlignmentOperators.h:59
GlobalAlignment.h
dd4hep::align::GlobalAlignmentOperator::Nodes
std::map< std::string, std::pair< TGeoPhysicalNode *, Entry * > > Nodes
Definition: GlobalAlignmentOperators.h:38
dd4hep::align::GlobalAlignment
Main handle class to hold a TGeo alignment object of type TGeoPhysicalNode.
Definition: GlobalAlignment.h:38
dd4hep::align::GlobalAlignmentSelector::operator()
void operator()(Entry *e) const
Function callback for entries.
dd4hep::align::GlobalAlignmentOperator
Base class for alignment functors.
Definition: GlobalAlignmentOperators.h:33
dd4hep::align::GlobalAlignmentActor
Act on selected alignment entries.
Definition: GlobalAlignmentOperators.h:79
Alignments.h
dd4hep::align::GlobalAlignmentActor::GlobalAlignmentActor
GlobalAlignmentActor(GlobalAlignmentCache &c, Nodes &n)
Initializing functor constructor.
Definition: GlobalAlignmentOperators.h:82
dd4hep::align::GlobalAlignmentOperator::insert
void insert(GlobalAlignment alignment) const
Insert alignment entry.
Definition: GlobalAlignmentOperators.cpp:26
dd4hep::align::GlobalAlignmentOperator::Entries
std::vector< Entry * > Entries
Definition: GlobalAlignmentOperators.h:37
GlobalAlignmentCache.h
dd4hep::align::GlobalAlignmentOperator::GlobalAlignmentOperator
GlobalAlignmentOperator(GlobalAlignmentCache &c, Nodes &n)
Initializing functor constructor.
Definition: GlobalAlignmentOperators.h:44
dd4hep::align::GlobalAlignmentSelector::entries
const Entries & entries
Definition: GlobalAlignmentOperators.h:57
dd4hep::align::GlobalAlignmentOperator::Cache
GlobalAlignmentCache::Cache Cache
Definition: GlobalAlignmentOperators.h:36
dd4hep::align::GlobalAlignmentCache
Class caching all known alignment operations for one Detector instance.
Definition: GlobalAlignmentCache.h:41
dd4hep::align::GlobalAlignmentSelector::reset
const GlobalAlignmentSelector & reset() const
Definition: GlobalAlignmentOperators.h:63
dd4hep::align::GlobalAlignmentOperator::nodes
Nodes & nodes
Definition: GlobalAlignmentOperators.h:40
dd4hep
Namespace for the AIDA detector description toolkit.
Definition: AlignmentsCalib.h:28
dd4hep::align::GlobalAlignmentActor::init
void init()
Definition: GlobalAlignmentOperators.h:87
dd4hep::align::GlobalAlignmentSelector
Select alignment operations according to certain criteria.
Definition: GlobalAlignmentOperators.h:55
dd4hep::align::GlobalAlignmentCache::Cache
std::map< unsigned int, TGeoPhysicalNode * > Cache
Definition: GlobalAlignmentCache.h:49
dd4hep::align::GlobalAlignmentOperator::Entry
GlobalAlignmentStack::StackEntry Entry
Definition: GlobalAlignmentOperators.h:35
dd4hep::align::GlobalAlignmentStack::StackEntry
Stack entry definition.
Definition: GlobalAlignmentStack.h:52
dd4hep::align::GlobalAlignmentOperator::cache
GlobalAlignmentCache & cache
Definition: GlobalAlignmentOperators.h:39
dd4hep::align::GlobalAlignmentActor::operator()
void operator()(Nodes::value_type &e) const
Function callback for entries.