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
GlobalAlignmentWriter.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_DDALIGN_GLOBALALIGNMENTWRITER_H
15 #define DD4HEP_DDALIGN_GLOBALALIGNMENTWRITER_H
16 
17 // Framework include files
18 #include "XML/XMLElements.h"
19 #include "DD4hep/Detector.h"
20 #include "DD4hep/GlobalAlignment.h"
21 
23 namespace DD4hep {
24 
26  namespace Alignments {
27 
28  // Forward declarations
29  class GlobalAlignmentCache;
30 
32 
38  protected:
40  LCDD& m_lcdd;
43 
45  void addNode(XML::Element elt, GlobalAlignment a) const;
46 
47  public:
49  GlobalAlignmentWriter(LCDD& lcdd);
51  virtual ~GlobalAlignmentWriter();
52 
54  XML::Document dump(DetElement element, bool enable_transactions=false) const;
56  XML::Element scan(XML::Document doc, DetElement element) const;
60  long write(XML::Document doc, const std::string& output) const;
61  };
62  } // End namespace XML
63 } // End namespace DD4hep
64 #endif // DD4HEP_DDALIGN_GLOBALALIGNMENTWRITER_H
65 
Main handle class to hold a TGeo alignment object of type TGeoPhysicalNode.
virtual ~GlobalAlignmentWriter()
Standard destructor.
User abstraction class to manipulate XML elements within a document.
Definition: XMLElements.h:686
GlobalAlignmentWriter(LCDD &lcdd)
Initializing Constructor.
DD4hep::Geometry::DetElement DetElement
long write(XML::Document doc, const std::string &output) const
Write the XML document structure to a file.
XML::Element scan(XML::Document doc, DetElement element) const
Scan one DetElement structure and return an XML element containing the alignment in this subtree...
Write aligment data to XML data file.
GlobalAlignmentCache * m_cache
Reference to the alignment cache.
Class caching all known alignment operations for one LCDD instance.
LCDD & m_lcdd
Reference to detector description.
Class supporting the basic functionality of an XML document.
Definition: XMLElements.h:617
void addNode(XML::Element elt, GlobalAlignment a) const
Add single alignment node to the XML document.
XML::Element createElement(XML::Document doc, DetElement element) const
Create the element corresponding to one single detector element without children. ...
XML::Document dump(DetElement element, bool enable_transactions=false) const
Dump one full DetElement subtree into a newly created document.