]> git.uio.no Git - u/mrichter/AliRoot.git/blob - AliGeant4/AliColour.cxx
two levels of verbose introduced; AliHeader.h include added
[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   // copy stuff
30   *this = right;
31 }
32
33 AliColour::~AliColour() {
34 //
35 }
36
37 // operators
38
39 AliColour& AliColour::operator=(const AliColour& right)
40 {    
41   // check assignement to self
42   if (this == &right) return *this;
43   
44   fName = right.fName;
45   fRed = right.fRed;
46   fBlue = right.fBlue;
47   fGreen = right.fGreen;
48   
49   return *this;
50 }
51
52 G4int AliColour::operator==(const AliColour& right) const
53 {    
54 //
55   G4int returnValue = 0;
56   if ( fName == right.fName && 
57        fRed == right.fRed && fBlue == right.fBlue && fGreen == right.fGreen) 
58   { returnValue = 1; };
59
60   return returnValue;  
61 }
62
63 G4int AliColour::operator!=(const AliColour& right) const
64 {
65 //    
66   G4int returnValue = 1;
67   if (*this == right) returnValue = 0; 
68   
69   return returnValue;
70 }