In AliMUONTriggerQADataMakerRec:
[u/mrichter/AliRoot.git] / MUON / AliMUONPainterDataRegistry.h
CommitLineData
0b936dc0 1#ifndef ALIMUONPAINTERDATAREGISTRY_H
2#define ALIMUONPAINTERDATAREGISTRY_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: AliMUONPainterDataRegistry.h 26812 2008-06-20 15:22:59Z laphecet $
8
9/// \ingroup graphics
10/// \class AliMUONPainterDataRegistry
11/// \brief Registry for painter data sources
12///
13// Author Laurent Aphecetche, Subatech
14
15#ifndef ROOT_TObject
16# include "TObject.h"
17#endif
18#ifndef ROOT_TQObject
19# include <TQObject.h>
20#endif
21
22class TObjArray;
23class AliMUONVTrackerData;
24class AliMUONVTrackerDataMaker;
25
26class AliMUONPainterDataRegistry : public TObject, public TQObject
27{
28public:
29 virtual ~AliMUONPainterDataRegistry();
30
31 AliMUONVTrackerDataMaker* DataMaker(Int_t i) const;
32
33 AliMUONVTrackerData* DataSource(Int_t i) const;
34
35 AliMUONVTrackerData* DataSource(const char* name) const;
36
37 AliMUONVTrackerData* InteractiveReadOutConfig() const;
38
39 void DataSourceWasRegistered(AliMUONVTrackerData* data); // *SIGNAL*
40
41 void DataSourceWasUnregistered(AliMUONVTrackerData* data); // *SIGNAL*
42
43 void DataMakerWasRegistered(AliMUONVTrackerDataMaker* reader); // *SIGNAL*
44
45 void DataMakerWasUnregistered(AliMUONVTrackerDataMaker* reader); // *SIGNAL*
46
47 static AliMUONPainterDataRegistry* Instance();
48
49 Int_t NumberOfDataMakers() const;
50
51 /// Number of data sources = data makers
52 Int_t NumberOfDataSources() const { return NumberOfDataMakers(); }
53
54 void Print(Option_t* opt) const;
55
56 void Register(AliMUONVTrackerDataMaker* reader);
57
58 Bool_t Unregister(AliMUONVTrackerDataMaker* reader);
59
60 void DeleteZombies();
61
62private:
63 /// Not implemented
64 AliMUONPainterDataRegistry();
65 /// Not implemented
66 AliMUONPainterDataRegistry(const AliMUONPainterDataRegistry&);
67 /// Not implemented
68 AliMUONPainterDataRegistry& operator=(const AliMUONPainterDataRegistry&);
69
70 void CreateInteractiveReadOutConfig() const;
71
72private:
73 static AliMUONPainterDataRegistry* fgInstance; ///< unique instance
74 TObjArray* fDataMakers; ///< data makers
75 TObjArray* fZombies; ///< data readers to be deleted
76 mutable AliMUONVTrackerData* fInteractiveReadOutConfig; ///< clickable readout configuration
77
78 ClassDef(AliMUONPainterDataRegistry,1) // Registry for AliMUONVTrackerDataMaker objects
79};
80
81#endif