1 // Author: Benjamin Hess 06/11/2009
3 /*************************************************************************
4 * Copyright (C) 2009, Alexandru Bercuci, Benjamin Hess. *
5 * All rights reserved. *
6 *************************************************************************/
8 #ifndef AliEveListAnalyserEditor_H
9 #define AliEveListAnalyserEditor_H
12 // TODO: Documentation
13 //////////////////////////////////////////////////////////////////////////
15 // AliEveListAnalyserEditor //
17 // The AliEveListAnalyserEditor provides the graphical func- //
18 // tionality for the AliEveListAnalyser. It creates the tabs //
19 // and canvases, when they are needed and, as well, frees allocated //
20 // memory on destruction (or if new events are loaded and thus some //
21 // tabs are closed). //
22 // The function DrawHistos() accesses the temporary file created by the //
23 // AliEveListAnalyser and draws the desired data (the file will //
24 // be created within the call of ApplyMacros()). Have a look at this //
25 // function to learn more about the structure of the file and how to //
26 // access the data. //
27 //////////////////////////////////////////////////////////////////////////
29 #ifndef ROOT_TGedFrame
30 #include <TGedFrame.h>
37 //class AliEveTRDTrack;
38 class AliEveListAnalyser;
39 class AliTRDReconstructor;
49 class TGHorizontal3DLine;
50 class TGHorizontalFrame;
58 class TGVerticalFrame;
65 class AliEveListAnalyserEditor: public TGedFrame
68 AliEveListAnalyserEditor(const TGWindow* p = 0, Int_t width = 170, Int_t height = 30,
69 UInt_t options = kChildFrame, Pixel_t back = GetDefaultFrameBackground());
70 virtual ~AliEveListAnalyserEditor();
71 virtual void SetModel(TObject* obj);
73 void AddMacro(const Char_t* name, const Char_t* path = ".");
78 Int_t GetNSelectedHistograms() const;
79 void HandleMacroPathSet();
80 void HandleNewEventLoaded();
81 void HandleTabChangedToIndex(Int_t);
84 void SaveMacroList(TMap* list);
85 // void SetTrackColor(Int_t ind);
86 // void SetTrackModel(Int_t ind);
87 void UpdateDataFromMacroListSelection();
88 void UpdateHistoList();
89 void UpdateMacroList();
90 void UpdateMacroListSelection(Int_t ind);
93 AliEveListAnalyser* fM; // Model object
95 void InheritMacroList();
99 AliEveListAnalyserEditor(const AliEveListAnalyserEditor&); // Not implemented
100 AliEveListAnalyserEditor& operator=(const AliEveListAnalyserEditor&); // Not implemented
102 TCanvas* fHistoCanvas; // Canvas for the histograms
103 TGString* fHistoCanvasName; // Name of the histogram canvas
105 TMap* fInheritedMacroList; // Stores the from the analyse object list inherited macro list
107 Bool_t fInheritSettings; // Flag indicating, whether the macro list will be inherited from
108 // the previously loaded analyse object list within the next call of SetModel
110 // TODO: Old version with "style" still alive has comment:
111 // Flag indicating, whether the macro list and the style settings will be
112 // inherited from the previously loaded track list within the next call
115 // TGHorizontalFrame* fStyleFrame; // Frame for the style stuff
116 TGVerticalFrame* fMainFrame; // Top frame for macro functionality.
117 TGVerticalFrame* fHistoFrame; // Top frame for the histogram stuff
118 TGVerticalFrame* fHistoSubFrame; // Frame for the histogram buttons themselves
119 TGHorizontalFrame* fBrowseFrame; // Frame for features corresponding to searching macros
120 // TGButtonGroup* fbgStyleColor; // Button group for the color model
121 // TGButtonGroup* fbgStyleTrack; // Button group for the track model
123 // TGRadioButton** frbColor; // Radio buttons for the color model
124 // TGRadioButton** frbTrack; // Radio buttons for the track model
126 TGTextButton* fbBrowse; // "Browse" button
127 TGTextButton* fbNew; // "New" button
128 TGTextButton* fbApplyMacros; // "Apply macros" button
129 TGTextButton* fbRemoveMacros; // "Remove macros" button
130 TGTextButton* fbDrawHisto; // "Draw histogram" button
131 TGTextEntry* fteField; // Text field to insert macro path manually
132 TGListBox* ftlMacroList; // To display the list of (process) macros
133 TGListBox* ftlMacroSelList; // To display the list of (selection) macros
135 TGFileInfo* fFileInfo; // Holds data about opening macros
136 Char_t** fFileTypes; // File types (for macros)
145 TGHorizontal3DLine *fLine1;
146 TGHorizontal3DLine *fLine2;
147 TGHorizontal3DLine *fLine3;
148 TGHorizontal3DLine *fLine4;
149 // TGHorizontal3DLine *fLine5;
151 TGCheckButton** fCheckButtons; // Check buttons for histograms
154 void SetDrawingToHistoCanvasTab();
155 void UpdateHistoCanvasTab();
157 ClassDef(AliEveListAnalyserEditor, 0); // Editor for AliEveListAnalyser.
161 //////////////////////////////////////////////////////////////////////////
163 // AliEveGeneralMacroWizard //
165 // Wizard for creating new macros. //
167 //////////////////////////////////////////////////////////////////////////
171 class AliEveGeneralMacroWizard : public TGMainFrame
174 AliEveGeneralMacroWizard(const TGWindow* p = 0);
175 void Create(Int_t type); //*SIGNAL*
176 void Create(Char_t *pname); //*SIGNAL*
180 AliEveGeneralMacroWizard(const AliEveGeneralMacroWizard&);
181 AliEveGeneralMacroWizard& operator=(const AliEveGeneralMacroWizard&);
183 TGTextEntry *fTextName;
184 TGTextEntry *fTextObjectType;
186 TGTextEdit *fTextEdit;
187 TGTextButton *fbCreate; // "Done" button
188 TGTextButton *fbCancel; // "Cancel" button
190 ClassDef(AliEveGeneralMacroWizard, 0); // Helper class to create macro templates