]> git.uio.no Git - u/mrichter/AliRoot.git/blob - AliGeant4/AliColour.cxx
Add ResetDecayTable() and SsetDecayTable() methods.
[u/mrichter/AliRoot.git] / AliGeant4 / AliColour.cxx
1 // $Id$
2 // Category: visualization
3 //
4 // See the class description in the header file.
5
6 #include "AliColour.h"
7 #include <G4Colour.hh>
8   
9 AliColour::AliColour()
10   : fName (""),
11     fRed(0.),
12     fBlue(0.),
13     fGreen(0.)
14 {
15 //
16 }
17
18 AliColour::AliColour(G4String name, G4double red, G4double blue, G4double green)
19   : fName(name),
20     fRed(red),
21     fBlue(blue),
22     fGreen(green)
23 {
24 //
25 }
26
27 AliColour::AliColour(const AliColour& right) {
28 //
29   fName = right.fName;
30   fRed = right.fRed;
31   fBlue = right.fBlue;
32   fGreen = right.fGreen;
33 }
34
35 AliColour::~AliColour() {
36 //
37 }
38
39 // operators
40
41 AliColour& AliColour::operator=(const AliColour& right)
42 {    
43   // check assignement to self
44   if (this == &right) return *this;
45   
46   fName = right.fName;
47   fRed = right.fRed;
48   fBlue = right.fBlue;
49   fGreen = right.fGreen;
50   
51   return *this;
52 }
53
54 G4int AliColour::operator==(const AliColour& right) const
55 {    
56 //
57   G4int returnValue = 0;
58   if ( fName == right.fName && 
59        fRed == right.fRed && fBlue == right.fBlue && fGreen == right.fGreen) 
60   { returnValue = 1; };
61
62   return returnValue;  
63 }
64
65 G4int AliColour::operator!=(const AliColour& right) const
66 {
67 //    
68   G4int returnValue = 1;
69   if (*this == right) returnValue = 0; 
70   
71   return returnValue;
72 }