| [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 | //
|
|---|
| [850] | 27 | // $Id: G4MPVEntry.cc,v 1.8 2008/06/05 23:39:18 gum Exp $
|
|---|
| [986] | 28 | // GEANT4 tag $Name: geant4-09-02-ref-02 $
|
|---|
| [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 | //////////////
|
|---|
| 52 | // Operators
|
|---|
| 53 | //////////////
|
|---|
| 54 |
|
|---|
| 55 | // Overload the == operator
|
|---|
| 56 | // ------------------------
|
|---|
| 57 | // Well defined == semantics required by G4RWTPtrSortedVector
|
|---|
| 58 | //
|
|---|
| 59 | G4bool G4MPVEntry::operator ==(const G4MPVEntry &right) const
|
|---|
| 60 | {
|
|---|
| [850] | 61 | if (thePhotonEnergy == right.thePhotonEnergy)
|
|---|
| [822] | 62 | return true;
|
|---|
| 63 | else
|
|---|
| 64 | return false;
|
|---|
| 65 | }
|
|---|
| 66 |
|
|---|
| 67 | // Overload the < operator
|
|---|
| 68 | // -----------------------
|
|---|
| 69 | // Well defined < semantics required by G4RWTPtrSortedVector
|
|---|
| 70 | //
|
|---|
| 71 | G4bool G4MPVEntry::operator <(const G4MPVEntry &right) const
|
|---|
| 72 | {
|
|---|
| [850] | 73 | if (thePhotonEnergy < right.thePhotonEnergy)
|
|---|
| [822] | 74 | return true;
|
|---|
| 75 | else
|
|---|
| 76 | return false;
|
|---|
| 77 | }
|
|---|
| 78 |
|
|---|
| 79 | // Overload the = operator
|
|---|
| 80 | // -----------------------
|
|---|
| 81 | // Well defined = semantics required by G4RWTPtrSortedVector
|
|---|
| 82 | //
|
|---|
| 83 | G4MPVEntry& G4MPVEntry::operator =(const G4MPVEntry& right)
|
|---|
| 84 | {
|
|---|
| 85 | if (this == &right) return *this;
|
|---|
| 86 |
|
|---|
| [850] | 87 | thePhotonEnergy = right.thePhotonEnergy;
|
|---|
| [822] | 88 | theProperty = right.theProperty;
|
|---|
| 89 | return *this;
|
|---|
| 90 | }
|
|---|
| 91 |
|
|---|
| 92 | /////////////////
|
|---|
| 93 | // Constructors
|
|---|
| 94 | /////////////////
|
|---|
| 95 |
|
|---|
| [850] | 96 | G4MPVEntry::G4MPVEntry(G4double aPhotonEnergy, G4double aProperty)
|
|---|
| [822] | 97 | {
|
|---|
| [850] | 98 | thePhotonEnergy = aPhotonEnergy;
|
|---|
| [822] | 99 | theProperty = aProperty;
|
|---|
| 100 | }
|
|---|
| 101 |
|
|---|
| 102 | G4MPVEntry::G4MPVEntry(const G4MPVEntry &right)
|
|---|
| 103 | {
|
|---|
| [850] | 104 | thePhotonEnergy = right.thePhotonEnergy;
|
|---|
| [822] | 105 | theProperty = right.theProperty;
|
|---|
| 106 | }
|
|---|
| 107 |
|
|---|
| 108 |
|
|---|
| 109 | ////////////////
|
|---|
| 110 | // Destructors
|
|---|
| 111 | ////////////////
|
|---|
| 112 |
|
|---|
| 113 | G4MPVEntry::~G4MPVEntry(){}
|
|---|
| 114 |
|
|---|
| 115 | ////////////
|
|---|
| 116 | // Methods
|
|---|
| 117 | ////////////
|
|---|
| 118 |
|
|---|
| 119 | void G4MPVEntry::DumpEntry()
|
|---|
| 120 | {
|
|---|
| 121 | G4cout << "("
|
|---|
| [850] | 122 | << thePhotonEnergy
|
|---|
| [822] | 123 | << ", "
|
|---|
| 124 | << theProperty
|
|---|
| 125 | << ")"
|
|---|
| 126 | << G4endl;
|
|---|
| 127 | }
|
|---|