]>
Commit | Line | Data |
---|---|---|
1 | // $Id$ | |
2 | // Category: visualization | |
3 | // | |
4 | // Author: I. Hrivnacova | |
5 | // | |
6 | // Class AliColourStore | |
7 | // -------------------- | |
8 | // Singleton data type class - store for the predefined colours. | |
9 | ||
10 | #ifndef ALI_COLOUR_STORE_H | |
11 | #define ALI_COLOUR_STORE_H | |
12 | ||
13 | #include <G4Colour.hh> | |
14 | #include <globals.hh> | |
15 | #include <g4std/vector> | |
16 | ||
17 | #include <TColor.h> | |
18 | ||
19 | class AliColourStore | |
20 | { | |
21 | typedef G4std::vector<TColor> ColourVector; | |
22 | typedef ColourVector::iterator ColourIterator; | |
23 | typedef ColourVector::const_iterator ColourConstIterator; | |
24 | ||
25 | public: | |
26 | // --> protected | |
27 | // AliColourStore(); | |
28 | // AliColourStore(const AliColourStore& right); | |
29 | virtual ~AliColourStore(); | |
30 | ||
31 | // static methods | |
32 | static AliColourStore* Instance(); | |
33 | ||
34 | // modifiers | |
35 | G4Colour AddColour(const G4String& name, | |
36 | G4double red, G4double blue, G4double green); | |
37 | ||
38 | // get methods | |
39 | G4Colour GetColour(const G4String& name) const; | |
40 | G4Colour GetColour(const TColor& color) const; | |
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 | |
56 | ColourVector fColours; //vector of AliColour | |
57 | }; | |
58 | ||
59 | #endif //ALI_COLOUR_STORE_H |