Changeset 1347 for trunk/source/persistency/gdml/src/G4GDMLRead.cc
- Timestamp:
- Dec 22, 2010, 3:52:27 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/persistency/gdml/src/G4GDMLRead.cc
r1337 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4GDMLRead.cc,v 1. 47 2009/05/12 15:46:43gcosmo Exp $27 // GEANT4 tag $Name: g eant4-09-04-beta-01$26 // $Id: G4GDMLRead.cc,v 1.50 2010/11/17 10:47:02 gcosmo Exp $ 27 // GEANT4 tag $Name: gdml-V09-03-09 $ 28 28 // 29 29 // class G4GDMLRead Implementation … … 199 199 const xercesc::DOMAttr* const attribute 200 200 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 201 if (!attribute) 202 { 203 G4Exception("G4GDMLRead::LoopRead()", "InvalidRead", 204 FatalException, "No attribute found!"); 205 return; 206 } 201 207 const G4String attribute_name = Transcode(attribute->getName()); 202 208 const G4String attribute_value = Transcode(attribute->getValue()); … … 266 272 void G4GDMLRead::Read(const G4String& fileName, 267 273 G4bool validation, 268 G4bool isModule) 274 G4bool isModule, 275 G4bool strip) 269 276 { 270 277 if (isModule) … … 305 312 G4Exception("G4GDMLRead::Read()", "InvalidRead", 306 313 FatalException, error_msg); 314 return; 307 315 } 308 316 xercesc::DOMElement* element = doc->getDocumentElement(); … … 312 320 G4Exception("G4GDMLRead::Read()", "InvalidRead", 313 321 FatalException, "Empty document!"); 322 return; 314 323 } 315 324 … … 321 330 const xercesc::DOMElement* const child 322 331 = dynamic_cast<xercesc::DOMElement*>(iter); 332 if (!child) 333 { 334 G4Exception("G4GDMLRead::Read()", "InvalidRead", 335 FatalException, "No child found!"); 336 return; 337 } 323 338 const G4String tag = Transcode(child->getTagName()); 324 339 … … 337 352 } 338 353 339 if (parser) { delete parser; }340 if (handler) { delete handler; }354 delete parser; 355 delete handler; 341 356 342 357 if (isModule) … … 347 362 { 348 363 G4cout << "G4GDML: Reading '" << fileName << "' done!" << G4endl; 349 StripNames();350 } 351 } 364 if (strip) { StripNames(); } 365 } 366 }
Note: See TracChangeset
for help on using the changeset viewer.