49 std::map<G4String, G4VisAttributes*>::iterator
pos;
51 {
delete pos->second; }
60 for (xercesc::DOMNode* iter = extElement->getFirstChild();
61 iter != 0; iter = iter->getNextSibling())
63 if (iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE) {
continue; }
65 const xercesc::DOMElement*
const child
66 =
dynamic_cast<xercesc::DOMElement*
>(iter);
72 G4String error_msg =
"Unknown tag in structure: " + tag;
88 XMLCh *name_attr = xercesc::XMLString::transcode(
"name");
90 xercesc::XMLString::release(&name_attr);
92 for (xercesc::DOMNode* iter = volumeElement->getFirstChild();
93 iter != 0; iter = iter->getNextSibling())
95 if (iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE) {
continue; }
97 const xercesc::DOMElement*
const child
98 =
dynamic_cast<xercesc::DOMElement*
>(iter);
101 if (tag==
"auxiliary")
103 if (tag==
"materialref")
107 if (tag ==
"colorref")
128 const xercesc::DOMNamedNodeMap*
const attributes
129 = colorElement->getAttributes();
130 XMLSize_t attributeCount = attributes->getLength();
132 for (XMLSize_t attribute_index=0;
133 attribute_index<attributeCount; attribute_index++)
135 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
137 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
140 const xercesc::DOMAttr*
const attribute
141 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
157 G4cout <<
"Color attribute (R,G,B,A) is: "
158 << r <<
", " <<
g <<
", " << b <<
", " <<
a <<
" !" <<
G4endl;
160 fAttribs.insert(std::make_pair(name,color));
168 std::map<G4String, G4VisAttributes*>::iterator
pos =
fAttribs.find(ref);
176 G4String err_mess =
"Attribute: " + ref +
" NOT found !";
void ExtensionRead(const xercesc::DOMElement *const element)
G4LogicalVolume * pMotherLogical
void ColorRead(const xercesc::DOMElement *const element)
std::vector< ExP01TrackerHit * > a
static const G4double pos
virtual void VolumeRead(const xercesc::DOMElement *const)
G4String GenerateName(const G4String &name, G4bool strip=false)
G4double Evaluate(const G4String &)
G4GDMLAuxStructType AuxiliaryRead(const xercesc::DOMElement *const auxElem)
static constexpr double g
G4String RefRead(const xercesc::DOMElement *const)
G4Material * GetMaterial(const G4String &, G4bool verbose=true) const
G4String Transcode(const XMLCh *const)
Definition of the G03ColorReader class.
void SetVisAttributes(const G4VisAttributes *pVA)
virtual void Volume_contentRead(const xercesc::DOMElement *const)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::vector< G4GDMLAuxStructType > G4GDMLAuxListType
std::map< G4String, G4VisAttributes * > fAttribs
G4GLOB_DLL std::ostream G4cout
G4VisAttributes * GetVisAttribute(const G4String &ref)
G4VSolid * GetSolid(const G4String &) const