17 #include <xercesc/util/XMLString.hpp>
18 #include <xercesc/util/PlatformUtils.hpp>
29 typedef std::map<std::string,dd4hep::xml::Tag_t*> Inventory_t;
30 Inventory_t m_inventory;
36 catch (
const xercesc::XMLException& e) {
37 std::string xml_err = xercesc::XMLString::transcode(e.getMessage());
38 std::string err =
"xercesc::XMLPlatformUtils: Xerces-c error in initialization:"+xml_err;
39 std::cout << err << std::endl;
40 throw std::runtime_error(err);
46 xercesc::XMLPlatformUtils::Terminate();
53 Inventory_t::const_iterator i = __In__.m_inventory.find(name);
54 if ( i != __In__.m_inventory.end() ) {
55 std::string err =
"XMLTags: Failed to register XML tag: "+name+
". [Tag already exists]";
56 std::cout << err << std::endl;
57 throw std::runtime_error(err);
59 __In__.m_inventory[name] = tag;
63 #define UNICODE(x) extern const Tag_t Unicode_##x (#x, #x, __Init::register_tag)
76 extern const Tag_t
Unicode_NULL(
"NULL",
"0", __Init::register_tag);
77 extern const Tag_t
Unicode_empty(
"",
"", __Init::register_tag);
78 extern const Tag_t
Unicode_star(
"star",
"*", __Init::register_tag);
79 extern const Tag_t
Unicode_PI(
"PI",
"3.14159265358979323846", __Init::register_tag);
80 extern const Tag_t
Unicode_TWOPI(
"TWOPI",
"6.28318530717958647692", __Init::register_tag);