1 // Author: Benjamin Hess 23/09/2008
3 /*************************************************************************
4 * Copyright (C) 2008, Alexandru Bercuci, Benjamin Hess. *
5 * All rights reserved. *
6 *************************************************************************/
8 #ifndef AliEveTRDTrackListEditor_H
9 #define AliEveTRDTrackListEditor_H
11 //////////////////////////////////////////////////////////////////////////
13 // AliEveTRDTrackListEditor //
15 // The AliEveTRDTrackListEditor provides the graphical functionality //
16 // for the AliEveTRDTrackList. It creates the tabs and canvases, when //
17 // they are needed and, as well, frees allocated memory on destruction //
18 // (or if new events are loaded and thus some tabs are closed). //
19 // The function DrawHistos() accesses the temporary file created by the //
20 // AliEveTRDTrackList and draws the desired data (the file will be //
21 // created within the call of ApplyMacros()). Have a look at this //
22 // function to learn more about the structure of the file and how to //
23 // access the data. //
24 //////////////////////////////////////////////////////////////////////////
26 #include <TGedFrame.h>
29 class AliEveTRDTrackList;
30 class AliTRDReconstructor;
40 class TGHorizontal3DLine;
41 class TGHorizontalFrame;
49 class TGVerticalFrame;
53 class AliEveTRDTrackListEditor: public TGedFrame
56 AliEveTRDTrackListEditor(const TGWindow* p = 0, Int_t width = 170, Int_t height = 30,
57 UInt_t options = kChildFrame, Pixel_t back = GetDefaultFrameBackground());
58 virtual ~AliEveTRDTrackListEditor();
60 virtual void SetModel(TObject* obj);
62 void AddMacro(const Char_t* path, const Char_t* name);
67 Int_t GetNSelectedHistograms() const;
68 void HandleMacroPathSet();
69 void HandleNewEventLoaded();
70 void HandleTabChangedToIndex(Int_t);
72 void SetTrackColor(Int_t ind);
73 void SetTrackModel(Int_t ind);
74 void UpdateDataFromMacroListSelection();
75 void UpdateHistoList();
76 void UpdateMacroList();
77 void UpdateMacroListSelection(Int_t ind);
78 void UpdateMacroSelListSelection(Int_t ind);
81 AliEveTRDTrackList* fM; // Model object
83 void InheritMacroList();
87 AliEveTRDTrackListEditor(const AliEveTRDTrackListEditor&); // Not implemented
88 AliEveTRDTrackListEditor& operator=(const AliEveTRDTrackListEditor&); // Not implemented
90 TCanvas* fHistoCanvas; // Canvas for the histograms
91 TGString* fHistoCanvasName; // Name of the histogram canvas
93 Bool_t fInheritSettings; // Flag indicating, whether the macro list and the style settings will be
94 // inherited from the previously loaded track list within the next call
97 TGHorizontalFrame* fStyleFrame; // Frame for the style stuff
98 TGVerticalFrame* fMainFrame; // Top frame for macro functionality.
99 TGVerticalFrame* fHistoFrame; // Top frame for the histogram stuff
100 TGVerticalFrame* fHistoSubFrame; // Frame for the histogram buttons themselves
101 TGHorizontalFrame* fBrowseFrame; // Frame for features corresponding to searching macros
102 TGButtonGroup* fbgStyleColor; // Button group for the color model
103 TGButtonGroup* fbgStyleTrack; // Button group for the track model
105 TGRadioButton** frbColor; // Radio buttons for the color model
106 TGRadioButton** frbTrack; // Radio buttons for the track model
108 TGTextButton* fbBrowse; // "Browse" button
109 TGTextButton* fbApplyMacros; // "Apply macros" button
110 TGTextButton* fbRemoveMacros; // "Remove macros" button
111 TGTextButton* fbDrawHisto; // "Draw histogram" button
112 TGTextEntry* fteField; // Text field to insert macro path manually
113 TGListBox* ftlMacroList; // To display the list of (process) macros
114 TGListBox* ftlMacroSelList; // To display the list of (selection) macros
116 TGFileInfo* fFileInfo; // Holds data about opening macros
117 Char_t** fFileTypes; // File types (for macros)
126 TGHorizontal3DLine *fLine1;
127 TGHorizontal3DLine *fLine2;
128 TGHorizontal3DLine *fLine3;
129 TGHorizontal3DLine *fLine4;
130 TGHorizontal3DLine *fLine5;
132 TGCheckButton** fCheckButtons; // Check buttons for histograms
135 void SetDrawingToHistoCanvasTab();
136 void UpdateHistoCanvasTab();
138 ClassDef(AliEveTRDTrackListEditor, 0); // Editor for AliEveTRDTrackList.