]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EVE/EveDet/AliEveTRDTrackListEditor.h
Coverit
[u/mrichter/AliRoot.git] / EVE / EveDet / AliEveTRDTrackListEditor.h
CommitLineData
c1869a7c 1// Author: Benjamin Hess 29/01/2010
2670605d 2
3/*************************************************************************
c1869a7c 4 * Copyright (C) 2009-2010, Alexandru Bercuci, Benjamin Hess. *
2670605d 5 * All rights reserved. *
6 *************************************************************************/
16db6074 7
2ef0687e 8#ifndef AliEveTRDTrackListEditor_H
9#define AliEveTRDTrackListEditor_H
10
16db6074 11//////////////////////////////////////////////////////////////////////////
12// //
13// AliEveTRDTrackListEditor //
14// //
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. //
16db6074 24//////////////////////////////////////////////////////////////////////////
25
db16b708 26#ifndef ROOT_TGedFrame
2ef0687e 27#include <TGedFrame.h>
db16b708 28#endif
29
30#ifndef ROOT_TGFrame
31#include <TGFrame.h>
32#endif
caaf90d2 33
34class AliEveTRDTrack;
35class AliEveTRDTrackList;
8bdeb570 36class AliTRDReconstructor;
4f6473f6 37class TCanvas;
38class TEveBrowser;
8e27fca1 39class TEveGedEditor;
40class TEveManager;
caaf90d2 41class TFile;
4cbab605 42class TGButtonGroup;
caaf90d2 43class TGCheckButton;
44class TGFileInfo;
4cbab605 45class TGGroupFrame;
caaf90d2 46class TGHorizontal3DLine;
47class TGHorizontalFrame;
48class TGLabel;
49class TGListBox;
4cbab605 50class TGRadioButton;
4f6473f6 51class TGString;
8e27fca1 52class TGTab;
caaf90d2 53class TGTextButton;
54class TGTextEntry;
55class TGVerticalFrame;
bcb45225 56class TH1;
38a30030 57class TMacroData;
58class TMap;
59class TMapIter;
caaf90d2 60class TTree;
2ef0687e 61
62class AliEveTRDTrackListEditor: public TGedFrame
63{
64public:
caaf90d2 65 AliEveTRDTrackListEditor(const TGWindow* p = 0, Int_t width = 170, Int_t height = 30,
66 UInt_t options = kChildFrame, Pixel_t back = GetDefaultFrameBackground());
67 virtual ~AliEveTRDTrackListEditor();
2ef0687e 68 virtual void SetModel(TObject* obj);
69
db16b708 70 void AddMacro(const Char_t* name, const Char_t* path = ".");
71 void ApplyMacros();
72 void BrowseMacros();
73 void CloseTabs();
74 void DrawHistos();
75 Int_t GetNSelectedHistograms() const;
76 void HandleMacroPathSet();
77 void HandleNewEventLoaded();
78 void HandleTabChangedToIndex(Int_t);
79 void NewMacros();
80 void RemoveMacros();
81 void SaveMacroList(TMap* list);
82 void SetTrackColor(Int_t ind);
83 void SetTrackModel(Int_t ind);
84 void UpdateDataFromMacroListSelection();
85 void UpdateHistoList();
86 void UpdateMacroList();
87 void UpdateMacroListSelection(Int_t ind);
4f6473f6 88
2ef0687e 89protected:
38a30030 90 AliEveTRDTrackList* fM; // Model object
2ef0687e 91
2670605d 92 void InheritMacroList();
93 void InheritStyle();
bcb45225 94
2ef0687e 95private:
96 AliEveTRDTrackListEditor(const AliEveTRDTrackListEditor&); // Not implemented
97 AliEveTRDTrackListEditor& operator=(const AliEveTRDTrackListEditor&); // Not implemented
98
4f6473f6 99 TCanvas* fHistoCanvas; // Canvas for the histograms
100 TGString* fHistoCanvasName; // Name of the histogram canvas
2ef0687e 101
38a30030 102 TMap* fInheritedMacroList; // Stores the from the track list inherited macro list
103
8bdeb570 104 Bool_t fInheritSettings; // Flag indicating, whether the macro list and the style settings will be
105 // inherited from the previously loaded track list within the next call
106 // of SetModel
bcb45225 107
ecbbe371 108 TGHorizontalFrame* fStyleFrame; // Frame for the style stuff
4f6473f6 109 TGVerticalFrame* fMainFrame; // Top frame for macro functionality.
110 TGVerticalFrame* fHistoFrame; // Top frame for the histogram stuff
111 TGVerticalFrame* fHistoSubFrame; // Frame for the histogram buttons themselves
ecbbe371 112 TGHorizontalFrame* fBrowseFrame; // Frame for features corresponding to searching macros
4cbab605 113 TGButtonGroup* fbgStyleColor; // Button group for the color model
114 TGButtonGroup* fbgStyleTrack; // Button group for the track model
115
116 TGRadioButton** frbColor; // Radio buttons for the color model
117 TGRadioButton** frbTrack; // Radio buttons for the track model
2ef0687e 118
caaf90d2 119 TGTextButton* fbBrowse; // "Browse" button
db16b708 120 TGTextButton* fbNew; // "New" button
caaf90d2 121 TGTextButton* fbApplyMacros; // "Apply macros" button
122 TGTextButton* fbRemoveMacros; // "Remove macros" button
123 TGTextButton* fbDrawHisto; // "Draw histogram" button
124 TGTextEntry* fteField; // Text field to insert macro path manually
125 TGListBox* ftlMacroList; // To display the list of (process) macros
126 TGListBox* ftlMacroSelList; // To display the list of (selection) macros
2ef0687e 127
caaf90d2 128 TGFileInfo* fFileInfo; // Holds data about opening macros
129 Char_t** fFileTypes; // File types (for macros)
2ef0687e 130
3f797131 131 // Some labels
39b891ff 132 TGLabel* fLabel1;
133 TGLabel* fLabel2;
134 TGLabel* fLabel3;
caaf90d2 135 TGLabel* fLabel4;
39b891ff 136
3f797131 137 // Some lines
39b891ff 138 TGHorizontal3DLine *fLine1;
139 TGHorizontal3DLine *fLine2;
140 TGHorizontal3DLine *fLine3;
caaf90d2 141 TGHorizontal3DLine *fLine4;
4cbab605 142 TGHorizontal3DLine *fLine5;
caaf90d2 143
16db6074 144 TGCheckButton** fCheckButtons; // Check buttons for histograms
3f797131 145
bcb45225 146 // Help functions
2670605d 147 void SetDrawingToHistoCanvasTab();
148 void UpdateHistoCanvasTab();
bcb45225 149
39b891ff 150 ClassDef(AliEveTRDTrackListEditor, 0); // Editor for AliEveTRDTrackList.
2ef0687e 151};
152
00dc25ef 153//////////////////////////////////////////////////////////////////////////
154// //
155// AliEveTRDMacroWizard //
156// //
157// Wizard for creating new macros. //
158// //
159//////////////////////////////////////////////////////////////////////////
160
db16b708 161class TGTextEdit;
162class TGComboBox;
00dc25ef 163class AliEveTRDMacroWizard : public TGMainFrame
db16b708 164{
165public:
00dc25ef 166 AliEveTRDMacroWizard(const TGWindow* p = 0);
167 void Create(Int_t type); //*SIGNAL*
57d55fae 168 void Create(Char_t *pname); //*SIGNAL*
9a11b2ee 169 void HandleCreate();
57d55fae 170
db16b708 171private:
00dc25ef 172 AliEveTRDMacroWizard(const AliEveTRDMacroWizard&);
173 AliEveTRDMacroWizard& operator=(const AliEveTRDMacroWizard&);
db16b708 174
175 TGTextEntry *fText;
176 TGComboBox *fCombo;
177 TGTextEdit *fTextEdit;
9a11b2ee 178 TGTextButton *fbCreate; // "Done" button
179 TGTextButton *fbCancel; // "Cancel" button
db16b708 180
00dc25ef 181 ClassDef(AliEveTRDMacroWizard, 0); // Helper class to create macro templates
db16b708 182};
183
2ef0687e 184#endif