]>
Commit | Line | Data |
---|---|---|
0145e89a | 1 | #ifndef ALIMUONPAINTERREGISTRY_H |
2 | #define ALIMUONPAINTERREGISTRY_H | |
3 | ||
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
7 | // $Id$ | |
8 | ||
9 | /// \ingroup graphics | |
10 | /// \class AliMUONPainterRegistry | |
11 | /// \brief Registry for a bunch of AliMUONVPainter related stuff | |
12 | /// | |
13 | // Author Laurent Aphecetche, Subatech | |
14 | ||
15 | #ifndef ROOT_TObject | |
16 | # include "TObject.h" | |
17 | #endif | |
4a3224ff | 18 | #ifndef ROOT_TQObject |
19 | # include <TQObject.h> | |
0145e89a | 20 | #endif |
21 | ||
22 | class TGPopupMenu; | |
23 | class TObjArray; | |
24 | class AliMUONVTrackerData; | |
25 | class AliMUONVTrackerDataMaker; | |
26 | class AliMUONPainterMatrix; | |
27 | class TGMenuBar; | |
28 | ||
4a3224ff | 29 | class AliMUONPainterRegistry : public TObject, public TQObject |
0145e89a | 30 | { |
0145e89a | 31 | public: |
32 | virtual ~AliMUONPainterRegistry(); | |
33 | ||
49419555 | 34 | AliMUONVTrackerDataMaker* DataMaker(Int_t i) const; |
0145e89a | 35 | |
36 | AliMUONVTrackerData* DataSource(Int_t i) const; | |
37 | ||
49419555 | 38 | AliMUONVTrackerData* DataSource(const char* name) const; |
39 | ||
0145e89a | 40 | void DataSourceWasRegistered(AliMUONVTrackerData* data); // *SIGNAL* |
41 | ||
42 | void DataSourceWasUnregistered(AliMUONVTrackerData* data); // *SIGNAL* | |
43 | ||
49419555 | 44 | void DataMakerWasRegistered(AliMUONVTrackerDataMaker* reader); // *SIGNAL* |
0145e89a | 45 | |
49419555 | 46 | void DataMakerWasUnregistered(AliMUONVTrackerDataMaker* reader); // *SIGNAL* |
0145e89a | 47 | |
0145e89a | 48 | Int_t FindIndexOf(AliMUONPainterMatrix* group) const; |
49 | ||
0145e89a | 50 | void HistoryMenuActivated(Int_t i); |
51 | ||
52 | static AliMUONPainterRegistry* Instance(); | |
53 | ||
49419555 | 54 | Int_t NumberOfDataMakers() const; |
0145e89a | 55 | |
99f1b909 | 56 | /// Number of data sources = data makers |
49419555 | 57 | Int_t NumberOfDataSources() const { return NumberOfDataMakers(); } |
0145e89a | 58 | |
59 | Int_t NumberOfPainterMatrices() const; | |
60 | ||
61 | AliMUONPainterMatrix* PainterMatrix(Int_t i) const; | |
62 | ||
49419555 | 63 | AliMUONPainterMatrix* PainterMatrix(const char* groupName) const; |
64 | ||
0145e89a | 65 | void AddToHistory(AliMUONPainterMatrix* group); |
66 | ||
67 | void PainterMatrixWasRegistered(AliMUONPainterMatrix* group); // *SIGNAL* | |
68 | ||
69 | void PainterMatrixWasUnregistered(AliMUONPainterMatrix* group); // *SIGNAL* | |
70 | ||
71 | void PainterMatrixWantToShow(AliMUONPainterMatrix* group); // *SIGNAL* | |
72 | ||
73 | void Print(Option_t* opt) const; | |
74 | ||
75 | Int_t Register(AliMUONPainterMatrix* group); | |
76 | ||
0145e89a | 77 | void Register(AliMUONVTrackerDataMaker* reader); |
78 | ||
79 | /// Set the menu bar where to put the history menu | |
80 | void SetMenuBar(TGMenuBar* bar) { fMenuBar = bar; } | |
81 | ||
82 | Bool_t Unregister(AliMUONPainterMatrix* group); | |
83 | ||
0145e89a | 84 | Bool_t Unregister(AliMUONVTrackerDataMaker* reader); |
85 | ||
49419555 | 86 | void DeleteZombies(); |
87 | ||
0145e89a | 88 | private: |
89 | /// Not implemented | |
90 | AliMUONPainterRegistry(); | |
91 | /// Not implemented | |
92 | AliMUONPainterRegistry(const AliMUONPainterRegistry&); | |
93 | /// Not implemented | |
94 | AliMUONPainterRegistry& operator=(const AliMUONPainterRegistry&); | |
95 | ||
96 | private: | |
97 | static AliMUONPainterRegistry* fgInstance; ///< unique instance | |
0145e89a | 98 | TObjArray* fPainterMatrices; ///< painter matrices |
49419555 | 99 | TObjArray* fDataMakers; ///< data makers |
0145e89a | 100 | TGPopupMenu* fHistoryMenu; ///< history menu |
101 | TGMenuBar* fMenuBar; ///< Menu bar where to put the history menu | |
102 | Int_t fHistoryCounter; ///< index to get back history menu items | |
49419555 | 103 | TObjArray* fZombies; ///< data readers to be deleted |
0145e89a | 104 | |
49419555 | 105 | ClassDef(AliMUONPainterRegistry,3) // Registry for AliMUONVPainter related stuff |
0145e89a | 106 | }; |
107 | ||
108 | #endif |