![]() |
|
|||
File indexing completed on 2025-02-21 09:58:00
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 DD4HEP_DETECTORLOAD_H 0014 #define DD4HEP_DETECTORLOAD_H 0015 0016 // Framework includes 0017 #include <DD4hep/Detector.h> 0018 0019 // C/C++ include files 0020 #include <stdexcept> 0021 0022 /// Namespace for the AIDA detector description toolkit 0023 namespace dd4hep { 0024 0025 /// Namespace for the AIDA detector description toolkit supporting XML utilities 0026 namespace xml { 0027 class Handle_t; 0028 class UriReader; 0029 } 0030 0031 class Detector; 0032 0033 /// Data implementation class of the Detector interface 0034 /** 0035 * This class is a view on the generic Detector implementation and deals with 0036 * all issues parsing XML files. 0037 * 0038 * The calls "fromXML" and "fromCompact" in the Detector implementation 0039 * call this subclass. 0040 * 0041 * \author M.Frank 0042 * \version 1.0 0043 */ 0044 class DetectorLoad { 0045 public: 0046 friend class Detector; 0047 0048 protected: 0049 /// Reference to the Detector instance 0050 Detector* m_detDesc = 0; 0051 0052 protected: 0053 /// Default constructor (protected, for sub-classes) 0054 DetectorLoad(Detector* description); 0055 0056 public: 0057 #ifdef G__ROOT 0058 /// No defautl constructor 0059 DetectorLoad() = default; 0060 #else 0061 /// No defautl constructor 0062 DetectorLoad() = delete; 0063 #endif 0064 /// No move constructor 0065 DetectorLoad(DetectorLoad&& copy) = delete; 0066 /// Default copy constructor 0067 DetectorLoad(const DetectorLoad& copy) = default; 0068 0069 /// Default constructor (public, if used as a handle) 0070 DetectorLoad(Detector& description); 0071 /// Default destructor 0072 virtual ~DetectorLoad(); 0073 /// Copy assignment constructor 0074 DetectorLoad& operator=(const DetectorLoad& copy) = default; 0075 /// No move assignment 0076 DetectorLoad& operator=(DetectorLoad&& copy) = delete; 0077 0078 /// Process XML unit and adopt all data from source structure. 0079 virtual void processXML(const std::string& fname, xml::UriReader* entity_resolver=0); 0080 /// Process XML unit and adopt all data from source structure. 0081 virtual void processXML(const xml::Handle_t& base, const std::string& fname, xml::UriReader* entity_resolver=0); 0082 /// Process XML unit and adopt all data from source string in momory. 0083 virtual void processXMLString(const char* xmldata); 0084 /// Process XML unit and adopt all data from source string in momory. 0085 /** Subsequent parsers may use the entity resolver. 0086 */ 0087 virtual void processXMLString(const char* xmldata, xml::UriReader* entity_resolver); 0088 /// Process a given DOM (sub-) tree 0089 virtual void processXMLElement(const std::string& msg_source, const xml::Handle_t& root); 0090 /// Process a given DOM (sub-) tree 0091 virtual void processXMLElement(const xml::Handle_t& root, DetectorBuildType type); 0092 }; 0093 0094 } /* End namespace dd4hep */ 0095 #endif // DD4HEP_DETECTORLOAD_H
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |