6 #include <xercesc/dom/DOMNode.hpp>
7 #include <xercesc/dom/DOM.hpp>
8 #include <xercesc/parsers/XercesDOMParser.hpp>
9 #include <xercesc/util/XMLString.hpp>
10 #include <xercesc/sax/SAXException.hpp>
11 #include <xercesc/framework/LocalFileFormatTarget.hpp>
34 unique_ptr<DOMImplementation>
impl(DOMImplementationRegistry::getDOMImplementation(
cms::xerces::uStr(
"LS").ptr()));
36 DOMLSSerializer*
writer =
impl->createLSSerializer();
37 if (
writer->getDomConfig()->canSetParameter(XMLUni::fgDOMWRTFormatPrettyPrint,
true))
38 writer->getDomConfig()->setParameter(XMLUni::fgDOMWRTFormatPrettyPrint,
true);
40 DOMDocumentType* doctype =
impl->createDocumentType(
cms::xerces::uStr(
"XML").ptr(),
nullptr,
nullptr);
42 DOMElement*
root =
doc->getDocumentElement();
46 for (vector<AlignTransform>::const_iterator it =
record.m_align.begin(); it !=
record.m_align.end(); it++) {
47 int Id = (*it).rawId();
48 int sub = (Id >> 24) & 0xF;
55 int side = (Id >> 16) & 1;
67 }
else if (sub == 4) {
70 int x = (Id >> 7) & 0x7F;
72 int side = (Id >> 14) & 1;
84 cout <<
" strange value for x " << x << endl;
85 }
else if (sub == 6) {
88 int x = (Id >> 6) & 0x3F;
90 int plane = (Id >> 18) & 1;
91 int side = (Id >> 19) & 1;
105 cout <<
" problem sub = " << sub << endl;
106 cout << (*it).rawId() <<
" " << (*it).rotation().getPhi() <<
" " << (*it).rotation().getTheta() <<
" "
107 << (*it).rotation().getPsi() <<
" " << (*it).translation().x() <<
" " << (*it).translation().y() <<
" "
108 << (*it).translation().z() << endl;
109 uint32_t rawid = (*it).rawId();
111 root->appendChild(cellnode);