]>
Commit | Line | Data |
---|---|---|
676fb573 | 1 | // $Id$ |
2 | // Category: visualization | |
3 | // | |
ad42298e | 4 | // Author: I. Hrivnacova |
5 | // | |
6 | // Class AliColourStore | |
7 | // -------------------- | |
676fb573 | 8 | // Singleton data type class - store for the predefined colours. |
9 | ||
10 | #ifndef ALI_COLOUR_STORE_H | |
11 | #define ALI_COLOUR_STORE_H | |
12 | ||
c97337f9 | 13 | #include <G4Colour.hh> |
476fd655 | 14 | #include <globals.hh> |
ad42298e | 15 | #include <g4std/vector> |
676fb573 | 16 | |
476fd655 | 17 | #include <TColor.h> |
18 | ||
676fb573 | 19 | class AliColourStore |
20 | { | |
476fd655 | 21 | typedef G4std::vector<TColor> ColourVector; |
ad42298e | 22 | typedef ColourVector::iterator ColourIterator; |
23 | typedef ColourVector::const_iterator ColourConstIterator; | |
676fb573 | 24 | |
25 | public: | |
26 | // --> protected | |
27 | // AliColourStore(); | |
28 | // AliColourStore(const AliColourStore& right); | |
29 | virtual ~AliColourStore(); | |
30 | ||
31 | // static methods | |
32 | static AliColourStore* Instance(); | |
33 | ||
476fd655 | 34 | // modifiers |
35 | G4Colour AddColour(const G4String& name, | |
36 | G4double red, G4double blue, G4double green); | |
37 | ||
676fb573 | 38 | // get methods |
476fd655 | 39 | G4Colour GetColour(const G4String& name) const; |
40 | G4Colour GetColour(const TColor& color) const; | |
676fb573 | 41 | G4String GetColoursList() const; |
42 | G4String GetColoursListWithCommas() const; | |
43 | ||
44 | protected: | |
45 | AliColourStore(); | |
46 | AliColourStore(const AliColourStore& right); | |
47 | ||
48 | // operators | |
49 | AliColourStore& operator=(const AliColourStore& right); | |
50 | ||
51 | private: | |
52 | // static data members | |
53 | static AliColourStore* fgInstance; //this instance | |
54 | ||
55 | // data members | |
ad42298e | 56 | ColourVector fColours; //vector of AliColour |
676fb573 | 57 | }; |
58 | ||
59 | #endif //ALI_COLOUR_STORE_H |