]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/EveDet/AliEveTRDTrackListEditor.h
updates in the documentation format and new logic(to be discussed) in
[u/mrichter/AliRoot.git] / EVE / EveDet / AliEveTRDTrackListEditor.h
1 // Author: Benjamin Hess   23/09/2008
2
3 /*************************************************************************
4  * Copyright (C) 2008, Alexandru Bercuci, Benjamin Hess.                 *
5  * All rights reserved.                                                  *
6  *************************************************************************/
7
8 #ifndef AliEveTRDTrackListEditor_H
9 #define AliEveTRDTrackListEditor_H
10
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.                                                     //
24 //////////////////////////////////////////////////////////////////////////
25
26 #include <TGedFrame.h>
27
28 class AliEveTRDTrack;
29 class AliEveTRDTrackList;
30 class AliTRDReconstructor;
31 class TCanvas;     
32 class TEveBrowser;           
33 class TEveGedEditor;
34 class TEveManager;
35 class TFile;
36 class TGButtonGroup;
37 class TGCheckButton;
38 class TGFileInfo;
39 class TGGroupFrame;
40 class TGHorizontal3DLine;
41 class TGHorizontalFrame;
42 class TGLabel;
43 class TGListBox;
44 class TGRadioButton;
45 class TGString;
46 class TGTab;
47 class TGTextButton;
48 class TGTextEntry;
49 class TGVerticalFrame;
50 class TH1;
51 class TTree;
52
53 class AliEveTRDTrackListEditor: public TGedFrame
54 {
55 public:
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();
59
60   virtual void SetModel(TObject* obj);
61
62   void AddMacro(const Char_t* path, const Char_t* name);  
63   void ApplyMacros();                                     
64   void BrowseMacros();                                    
65   void CloseTabs();                                      
66   void DrawHistos();                                      
67   Int_t GetNSelectedHistograms() const;                        
68   void HandleMacroPathSet();                             
69   void HandleNewEventLoaded();                           
70   void HandleTabChangedToIndex(Int_t);                 
71   void RemoveMacros();                                   
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);            
79   
80 protected:
81   AliEveTRDTrackList* fM;                                 // Model object
82
83   void InheritMacroList();                               
84   void InheritStyle();                                    
85
86 private:
87   AliEveTRDTrackListEditor(const AliEveTRDTrackListEditor&);            // Not implemented
88   AliEveTRDTrackListEditor& operator=(const AliEveTRDTrackListEditor&); // Not implemented 
89
90   TCanvas*          fHistoCanvas;            // Canvas for the histograms
91   TGString*         fHistoCanvasName;        // Name of the histogram canvas
92
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 
95                                              // of SetModel
96
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
104   
105   TGRadioButton**    frbColor;               // Radio buttons for the color model
106   TGRadioButton**    frbTrack;               // Radio buttons for the track model
107
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
115
116   TGFileInfo*     fFileInfo;                 // Holds data about opening macros
117   Char_t**        fFileTypes;                // File types (for macros)
118
119   // Some labels
120   TGLabel* fLabel1;
121   TGLabel* fLabel2;
122   TGLabel* fLabel3;
123   TGLabel* fLabel4;
124      
125   // Some lines
126   TGHorizontal3DLine *fLine1;
127   TGHorizontal3DLine *fLine2;
128   TGHorizontal3DLine *fLine3;
129   TGHorizontal3DLine *fLine4;
130   TGHorizontal3DLine *fLine5;  
131
132   TGCheckButton** fCheckButtons;            // Check buttons for histograms
133
134   // Help functions
135   void SetDrawingToHistoCanvasTab();        
136   void UpdateHistoCanvasTab();              
137
138   ClassDef(AliEveTRDTrackListEditor, 0);    // Editor for AliEveTRDTrackList.
139 };
140
141 #endif