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
AlignmentOperators.h
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 #ifndef DD4HEP_ALIGNMENT_ALIGNMENTOPERATORS_H
15 #define DD4HEP_ALIGNMENT_ALIGNMENTOPERATORS_H
16 
17 // Framework include files
18 #include "DD4hep/Alignments.h"
19 #include "DD4hep/GlobalAlignment.h"
21 
23 namespace DD4hep {
24 
26  namespace Alignments {
27 
29 
35  public:
38  typedef std::vector<Entry*> Entries;
39  typedef std::map<std::string,std::pair<TGeoPhysicalNode*,Entry*> > Nodes;
42  public:
46  void insert(GlobalAlignment alignment) const;
47  };
48 
50 
56  public:
57  const Entries& entries;
60  const AlignmentSelector& reset() const { nodes.clear(); return *this; }
62  void operator()(const GlobalAlignmentCache::Cache::value_type& e) const;
64  void operator()(Entry* e) const;
65  };
66 
68 
73  template <typename T> class AlignmentActor : public AlignmentOperator {
74  public:
77  void init() {}
79  void operator()(Nodes::value_type& e) const;
80  };
81 
83  namespace DDAlign_standard_operations {
84  class node_print;
85  class node_reset;
86  class node_align;
87  class node_delete;
88  }
89 
90  // Specializations
92  template <> void AlignmentActor<DDAlign_standard_operations::node_print>::operator() (Nodes::value_type& n) const;
93  template <> void AlignmentActor<DDAlign_standard_operations::node_delete>::operator()(Nodes::value_type& n) const;
94  template <> void AlignmentActor<DDAlign_standard_operations::node_reset>::operator() (Nodes::value_type& n) const;
95  template <> void AlignmentActor<DDAlign_standard_operations::node_align>::operator() (Nodes::value_type& n) const;
96 
97  } /* End namespace Geometry */
98 } /* End namespace DD4hep */
99 #endif /* DD4HEP_ALIGNMENT_ALIGNMENTOPERATORS_H */
Act on selected alignment entries.
std::map< std::string, std::pair< TGeoPhysicalNode *, Entry * > > Nodes
const AlignmentSelector & reset() const
void insert(GlobalAlignment alignment) const
Insert alignment entry.
Main handle class to hold a TGeo alignment object of type TGeoPhysicalNode.
AlignmentOperator(GlobalAlignmentCache &c, Nodes &n)
Initializing functor constructor.
return e
Definition: Volumes.cpp:297
AlignmentActor(GlobalAlignmentCache &c, Nodes &n)
Initializing functor constructor.
Class caching all known alignment operations for one LCDD instance.
void operator()(const GlobalAlignmentCache::Cache::value_type &e) const
Function callback for cache entries.
GlobalAlignmentCache::Cache Cache
AlignmentSelector(GlobalAlignmentCache &c, Nodes &n, const Entries &e)
Initializing functor constructor.
Stack entry definition.
AlignmentStack::StackEntry Entry
std::map< unsigned int, TGeoPhysicalNode * > Cache
void operator()(Nodes::value_type &e) const
Function callback for entries.
Base class for alignment functors.
Select alignment operations according to certain criteria.