]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONPainterRegistry.h
Restoring backward compatibility of the SSD calibration objects + output of the SSD...
[u/mrichter/AliRoot.git] / MUON / AliMUONPainterRegistry.h
CommitLineData
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
22class TGPopupMenu;
23class TObjArray;
24class AliMUONVTrackerData;
25class AliMUONVTrackerDataMaker;
26class AliMUONPainterMatrix;
27class TGMenuBar;
28
4a3224ff 29class AliMUONPainterRegistry : public TObject, public TQObject
0145e89a 30{
0145e89a 31public:
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;
1ffbeb9d 39
40 AliMUONVTrackerData* InteractiveReadOutConfig() const;
49419555 41
0145e89a 42 void DataSourceWasRegistered(AliMUONVTrackerData* data); // *SIGNAL*
43
44 void DataSourceWasUnregistered(AliMUONVTrackerData* data); // *SIGNAL*
45
49419555 46 void DataMakerWasRegistered(AliMUONVTrackerDataMaker* reader); // *SIGNAL*
0145e89a 47
49419555 48 void DataMakerWasUnregistered(AliMUONVTrackerDataMaker* reader); // *SIGNAL*
0145e89a 49
0145e89a 50 Int_t FindIndexOf(AliMUONPainterMatrix* group) const;
51
0145e89a 52 void HistoryMenuActivated(Int_t i);
53
54 static AliMUONPainterRegistry* Instance();
55
49419555 56 Int_t NumberOfDataMakers() const;
0145e89a 57
99f1b909 58 /// Number of data sources = data makers
49419555 59 Int_t NumberOfDataSources() const { return NumberOfDataMakers(); }
0145e89a 60
61 Int_t NumberOfPainterMatrices() const;
62
63 AliMUONPainterMatrix* PainterMatrix(Int_t i) const;
64
49419555 65 AliMUONPainterMatrix* PainterMatrix(const char* groupName) const;
66
0145e89a 67 void AddToHistory(AliMUONPainterMatrix* group);
68
69 void PainterMatrixWasRegistered(AliMUONPainterMatrix* group); // *SIGNAL*
70
71 void PainterMatrixWasUnregistered(AliMUONPainterMatrix* group); // *SIGNAL*
72
73 void PainterMatrixWantToShow(AliMUONPainterMatrix* group); // *SIGNAL*
74
75 void Print(Option_t* opt) const;
76
77 Int_t Register(AliMUONPainterMatrix* group);
78
0145e89a 79 void Register(AliMUONVTrackerDataMaker* reader);
80
81 /// Set the menu bar where to put the history menu
82 void SetMenuBar(TGMenuBar* bar) { fMenuBar = bar; }
83
84 Bool_t Unregister(AliMUONPainterMatrix* group);
85
0145e89a 86 Bool_t Unregister(AliMUONVTrackerDataMaker* reader);
87
49419555 88 void DeleteZombies();
89
0145e89a 90private:
91 /// Not implemented
92 AliMUONPainterRegistry();
93 /// Not implemented
94 AliMUONPainterRegistry(const AliMUONPainterRegistry&);
95 /// Not implemented
96 AliMUONPainterRegistry& operator=(const AliMUONPainterRegistry&);
97
1ffbeb9d 98 void CreateInteractiveReadOutConfig() const;
99
0145e89a 100private:
101 static AliMUONPainterRegistry* fgInstance; ///< unique instance
0145e89a 102 TObjArray* fPainterMatrices; ///< painter matrices
49419555 103 TObjArray* fDataMakers; ///< data makers
0145e89a 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
49419555 107 TObjArray* fZombies; ///< data readers to be deleted
1ffbeb9d 108 mutable AliMUONVTrackerData* fInteractiveReadOutConfig; ///< clickable readout configuration
0145e89a 109
1ffbeb9d 110 ClassDef(AliMUONPainterRegistry,4) // Registry for AliMUONVPainter related stuff
0145e89a 111};
112
113#endif