Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer << 3 // * DISCLAIMER * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th << 5 // * The following disclaimer summarizes all the specific disclaimers * 6 // * the Geant4 Collaboration. It is provided << 6 // * of contributors to this software. The specific disclaimers,which * 7 // * conditions of the Geant4 Software License << 7 // * govern, are listed with their locations in: * 8 // * LICENSE and available at http://cern.ch/ << 8 // * http://cern.ch/geant4/license * 9 // * include a list of copyright holders. << 10 // * 9 // * * 11 // * Neither the authors of this software syst 10 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 11 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 12 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 13 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file << 14 // * use. * 16 // * for the full disclaimer and the limitatio << 17 // * 15 // * * 18 // * This code implementation is the result << 16 // * This code implementation is the intellectual property of the * 19 // * technical work of the GEANT4 collaboratio << 17 // * GEANT4 collaboration. * 20 // * By using, copying, modifying or distri << 18 // * By copying, distributing or modifying the Program (or any work * 21 // * any work based on the software) you ag << 19 // * based on the Program) you indicate your acceptance of this * 22 // * use in resulting scientific publicati << 20 // * statement, and all its terms. * 23 // * acceptance of all terms of the Geant4 Sof << 24 // ******************************************* 21 // ******************************************************************** 25 // 22 // 26 // 23 // >> 24 // $Id: G3MedTableEntry.cc,v 1.3 2001/07/11 09:58:59 gunter Exp $ >> 25 // GEANT4 tag $Name: geant4-07-01 $ 27 // 26 // 28 // by I.Hrivnacova, 27 Sep 99 27 // by I.Hrivnacova, 27 Sep 99 29 28 30 #include "G3MedTableEntry.hh" 29 #include "G3MedTableEntry.hh" 31 30 32 #include "G4Material.hh" 31 #include "G4Material.hh" 33 #include "G4MagneticField.hh" 32 #include "G4MagneticField.hh" 34 #include "G4UserLimits.hh" 33 #include "G4UserLimits.hh" 35 34 36 G3MedTableEntry::G3MedTableEntry(G4int id, G4M 35 G3MedTableEntry::G3MedTableEntry(G4int id, G4Material* material, 37 G4MagneticField* field, G4UserLimits* l 36 G4MagneticField* field, G4UserLimits* limits, G4int isvol) 38 : fID(id), 37 : fID(id), 39 fMaterial(material), 38 fMaterial(material), 40 fField(field), 39 fField(field), 41 fLimits(limits), 40 fLimits(limits), 42 fISVOL(isvol) 41 fISVOL(isvol) 43 {} 42 {} 44 43 45 G3MedTableEntry::G3MedTableEntry(const G3MedTa 44 G3MedTableEntry::G3MedTableEntry(const G3MedTableEntry& right) 46 : fID(right.GetID()), 45 : fID(right.GetID()), 47 fMaterial(right.GetMaterial()), 46 fMaterial(right.GetMaterial()), 48 fField(right.GetField()), 47 fField(right.GetField()), 49 fLimits(right.GetLimits()), 48 fLimits(right.GetLimits()), 50 fISVOL(right.GetISVOL()) 49 fISVOL(right.GetISVOL()) 51 {} 50 {} 52 51 53 G3MedTableEntry::~G3MedTableEntry() 52 G3MedTableEntry::~G3MedTableEntry() 54 {} 53 {} 55 54 56 G3MedTableEntry& G3MedTableEntry::operator=(co << 55 const G3MedTableEntry& >> 56 G3MedTableEntry::operator=(const G3MedTableEntry& right) 57 { 57 { 58 if (&right == this) { return *this; } << 59 fID = right.GetID(); 58 fID = right.GetID(); 60 fMaterial = right.GetMaterial(); 59 fMaterial = right.GetMaterial(); 61 fField = right.GetField(); 60 fField = right.GetField(); 62 fLimits = right.GetLimits(); 61 fLimits = right.GetLimits(); 63 fISVOL = right.GetISVOL(); 62 fISVOL = right.GetISVOL(); 64 return *this; 63 return *this; 65 } 64 } 66 65 67 G4bool G3MedTableEntry::operator==(const G3Med << 66 G4int G3MedTableEntry::operator==(const G3MedTableEntry& right) const 68 { 67 { 69 if (fID == right.GetID()) 68 if (fID == right.GetID()) 70 return true; << 69 return 1; 71 else 70 else 72 return false; << 71 return 0; 73 } 72 } 74 73 75 G4bool G3MedTableEntry::operator!=(const G3Med << 74 G4int G3MedTableEntry::operator!=(const G3MedTableEntry& right) const 76 { 75 { 77 if (*this == right) 76 if (*this == right) 78 return false; << 77 return 0; 79 else 78 else 80 return true; << 79 return 1; 81 } 80 } 82 81 83 82