Ignore:
Timestamp:
Dec 22, 2010, 3:52:27 PM (13 years ago)
Author:
garnier
Message:

geant4 tag 9.4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/persistency/gdml/src/G4GDMLReadDefine.cc

    r1337 r1347  
    2424// ********************************************************************
    2525//
    26 // $Id: G4GDMLReadDefine.cc,v 1.25 2010/02/17 18:06:25 gcosmo Exp $
    27 // GEANT4 tag $Name: geant4-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 $
    2828//
    2929// class G4GDMLReadDefine Implementation
     
    4242G4GDMLMatrix::G4GDMLMatrix(size_t rows0, size_t cols0)
    4343{   
    44    if ((rows<=0) || (cols<=0))
     44   if ((rows0==0) || (cols0==0))
    4545   {
    4646     G4Exception("G4GDMLMatrix::G4GDMLMatrix(r,c)", "InvalidSetup",
     
    161161      const xercesc::DOMAttr* const attribute
    162162            = dynamic_cast<xercesc::DOMAttr*>(node);   
     163      if (!attribute)
     164      {
     165        G4Exception("G4GDMLRead::ConstantRead()", "InvalidRead",
     166                    FatalException, "No attribute found!");
     167        return;
     168      }
    163169      const G4String attName = Transcode(attribute->getName());
    164170      const G4String attValue = Transcode(attribute->getValue());
     
    190196      const xercesc::DOMAttr* const attribute
    191197            = dynamic_cast<xercesc::DOMAttr*>(node);   
     198      if (!attribute)
     199      {
     200        G4Exception("G4GDMLRead::ExpressionRead()", "InvalidRead",
     201                    FatalException, "No attribute found!");
     202        return;
     203      }
    192204      const G4String attName = Transcode(attribute->getName());
    193205      const G4String attValue = Transcode(attribute->getValue());
     
    221233      const xercesc::DOMAttr* const attribute
    222234            = dynamic_cast<xercesc::DOMAttr*>(node);   
     235      if (!attribute)
     236      {
     237        G4Exception("G4GDMLRead::MatrixRead()", "InvalidRead",
     238                    FatalException, "No attribute found!");
     239        return;
     240      }
    223241      const G4String attName = Transcode(attribute->getName());
    224242      const G4String attValue = Transcode(attribute->getValue());
     
    271289      const xercesc::DOMAttr* const attribute
    272290            = dynamic_cast<xercesc::DOMAttr*>(node);   
     291      if (!attribute)
     292      {
     293        G4Exception("G4GDMLRead::PositionRead()", "InvalidRead",
     294                    FatalException, "No attribute found!");
     295        return;
     296      }
    273297      const G4String attName = Transcode(attribute->getName());
    274298      const G4String attValue = Transcode(attribute->getValue());
     
    304328      const xercesc::DOMAttr* const attribute
    305329            = dynamic_cast<xercesc::DOMAttr*>(node);   
     330      if (!attribute)
     331      {
     332        G4Exception("G4GDMLRead::RotationRead()", "InvalidRead",
     333                    FatalException, "No attribute found!");
     334        return;
     335      }
    306336      const G4String attName = Transcode(attribute->getName());
    307337      const G4String attValue = Transcode(attribute->getValue());
     
    335365      const xercesc::DOMAttr* const attribute
    336366            = dynamic_cast<xercesc::DOMAttr*>(node);   
     367      if (!attribute)
     368      {
     369        G4Exception("G4GDMLRead::ScaleRead()", "InvalidRead",
     370                    FatalException, "No attribute found!");
     371        return;
     372      }
    337373      const G4String attName = Transcode(attribute->getName());
    338374      const G4String attValue = Transcode(attribute->getValue());
     
    366402      const xercesc::DOMAttr* const attribute
    367403            = dynamic_cast<xercesc::DOMAttr*>(node);   
     404      if (!attribute)
     405      {
     406        G4Exception("G4GDMLRead::VariableRead()", "InvalidRead",
     407                    FatalException, "No attribute found!");
     408        return;
     409      }
    368410      const G4String attName = Transcode(attribute->getName());
    369411      const G4String attValue = Transcode(attribute->getValue());
     
    395437      const xercesc::DOMAttr* const attribute
    396438            = dynamic_cast<xercesc::DOMAttr*>(node);   
     439      if (!attribute)
     440      {
     441        G4Exception("G4GDMLRead::QuantityRead()", "InvalidRead",
     442                    FatalException, "No attribute found!");
     443        return;
     444      }
    397445      const G4String attName = Transcode(attribute->getName());
    398446      const G4String attValue = Transcode(attribute->getValue());
     
    419467      const xercesc::DOMElement* const child
    420468            = dynamic_cast<xercesc::DOMElement*>(iter);
     469      if (!child)
     470      {
     471        G4Exception("G4GDMLRead::DefineRead()", "InvalidRead",
     472                    FatalException, "No child found!");
     473        return;
     474      }
    421475      const G4String tag = Transcode(child->getTagName());
    422476
     
    458512      const xercesc::DOMAttr* const attribute
    459513            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     514      if (!attribute)
     515      {
     516        G4Exception("G4GDMLRead::VectorRead()", "InvalidRead",
     517                    FatalException, "No attribute found!");
     518        return;
     519      }
    460520      const G4String attName = Transcode(attribute->getName());
    461521      const G4String attValue = Transcode(attribute->getValue());
     
    487547      const xercesc::DOMAttr* const attribute
    488548            = dynamic_cast<xercesc::DOMAttr*>(attribute_node);   
     549      if (!attribute)
     550      {
     551        G4Exception("G4GDMLRead::Read()", "InvalidRead",
     552                    FatalException, "No attribute found!");
     553        return ref;
     554      }
    489555      const G4String attName = Transcode(attribute->getName());
    490556      const G4String attValue = Transcode(attribute->getValue());
Note: See TracChangeset for help on using the changeset viewer.