ALIROOT-5420 Changes for CDH v3
[u/mrichter/AliRoot.git] / MUON / AliMUONPainterPlotSelector.h
... / ...
CommitLineData
1#ifndef ALIMUONPAINTERPLOTSELECTOR_H
2#define ALIMUONPAINTERPLOTSELECTOR_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 AliMUONPainterPlotSelector
11/// \brief Widget to pick what to plot for the painters
12///
13// Author Laurent Aphecetche, Subatech
14
15#ifndef ROOT_TGFrame
16# include "TGFrame.h"
17#endif
18#ifndef ROOT_TString
19# include "TString.h"
20#endif
21
22class AliMUONPainterMatrix;
23class AliMUONVTrackerData;
24class TGButtonGroup;
25class TMap;
26
27class AliMUONPainterPlotSelector : public TGCompositeFrame
28{
29public:
30 AliMUONPainterPlotSelector(const TGWindow* window, UInt_t w=1, UInt_t h=1);
31 virtual ~AliMUONPainterPlotSelector();
32
33 void DataSourceWasRegistered(AliMUONVTrackerData* data);
34
35 void DataSourceWasUnregistered(AliMUONVTrackerData* data);
36
37 void DataSourceWasChanged(const char* type,
38 AliMUONVTrackerData* data,
39 Int_t dataIndex); // *SIGNAL*
40
41 void DimensionButtonWasClicked(Int_t id);
42
43 void SourceButtonWasClicked(Int_t id);
44
45 void TypeButtonWasClicked(Int_t id);
46
47 void Update(const AliMUONPainterMatrix& painterMatrix);
48
49 void NumberOfEventsChanged();
50
51private:
52 /// Not implemented
53 AliMUONPainterPlotSelector(const AliMUONPainterPlotSelector& rhs);
54 /// Not implemented
55 AliMUONPainterPlotSelector& operator=(const AliMUONPainterPlotSelector& rhs);
56
57 void BackupDimensionButtons();
58
59 void CreateDimensionButtons(const char* dataSourceName);
60
61 void CreateTypeButtons(const TObjArray& types);
62
63 void DataSourceWasChanged();
64
65 void ResetDimensionButtonMap();
66
67 void RestoreDimensionButtons(const char* dataSourceName,
68 Bool_t updateCurrentDimension);
69
70 void SetCurrentData(AliMUONVTrackerData* data);
71
72 void SetCurrentDimension(Long_t i);
73
74 void SetCurrentType(const char* type);
75
76 void UpdateDimensionButton();
77
78 void UpdateSourceButton();
79
80 void UpdateTypeButton();
81
82private:
83
84 TGButtonGroup* fTypes; ///< types buttons
85 TGButtonGroup* fDataSourceNames; ///< data source names buttons
86 TGButtonGroup* fDataSourceDimensions; ///< data source dimensions buttons
87 TMap* fDimensionButtonMap; ///< cache for button group
88 TString fCurrentType; ///< current type
89 AliMUONVTrackerData* fCurrentData; ///< current data
90 Long_t fCurrentDimension; ///< current data index
91 static const char* fgkDefaultSourceName; ///< default source name
92
93 ClassDef(AliMUONPainterPlotSelector,1) // Widget to select what to plot for painters
94};
95
96#endif