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* DataMaker(Int_t i) const;
36 AliMUONVTrackerData* DataSource(Int_t i) const;
38 AliMUONVTrackerData* DataSource(const char* name) const;
40 void DataSourceWasRegistered(AliMUONVTrackerData* data); // *SIGNAL*
42 void DataSourceWasUnregistered(AliMUONVTrackerData* data); // *SIGNAL*
44 void DataMakerWasRegistered(AliMUONVTrackerDataMaker* reader); // *SIGNAL*
46 void DataMakerWasUnregistered(AliMUONVTrackerDataMaker* reader); // *SIGNAL*
48 Int_t FindIndexOf(AliMUONPainterMatrix* group) const;
50 void HistoryMenuActivated(Int_t i);
52 static AliMUONPainterRegistry* Instance();
54 Int_t NumberOfDataMakers() const;
56 /// Number of data sources = data makers
57 Int_t NumberOfDataSources() const { return NumberOfDataMakers(); }
59 Int_t NumberOfPainterMatrices() const;
61 AliMUONPainterMatrix* PainterMatrix(Int_t i) const;
63 AliMUONPainterMatrix* PainterMatrix(const char* groupName) const;
65 void AddToHistory(AliMUONPainterMatrix* group);
67 void PainterMatrixWasRegistered(AliMUONPainterMatrix* group); // *SIGNAL*
69 void PainterMatrixWasUnregistered(AliMUONPainterMatrix* group); // *SIGNAL*
71 void PainterMatrixWantToShow(AliMUONPainterMatrix* group); // *SIGNAL*
73 void Print(Option_t* opt) const;
75 Int_t Register(AliMUONPainterMatrix* group);
77 void Register(AliMUONVTrackerDataMaker* reader);
79 /// Set the menu bar where to put the history menu
80 void SetMenuBar(TGMenuBar* bar) { fMenuBar = bar; }
82 Bool_t Unregister(AliMUONPainterMatrix* group);
84 Bool_t Unregister(AliMUONVTrackerDataMaker* reader);
90 AliMUONPainterRegistry();
92 AliMUONPainterRegistry(const AliMUONPainterRegistry&);
94 AliMUONPainterRegistry& operator=(const AliMUONPainterRegistry&);
97 static AliMUONPainterRegistry* fgInstance; ///< unique instance
98 TObjArray* fPainterMatrices; ///< painter matrices
99 TObjArray* fDataMakers; ///< data makers
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
103 TObjArray* fZombies; ///< data readers to be deleted
105 ClassDef(AliMUONPainterRegistry,3) // Registry for AliMUONVPainter related stuff