Changeset 1347 for trunk/source/persistency/gdml/src/G4GDMLReadDefine.cc
- Timestamp:
- Dec 22, 2010, 3:52:27 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/persistency/gdml/src/G4GDMLReadDefine.cc
r1337 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4GDMLReadDefine.cc,v 1.2 5 2010/02/17 18:06:25gcosmo Exp $27 // GEANT4 tag $Name: g eant4-09-04-beta-01$26 // $Id: G4GDMLReadDefine.cc,v 1.26 2010/10/14 16:19:40 gcosmo Exp $ 27 // GEANT4 tag $Name: gdml-V09-03-09 $ 28 28 // 29 29 // class G4GDMLReadDefine Implementation … … 42 42 G4GDMLMatrix::G4GDMLMatrix(size_t rows0, size_t cols0) 43 43 { 44 if ((rows <=0) || (cols<=0))44 if ((rows0==0) || (cols0==0)) 45 45 { 46 46 G4Exception("G4GDMLMatrix::G4GDMLMatrix(r,c)", "InvalidSetup", … … 161 161 const xercesc::DOMAttr* const attribute 162 162 = dynamic_cast<xercesc::DOMAttr*>(node); 163 if (!attribute) 164 { 165 G4Exception("G4GDMLRead::ConstantRead()", "InvalidRead", 166 FatalException, "No attribute found!"); 167 return; 168 } 163 169 const G4String attName = Transcode(attribute->getName()); 164 170 const G4String attValue = Transcode(attribute->getValue()); … … 190 196 const xercesc::DOMAttr* const attribute 191 197 = dynamic_cast<xercesc::DOMAttr*>(node); 198 if (!attribute) 199 { 200 G4Exception("G4GDMLRead::ExpressionRead()", "InvalidRead", 201 FatalException, "No attribute found!"); 202 return; 203 } 192 204 const G4String attName = Transcode(attribute->getName()); 193 205 const G4String attValue = Transcode(attribute->getValue()); … … 221 233 const xercesc::DOMAttr* const attribute 222 234 = dynamic_cast<xercesc::DOMAttr*>(node); 235 if (!attribute) 236 { 237 G4Exception("G4GDMLRead::MatrixRead()", "InvalidRead", 238 FatalException, "No attribute found!"); 239 return; 240 } 223 241 const G4String attName = Transcode(attribute->getName()); 224 242 const G4String attValue = Transcode(attribute->getValue()); … … 271 289 const xercesc::DOMAttr* const attribute 272 290 = dynamic_cast<xercesc::DOMAttr*>(node); 291 if (!attribute) 292 { 293 G4Exception("G4GDMLRead::PositionRead()", "InvalidRead", 294 FatalException, "No attribute found!"); 295 return; 296 } 273 297 const G4String attName = Transcode(attribute->getName()); 274 298 const G4String attValue = Transcode(attribute->getValue()); … … 304 328 const xercesc::DOMAttr* const attribute 305 329 = dynamic_cast<xercesc::DOMAttr*>(node); 330 if (!attribute) 331 { 332 G4Exception("G4GDMLRead::RotationRead()", "InvalidRead", 333 FatalException, "No attribute found!"); 334 return; 335 } 306 336 const G4String attName = Transcode(attribute->getName()); 307 337 const G4String attValue = Transcode(attribute->getValue()); … … 335 365 const xercesc::DOMAttr* const attribute 336 366 = dynamic_cast<xercesc::DOMAttr*>(node); 367 if (!attribute) 368 { 369 G4Exception("G4GDMLRead::ScaleRead()", "InvalidRead", 370 FatalException, "No attribute found!"); 371 return; 372 } 337 373 const G4String attName = Transcode(attribute->getName()); 338 374 const G4String attValue = Transcode(attribute->getValue()); … … 366 402 const xercesc::DOMAttr* const attribute 367 403 = dynamic_cast<xercesc::DOMAttr*>(node); 404 if (!attribute) 405 { 406 G4Exception("G4GDMLRead::VariableRead()", "InvalidRead", 407 FatalException, "No attribute found!"); 408 return; 409 } 368 410 const G4String attName = Transcode(attribute->getName()); 369 411 const G4String attValue = Transcode(attribute->getValue()); … … 395 437 const xercesc::DOMAttr* const attribute 396 438 = dynamic_cast<xercesc::DOMAttr*>(node); 439 if (!attribute) 440 { 441 G4Exception("G4GDMLRead::QuantityRead()", "InvalidRead", 442 FatalException, "No attribute found!"); 443 return; 444 } 397 445 const G4String attName = Transcode(attribute->getName()); 398 446 const G4String attValue = Transcode(attribute->getValue()); … … 419 467 const xercesc::DOMElement* const child 420 468 = dynamic_cast<xercesc::DOMElement*>(iter); 469 if (!child) 470 { 471 G4Exception("G4GDMLRead::DefineRead()", "InvalidRead", 472 FatalException, "No child found!"); 473 return; 474 } 421 475 const G4String tag = Transcode(child->getTagName()); 422 476 … … 458 512 const xercesc::DOMAttr* const attribute 459 513 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 514 if (!attribute) 515 { 516 G4Exception("G4GDMLRead::VectorRead()", "InvalidRead", 517 FatalException, "No attribute found!"); 518 return; 519 } 460 520 const G4String attName = Transcode(attribute->getName()); 461 521 const G4String attValue = Transcode(attribute->getValue()); … … 487 547 const xercesc::DOMAttr* const attribute 488 548 = dynamic_cast<xercesc::DOMAttr*>(attribute_node); 549 if (!attribute) 550 { 551 G4Exception("G4GDMLRead::Read()", "InvalidRead", 552 FatalException, "No attribute found!"); 553 return ref; 554 } 489 555 const G4String attName = Transcode(attribute->getName()); 490 556 const G4String attValue = Transcode(attribute->getValue());
Note: See TracChangeset
for help on using the changeset viewer.