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 | // |
---|
27 | // $Id: G4MPVEntry.cc,v 1.9 2009/04/21 15:35:45 gcosmo Exp $ |
---|
28 | // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ |
---|
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 | // |
---|
55 | G4bool G4MPVEntry::operator == (const G4MPVEntry &right) const |
---|
56 | { |
---|
57 | if (thePhotonEnergy == right.thePhotonEnergy) |
---|
58 | { return true; } |
---|
59 | else |
---|
60 | { return false; } |
---|
61 | } |
---|
62 | |
---|
63 | // Overload the < operator |
---|
64 | // ----------------------- |
---|
65 | // Well defined < semantics required by G4RWTPtrSortedVector |
---|
66 | // |
---|
67 | G4bool G4MPVEntry::operator < (const G4MPVEntry &right) const |
---|
68 | { |
---|
69 | if (thePhotonEnergy < right.thePhotonEnergy) |
---|
70 | { return true; } |
---|
71 | else |
---|
72 | { return false; } |
---|
73 | } |
---|
74 | |
---|
75 | // Overload the = operator |
---|
76 | // ----------------------- |
---|
77 | // Well defined = semantics required by G4RWTPtrSortedVector |
---|
78 | // |
---|
79 | G4MPVEntry& G4MPVEntry::operator = (const G4MPVEntry& right) |
---|
80 | { |
---|
81 | if (this == &right) { return *this; } |
---|
82 | |
---|
83 | thePhotonEnergy = right.thePhotonEnergy; |
---|
84 | theProperty = right.theProperty; |
---|
85 | return *this; |
---|
86 | } |
---|
87 | |
---|
88 | ///////////////// |
---|
89 | // Constructors |
---|
90 | ///////////////// |
---|
91 | |
---|
92 | G4MPVEntry::G4MPVEntry(G4double aPhotonEnergy, G4double aProperty) |
---|
93 | { |
---|
94 | thePhotonEnergy = aPhotonEnergy; |
---|
95 | theProperty = aProperty; |
---|
96 | } |
---|
97 | |
---|
98 | G4MPVEntry::G4MPVEntry(const G4MPVEntry &right) |
---|
99 | { |
---|
100 | thePhotonEnergy = right.thePhotonEnergy; |
---|
101 | theProperty = right.theProperty; |
---|
102 | } |
---|
103 | |
---|
104 | //////////////// |
---|
105 | // Destructor |
---|
106 | //////////////// |
---|
107 | |
---|
108 | G4MPVEntry::~G4MPVEntry() |
---|
109 | { |
---|
110 | } |
---|
111 | |
---|
112 | //////////// |
---|
113 | // Methods |
---|
114 | //////////// |
---|
115 | |
---|
116 | void G4MPVEntry::DumpEntry() |
---|
117 | { |
---|
118 | G4cout << "(" << thePhotonEnergy << ", " << theProperty << ")" << G4endl; |
---|
119 | } |
---|