Line data Source code
1 : #ifndef ALITRDCALIBVIEWERGUI_H
2 : #define ALITRDCALIBVIEWERGUI_H
3 : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 : * See cxx source for full Copyright notice */
5 :
6 : /* $Id: AliTRDCalibViewerGUI.h 34418 2009-08-26 15:47:50Z cblume $ */
7 :
8 : ///////////////////////////////////////////////////////////////////////////////
9 : // //
10 : // Class which implements AliBaseCalibViewerGUI for the TRD //
11 : // used for the calibration monitor //
12 : // //
13 : ///////////////////////////////////////////////////////////////////////////////
14 :
15 : #ifndef ROOT_TGButton
16 : #include "TGWidget.h"
17 : #endif
18 : #ifndef ROOT_TGFrame
19 : #include "TGFrame.h"
20 : #endif
21 : #include <TGButton.h>
22 : #include <TGListBox.h>
23 : #include <TGComboBox.h>
24 : #include <TGNumberEntry.h>
25 : #include <TRootEmbeddedCanvas.h>
26 : #include <TGSplitter.h>
27 : #include <TGButtonGroup.h>
28 : #include <TGLabel.h>
29 : #include <TGTab.h>
30 : #include <TString.h>
31 : #include "AliBaseCalibViewer.h"
32 : #include "AliTRDCalibViewer.h"
33 : #include "AliBaseCalibViewerGUI.h"
34 : class TROOTt;
35 :
36 : class AliTRDCalibViewerGUI : public AliBaseCalibViewerGUI {
37 :
38 : public:
39 : AliTRDCalibViewerGUI(const TGWindow *p, UInt_t w, UInt_t h, char* fileName); // constructor; fileName specifies the ROOT tree used for drawing
40 : AliTRDCalibViewerGUI(const AliTRDCalibViewerGUI &c); // copy constructor
41 : AliTRDCalibViewerGUI &operator = (const AliTRDCalibViewerGUI ¶m); // assignment operator
42 :
43 : virtual ~AliTRDCalibViewerGUI();
44 : static void ShowGUI(); // show the GUI
45 : static void ShowGUI(const Char_t* treeFile, const Char_t* treeName="TRDcalibDetails"); // show the GUI
46 : static void ShowGUIwithTrending(); // show a GUI with 2 tabs: 1 tab for time/run dependent observables
47 : // 1 tab for run details
48 :
49 : virtual void DrawGUI(const TGWindow *p, UInt_t w, UInt_t h); // to be called by the costructor, here the windows is drawn
50 : virtual void Initialize(const char* fileName, const char* treeName = "TRDcalibDetails"); // initializes the GUI with default settings and opens tree for drawing
51 : virtual void Initialize(AliBaseCalibViewer *viewer); // initializes the GUI with default settings and opens tree for drawing
52 0 : virtual void Reload(){Initialize(fViewer);} // reload the viewr after it has been changed, e.g. added a new referenceTree, ...
53 : virtual void Reset();
54 : virtual Bool_t CreateDetailsTree(Int_t run, const Char_t* outFile, const Char_t* ocdbStorage="nothing"); // create a tree with pad level info for a given run
55 :
56 : virtual TString* GetDrawString(); // create the draw string out of selection
57 : virtual TString* GetCutString(); // create the cut string out of selection
58 : virtual TString* GetSectorString(); // create the sector string out of selection
59 : // virtual AliBaseCalibViewer* GetViewer() {return fViewer;} // returns the internal AliTPCCalibViewer object, which does the work
60 : virtual void DoDraw(); // main method for drawing according to user selection
61 : virtual void MouseMove(Int_t event, Int_t x, Int_t y, TObject *selected);
62 : void SetTree();
63 : void HandleFilesystem();
64 :
65 : protected:
66 : // TRD specific widgets; these are added to the ones painted by the base class
67 : TGCompositeFrame *fContLayer; // container for layer GUI elements -
68 : TGCompositeFrame *fContSector; // container for sector GUI elements -
69 : TGCompositeFrame *fContStack; // container for stack GUI elements -
70 : TGLabel *fLblLayer; // Layer label -
71 : TGLabel *fLblSector; // Sector label -
72 : TGLabel *fLblStack; // Stack label -
73 : TGNumberEntry *fNmbLayer; // Layer number entry -
74 : TGNumberEntry *fNmbSector; // Sector number entry -
75 : TGNumberEntry *fNmbStack; // Stack number entry -
76 : TGCompositeFrame *fContLoad; // 'Load Run' frame container -
77 : TGCompositeFrame *fContRun; // run frame -
78 : TGLabel *fLblRun; // run label -
79 : TGNumberEntry *fNmbRun; // run entry -
80 : TGCompositeFrame *fContStorage; // OCDB storage frame -
81 : TGLabel *fLblStorage; // OCDB label -
82 : TGTextEntry *fTxtStorage; // OCDB text entry -
83 : TGCompositeFrame *fContVersion; // version frame -
84 : TGLabel *fLblVersion; // version label -
85 : TGNumberEntry *fNmbVersion; // version number entry -
86 : TGCompositeFrame *fContSubVersion; // sub-version frame -
87 : TGLabel *fLblSubVersion; // sub-version label -
88 : TGNumberEntry *fNmbSubVersion; // sub-version number entry -
89 : TGCompositeFrame *fContChecks; // check buttons container -
90 : TGCheckButton *fChkCalibs; // check calibration -
91 : TGCheckButton *fChkDCS; // check DCS -
92 : TGCheckButton *fChkAlign; // check alignment -
93 : TGTextButton *fBtnLoad; // load button -
94 : // frame for loading an array of AliTRDCalPad objects
95 : TGCompositeFrame *fContLoadCalibObjects; // container for loading calib objects
96 : TGCompositeFrame *fContCalibInput; // container for the input file
97 : TGLabel *fLblCalibInputFilename; // label for the input file
98 : TGTextEntry *fTxtCalibInputFilename; // text entry for the input file
99 : TGCompositeFrame *fContCalibOutput; // container for output file
100 : TGLabel *fLblCalibOutputFilename; // label for output file
101 : TGTextEntry *fTxtCalibOutputFilename; // text entry for output file
102 : TGTextButton *fBtnLoadCalibObjects; // load button
103 :
104 48 : ClassDef(AliTRDCalibViewerGUI, 1)
105 : };
106 :
107 : #endif
|