]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/EveDet/AliEveTRDTrackListEditor.h
made functional track style (almost finished)
[u/mrichter/AliRoot.git] / EVE / EveDet / AliEveTRDTrackListEditor.h
1 #ifndef AliEveTRDTrackListEditor_H
2 #define AliEveTRDTrackListEditor_H
3
4 #include <TGedFrame.h>
5
6 class AliEveTRDTrack;
7 class AliEveTRDTrackList;
8 class TCanvas;     
9 class TEveBrowser;           
10 class TEveGedEditor;
11 class TEveManager;
12 class TFile;
13 class TGButtonGroup;
14 class TGCheckButton;
15 class TGFileInfo;
16 class TGGroupFrame;
17 class TGHorizontal3DLine;
18 class TGHorizontalFrame;
19 class TGLabel;
20 class TGListBox;
21 class TGRadioButton;
22 class TGString;
23 class TGTab;
24 class TGTextButton;
25 class TGTextEntry;
26 class TGVerticalFrame;
27 class TH1;
28 class TTree;
29
30 class AliEveTRDTrackListEditor: public TGedFrame
31 {
32 public:
33   AliEveTRDTrackListEditor(const TGWindow* p = 0, Int_t width = 170, Int_t height = 30,
34                                        UInt_t options = kChildFrame, Pixel_t back = GetDefaultFrameBackground());
35   virtual ~AliEveTRDTrackListEditor();
36
37   virtual void SetModel(TObject* obj);
38
39   void AddMacro(const Char_t* path, const Char_t* name);  // Adds macro to the macro list
40   void ApplyMacros();                                     // Apply macros
41   void BrowseMacros();                                    // Browse macros
42   void CloseTabs();                                       // Closes + deletes all the tabs opened created by this class
43   void DrawHistos();                                      // Draw histograms
44   Int_t GetNSelectedHistograms();                         // Get the number of selected histograms for drawing
45   void HandleMacroPathSet();                              // Handles the "macro path set"-signal
46   void HandleNewEventLoaded();                            // Handles the "NewEventLoaded()"-signal
47   void HandleTabChangedToIndex(Int_t);                    // Handles the "Selected(Int_t id)"-signal (tab changed)
48   void RemoveMacros();                                    // Removes the selected macros from the lists
49   void SetTrackModel(Int_t ind);                          // Sets the track model 
50   void SetTrackColor(Int_t ind);                          // Sets the track color 
51   void UpdateDataFromMacroListSelection();                // Updates the selection in the "data from macro"-list
52   void UpdateHistoList();                                 // Updates the histogram list
53   void UpdateMacroList();                                 // Updates the macro list
54   void UpdateMacroListSelection(Int_t ind);               // Updates the selection of the process macro list
55   void UpdateMacroSelListSelection(Int_t ind);            // Updates the selection of the selection macro list
56   
57 protected:
58   AliEveTRDTrackList* fM;                                 // Model object
59
60   void InheritMacroList();                                // Inherits macro list from the previously loaded track list
61
62 private:
63   AliEveTRDTrackListEditor(const AliEveTRDTrackListEditor&);            // Not implemented
64   AliEveTRDTrackListEditor& operator=(const AliEveTRDTrackListEditor&); // Not implemented 
65
66   TCanvas*          fHistoCanvas;            // Canvas for the histograms
67   TGString*         fHistoCanvasName;        // Name of the histogram canvas
68
69   Bool_t            fInheritMacroList;       // Flag indicating, whether the macro list will be inherited from the
70                                              // previously loaded track list within the next call of SetModel
71
72   TGHorizontalFrame* fStyleFrame;            // Frame for the style stuff
73   TGVerticalFrame*   fMainFrame;             // Top frame for macro functionality.
74   TGVerticalFrame*   fHistoFrame;            // Top frame for the histogram stuff
75   TGVerticalFrame*   fHistoSubFrame;         // Frame for the histogram buttons themselves
76   TGHorizontalFrame* fBrowseFrame;           // Frame for features corresponding to searching macros
77   TGButtonGroup*     fbgStyleColor;          // Button group for the color model
78   TGButtonGroup*     fbgStyleTrack;          // Button group for the track model
79   
80   TGRadioButton**    frbColor;               // Radio buttons for the color model
81   TGRadioButton**    frbTrack;               // Radio buttons for the track model
82
83   TGTextButton*   fbBrowse;                  // "Browse" button
84   TGTextButton*   fbApplyMacros;             // "Apply macros" button
85   TGTextButton*   fbRemoveMacros;            // "Remove macros" button
86   TGTextButton*   fbDrawHisto;               // "Draw histogram" button
87   TGTextEntry*    fteField;                  // Text field to insert macro path manually
88   TGListBox*      ftlMacroList;              // To display the list of (process) macros
89   TGListBox*      ftlMacroSelList;           // To display the list of (selection) macros
90
91   TGFileInfo*     fFileInfo;                 // Holds data about opening macros
92   Char_t**        fFileTypes;                // File types (for macros)
93
94   // Some labels
95   TGLabel* fLabel1;
96   TGLabel* fLabel2;
97   TGLabel* fLabel3;
98   TGLabel* fLabel4;
99      
100   // Some lines
101   TGHorizontal3DLine *fLine1;
102   TGHorizontal3DLine *fLine2;
103   TGHorizontal3DLine *fLine3;
104   TGHorizontal3DLine *fLine4;
105   TGHorizontal3DLine *fLine5;  
106
107   // Check buttons for histograms
108   TGCheckButton** fCheckButtons;
109
110   // Help functions
111   void SetDrawingToHistoCanvasTab();        // Sets focus on the tab for histograms and makes fHistoCanvas be the
112                                             // current tab
113   void UpdateHistoCanvasTab();              // Updates the histogram and the corresponding tab (including titles)
114
115   ClassDef(AliEveTRDTrackListEditor, 0);    // Editor for AliEveTRDTrackList.
116 };
117
118 #endif