[822] | 1 | // |
---|
| 2 | // ******************************************************************** |
---|
| 3 | // * License and Disclaimer * |
---|
| 4 | // * * |
---|
| 5 | // * The Geant4 software is copyright of the Copyright Holders of * |
---|
| 6 | // * the Geant4 Collaboration. It is provided under the terms and * |
---|
| 7 | // * conditions of the Geant4 Software License, included in the file * |
---|
| 8 | // * LICENSE and available at http://cern.ch/geant4/license . These * |
---|
| 9 | // * include a list of copyright holders. * |
---|
| 10 | // * * |
---|
| 11 | // * Neither the authors of this software system, nor their employing * |
---|
| 12 | // * institutes,nor the agencies providing financial support for this * |
---|
| 13 | // * work make any representation or warranty, express or implied, * |
---|
| 14 | // * regarding this software system or assume any liability for its * |
---|
| 15 | // * use. Please see the license in the file LICENSE and URL above * |
---|
| 16 | // * for the full disclaimer and the limitation of liability. * |
---|
| 17 | // * * |
---|
| 18 | // * This code implementation is the result of the scientific and * |
---|
| 19 | // * technical work of the GEANT4 collaboration. * |
---|
| 20 | // * By using, copying, modifying or distributing the software (or * |
---|
| 21 | // * any work based on the software) you agree to acknowledge its * |
---|
| 22 | // * use in resulting scientific publications, and indicate your * |
---|
| 23 | // * acceptance of all terms of the Geant4 Software license. * |
---|
| 24 | // ******************************************************************** |
---|
| 25 | // |
---|
| 26 | // |
---|
[1058] | 27 | // $Id: G4MPVEntry.cc,v 1.9 2009/04/21 15:35:45 gcosmo Exp $ |
---|
[1196] | 28 | // GEANT4 tag $Name: materials-V09-02-18 $ |
---|
[822] | 29 | // |
---|
| 30 | // |
---|
| 31 | //////////////////////////////////////////////////////////////////////// |
---|
| 32 | // G4MPVEntry Class Implementation |
---|
| 33 | //////////////////////////////////////////////////////////////////////// |
---|
| 34 | // |
---|
| 35 | // File: G4MPVEntry.cc |
---|
| 36 | // Version: 1.0 |
---|
| 37 | // Created: 1996-02-08 |
---|
| 38 | // Author: Juliet Armstrong |
---|
| 39 | // Updated: 1997-03-25 by Peter Gumplinger |
---|
| 40 | // > cosmetics (only) |
---|
| 41 | // mail: gum@triumf.ca |
---|
| 42 | // |
---|
| 43 | //////////////////////////////////////////////////////////////////////// |
---|
| 44 | |
---|
| 45 | #include "G4MPVEntry.hh" |
---|
| 46 | |
---|
| 47 | ///////////////////////// |
---|
| 48 | // Class Implementation |
---|
| 49 | ///////////////////////// |
---|
| 50 | |
---|
| 51 | // Overload the == operator |
---|
| 52 | // ------------------------ |
---|
| 53 | // Well defined == semantics required by G4RWTPtrSortedVector |
---|
| 54 | // |
---|
[1058] | 55 | G4bool G4MPVEntry::operator == (const G4MPVEntry &right) const |
---|
[822] | 56 | { |
---|
[1058] | 57 | if (thePhotonEnergy == right.thePhotonEnergy) |
---|
| 58 | { return true; } |
---|
| 59 | else |
---|
| 60 | { return false; } |
---|
[822] | 61 | } |
---|
| 62 | |
---|
| 63 | // Overload the < operator |
---|
| 64 | // ----------------------- |
---|
| 65 | // Well defined < semantics required by G4RWTPtrSortedVector |
---|
| 66 | // |
---|
[1058] | 67 | G4bool G4MPVEntry::operator < (const G4MPVEntry &right) const |
---|
[822] | 68 | { |
---|
[1058] | 69 | if (thePhotonEnergy < right.thePhotonEnergy) |
---|
| 70 | { return true; } |
---|
| 71 | else |
---|
| 72 | { return false; } |
---|
[822] | 73 | } |
---|
| 74 | |
---|
| 75 | // Overload the = operator |
---|
| 76 | // ----------------------- |
---|
| 77 | // Well defined = semantics required by G4RWTPtrSortedVector |
---|
| 78 | // |
---|
[1058] | 79 | G4MPVEntry& G4MPVEntry::operator = (const G4MPVEntry& right) |
---|
[822] | 80 | { |
---|
[1058] | 81 | if (this == &right) { return *this; } |
---|
| 82 | |
---|
| 83 | thePhotonEnergy = right.thePhotonEnergy; |
---|
| 84 | theProperty = right.theProperty; |
---|
| 85 | return *this; |
---|
[822] | 86 | } |
---|
| 87 | |
---|
[1058] | 88 | ///////////////// |
---|
| 89 | // Constructors |
---|
| 90 | ///////////////// |
---|
[822] | 91 | |
---|
[850] | 92 | G4MPVEntry::G4MPVEntry(G4double aPhotonEnergy, G4double aProperty) |
---|
[822] | 93 | { |
---|
[1058] | 94 | thePhotonEnergy = aPhotonEnergy; |
---|
| 95 | theProperty = aProperty; |
---|
[822] | 96 | } |
---|
| 97 | |
---|
| 98 | G4MPVEntry::G4MPVEntry(const G4MPVEntry &right) |
---|
| 99 | { |
---|
[1058] | 100 | thePhotonEnergy = right.thePhotonEnergy; |
---|
| 101 | theProperty = right.theProperty; |
---|
[822] | 102 | } |
---|
| 103 | |
---|
[1058] | 104 | //////////////// |
---|
| 105 | // Destructor |
---|
| 106 | //////////////// |
---|
[822] | 107 | |
---|
[1058] | 108 | G4MPVEntry::~G4MPVEntry() |
---|
| 109 | { |
---|
| 110 | } |
---|
[822] | 111 | |
---|
[1058] | 112 | //////////// |
---|
| 113 | // Methods |
---|
| 114 | //////////// |
---|
[822] | 115 | |
---|
| 116 | void G4MPVEntry::DumpEntry() |
---|
| 117 | { |
---|
[1058] | 118 | G4cout << "(" << thePhotonEnergy << ", " << theProperty << ")" << G4endl; |
---|
[822] | 119 | } |
---|