1 #ifndef ALIMUONPAINTERREGISTRY_H
2 #define ALIMUONPAINTERREGISTRY_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
10 /// \class AliMUONPainterRegistry
11 /// \brief Registry for a bunch of AliMUONVPainter related stuff
13 // Author Laurent Aphecetche, Subatech
19 # include <TQObject.h>
24 class AliMUONVTrackerData;
25 class AliMUONVTrackerDataMaker;
26 class AliMUONPainterMatrix;
29 class AliMUONPainterRegistry : public TObject, public TQObject
32 virtual ~AliMUONPainterRegistry();
34 AliMUONVTrackerDataMaker* DataReader(Int_t i) const;
36 AliMUONVTrackerData* DataSource(Int_t i) const;
38 void DataSourceWasRegistered(AliMUONVTrackerData* data); // *SIGNAL*
40 void DataSourceWasUnregistered(AliMUONVTrackerData* data); // *SIGNAL*
42 void DataReaderWasRegistered(AliMUONVTrackerDataMaker* reader); // *SIGNAL*
44 void DataReaderWasUnregistered(AliMUONVTrackerDataMaker* reader); // *SIGNAL*
46 AliMUONVTrackerData* FindDataSource(const char* name) const;
48 Int_t FindIndexOf(AliMUONPainterMatrix* group) const;
50 Int_t FindIndexOf(AliMUONVTrackerData* data) const;
52 AliMUONPainterMatrix* FindPainterMatrix(const char* groupName) const;
54 void HistoryMenuActivated(Int_t i);
56 static AliMUONPainterRegistry* Instance();
58 Int_t NumberOfDataReaders() const;
60 Int_t NumberOfDataSources() const;
62 Int_t NumberOfPainterMatrices() const;
64 AliMUONPainterMatrix* PainterMatrix(Int_t i) const;
66 void AddToHistory(AliMUONPainterMatrix* group);
68 void PainterMatrixWasRegistered(AliMUONPainterMatrix* group); // *SIGNAL*
70 void PainterMatrixWasUnregistered(AliMUONPainterMatrix* group); // *SIGNAL*
72 void PainterMatrixWantToShow(AliMUONPainterMatrix* group); // *SIGNAL*
74 void Print(Option_t* opt) const;
76 Int_t Register(AliMUONPainterMatrix* group);
78 void Register(AliMUONVTrackerData* data);
80 void Register(AliMUONVTrackerDataMaker* reader);
82 /// Set the menu bar where to put the history menu
83 void SetMenuBar(TGMenuBar* bar) { fMenuBar = bar; }
85 Bool_t Unregister(AliMUONPainterMatrix* group);
87 Bool_t Unregister(AliMUONVTrackerData* data);
89 Bool_t Unregister(AliMUONVTrackerDataMaker* reader);
93 AliMUONPainterRegistry();
95 AliMUONPainterRegistry(const AliMUONPainterRegistry&);
97 AliMUONPainterRegistry& operator=(const AliMUONPainterRegistry&);
100 static AliMUONPainterRegistry* fgInstance; ///< unique instance
101 TObjArray* fDataSources; ///< data sources
102 TObjArray* fPainterMatrices; ///< painter matrices
103 TObjArray* fDataReaders; ///< data readers
104 TGPopupMenu* fHistoryMenu; ///< history menu
105 TGMenuBar* fMenuBar; ///< Menu bar where to put the history menu
106 Int_t fHistoryCounter; ///< index to get back history menu items
108 ClassDef(AliMUONPainterRegistry,1) // Registry for AliMUONVPainter related stuff