|
||||
File indexing completed on 2024-11-15 09:35:18
0001 //========================================================================== 0002 // AIDA Detector description implementation 0003 //-------------------------------------------------------------------------- 0004 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN) 0005 // All rights reserved. 0006 // 0007 // For the licensing terms see $DD4hepINSTALL/LICENSE. 0008 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS. 0009 // 0010 // Author : M.Frank 0011 // 0012 //========================================================================== 0013 #ifndef DDALIGN_GLOBALALIGNMENTWRITER_H 0014 #define DDALIGN_GLOBALALIGNMENTWRITER_H 0015 0016 // Framework include files 0017 #include <XML/XMLElements.h> 0018 #include <DD4hep/DetElement.h> 0019 #include <DD4hep/GlobalAlignment.h> 0020 0021 /// Namespace for the AIDA detector description toolkit 0022 namespace dd4hep { 0023 0024 /// Namespace for implementation details of the AIDA detector description toolkit 0025 namespace align { 0026 0027 // Forward declarations 0028 class GlobalAlignmentCache; 0029 0030 /// Write aligment data to XML data file 0031 /** 0032 * \author M.Frank 0033 * \version 1.0 0034 * \ingroup DD4HEP_ALIGN 0035 */ 0036 class GlobalAlignmentWriter { 0037 protected: 0038 /// Reference to detector description 0039 Detector& m_detDesc; 0040 /// Reference to the alignment cache 0041 GlobalAlignmentCache* m_cache; 0042 0043 /// Add single alignment node to the XML document 0044 void addNode(xml::Element elt, GlobalAlignment a) const; 0045 0046 public: 0047 /// Initializing Constructor 0048 GlobalAlignmentWriter(Detector& description); 0049 /// Standard destructor 0050 virtual ~GlobalAlignmentWriter(); 0051 0052 /// Dump one full DetElement subtree into a newly created document 0053 xml::Document dump(DetElement element, bool enable_transactions=false) const; 0054 /// Scan one DetElement structure and return an XML element containing the alignment in this subtree. 0055 xml::Element scan(xml::Document doc, DetElement element) const; 0056 /// Create the element corresponding to one single detector element without children 0057 xml::Element createElement(xml::Document doc, DetElement element) const; 0058 /// Write the XML document structure to a file. 0059 long write(xml::Document doc, const std::string& output) const; 0060 }; 0061 } // End namespace xml 0062 } // End namespace dd4hep 0063 #endif // DDALIGN_GLOBALALIGNMENTWRITER_H 0064
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |