ROOT logo
#ifndef ALITRDCALIBVIEWERGUI_H
#define ALITRDCALIBVIEWERGUI_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
 * See cxx source for full Copyright notice                               */

/* $Id: AliTRDCalibViewerGUI.h 34418 2009-08-26 15:47:50Z cblume $ */

///////////////////////////////////////////////////////////////////////////////
//                                                                           //
//  Class which implements AliBaseCalibViewerGUI for the TRD                 //
//  used for the calibration monitor                                         //
//                                                                           //
///////////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TGButton
#include "TGWidget.h"
#endif
#ifndef ROOT_TGFrame
#include "TGFrame.h"
#endif
#include <TGButton.h>
#include <TGListBox.h>
#include <TGComboBox.h>
#include <TGNumberEntry.h>
#include <TRootEmbeddedCanvas.h>
#include <TGSplitter.h>
#include <TGButtonGroup.h>
#include <TGLabel.h>
#include <TGTab.h>
#include <TString.h>
#include "AliBaseCalibViewer.h"
#include "AliTRDCalibViewer.h"
#include "AliBaseCalibViewerGUI.h"
class TROOTt;
       
class AliTRDCalibViewerGUI : public AliBaseCalibViewerGUI {
   
public:
   AliTRDCalibViewerGUI(const TGWindow *p, UInt_t w, UInt_t h, char* fileName);  // constructor; fileName specifies the ROOT tree used for drawing
   AliTRDCalibViewerGUI(const AliTRDCalibViewerGUI &c);                          // copy constructor
   AliTRDCalibViewerGUI &operator = (const AliTRDCalibViewerGUI &param);         // assignment operator

   virtual ~AliTRDCalibViewerGUI();
   static void ShowGUI();                                                      // show the GUI
   static void ShowGUI(const Char_t* treeFile, const Char_t* treeName="TRDcalibDetails");  // show the GUI
   static void ShowGUIwithTrending();          // show a GUI with 2 tabs: 1 tab for time/run dependent observables
                                               //                        1 tab for run details
   
   virtual void DrawGUI(const TGWindow *p, UInt_t w, UInt_t h);         // to be called by the costructor, here the windows is drawn
   virtual void Initialize(const char* fileName, const char* treeName = "TRDcalibDetails"); // initializes the GUI with default settings and opens tree for drawing
   virtual void Initialize(AliBaseCalibViewer *viewer);                  // initializes the GUI with default settings and opens tree for drawing
   virtual void Reload(){Initialize(fViewer);}                          // reload the viewr after it has been changed, e.g. added a new referenceTree, ...
   virtual void Reset();
   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

   virtual TString* GetDrawString();                                    // create the draw string out of selection
   virtual TString* GetCutString();                                     // create the cut string out of selection
   virtual TString* GetSectorString();                                  // create the sector string out of selection
 //  virtual AliBaseCalibViewer* GetViewer() {return fViewer;}             // returns the internal AliTPCCalibViewer object, which does the work
   virtual void DoDraw();                            // main method for drawing according to user selection
   virtual void MouseMove(Int_t event, Int_t x, Int_t y, TObject *selected); 
   void SetTree();
   void HandleFilesystem();

protected:      
   // TRD specific widgets; these are added to the ones painted by the base class
   TGCompositeFrame    *fContLayer;               // container for layer GUI elements   -
   TGCompositeFrame    *fContSector;              // container for sector GUI elements  -
   TGCompositeFrame    *fContStack;               // container for stack GUI elements    -
   TGLabel             *fLblLayer;                // Layer label                          -
   TGLabel             *fLblSector;               // Sector label                        -
   TGLabel             *fLblStack;                // Stack label                         -
   TGNumberEntry       *fNmbLayer;                // Layer number entry                   -
   TGNumberEntry       *fNmbSector;               // Sector number entry                 -
   TGNumberEntry       *fNmbStack;                // Stack number entry                  -
   TGCompositeFrame    *fContLoad;                // 'Load Run' frame container          -
   TGCompositeFrame    *fContRun;                 // run frame                           -
   TGLabel             *fLblRun;                  // run label                           -
   TGNumberEntry       *fNmbRun;                  // run entry                           -
   TGCompositeFrame    *fContStorage;             // OCDB storage frame                   -
   TGLabel             *fLblStorage;              // OCDB label                           -
   TGTextEntry         *fTxtStorage;              // OCDB text entry                      -
   TGCompositeFrame    *fContVersion;	          // version frame                        -
   TGLabel             *fLblVersion;              // version label                         -
   TGNumberEntry       *fNmbVersion;              // version number entry                 -
   TGCompositeFrame    *fContSubVersion;	  // sub-version frame                  -
   TGLabel             *fLblSubVersion;           // sub-version label                  -
   TGNumberEntry       *fNmbSubVersion;           // sub-version number entry           -
   TGCompositeFrame    *fContChecks;              // check buttons container            -
   TGCheckButton       *fChkCalibs;               // check calibration                  -
   TGCheckButton       *fChkDCS;                  // check DCS                        -
   TGCheckButton       *fChkAlign;                // check alignment                   -
   TGTextButton        *fBtnLoad;                 // load button                        -
   // frame for loading an array of AliTRDCalPad objects
   TGCompositeFrame    *fContLoadCalibObjects;    //  container for loading calib objects
   TGCompositeFrame    *fContCalibInput;          //  container for the input file
   TGLabel             *fLblCalibInputFilename;   //   label for the input file
   TGTextEntry         *fTxtCalibInputFilename;   //   text entry for the input file
   TGCompositeFrame    *fContCalibOutput;         //   container for output file
   TGLabel             *fLblCalibOutputFilename;  //   label for output file
   TGTextEntry         *fTxtCalibOutputFilename;  //   text entry for output file
   TGTextButton        *fBtnLoadCalibObjects;     //   load button
   
   ClassDef(AliTRDCalibViewerGUI, 1)
};

#endif
 AliTRDCalibViewerGUI.h:1
 AliTRDCalibViewerGUI.h:2
 AliTRDCalibViewerGUI.h:3
 AliTRDCalibViewerGUI.h:4
 AliTRDCalibViewerGUI.h:5
 AliTRDCalibViewerGUI.h:6
 AliTRDCalibViewerGUI.h:7
 AliTRDCalibViewerGUI.h:8
 AliTRDCalibViewerGUI.h:9
 AliTRDCalibViewerGUI.h:10
 AliTRDCalibViewerGUI.h:11
 AliTRDCalibViewerGUI.h:12
 AliTRDCalibViewerGUI.h:13
 AliTRDCalibViewerGUI.h:14
 AliTRDCalibViewerGUI.h:15
 AliTRDCalibViewerGUI.h:16
 AliTRDCalibViewerGUI.h:17
 AliTRDCalibViewerGUI.h:18
 AliTRDCalibViewerGUI.h:19
 AliTRDCalibViewerGUI.h:20
 AliTRDCalibViewerGUI.h:21
 AliTRDCalibViewerGUI.h:22
 AliTRDCalibViewerGUI.h:23
 AliTRDCalibViewerGUI.h:24
 AliTRDCalibViewerGUI.h:25
 AliTRDCalibViewerGUI.h:26
 AliTRDCalibViewerGUI.h:27
 AliTRDCalibViewerGUI.h:28
 AliTRDCalibViewerGUI.h:29
 AliTRDCalibViewerGUI.h:30
 AliTRDCalibViewerGUI.h:31
 AliTRDCalibViewerGUI.h:32
 AliTRDCalibViewerGUI.h:33
 AliTRDCalibViewerGUI.h:34
 AliTRDCalibViewerGUI.h:35
 AliTRDCalibViewerGUI.h:36
 AliTRDCalibViewerGUI.h:37
 AliTRDCalibViewerGUI.h:38
 AliTRDCalibViewerGUI.h:39
 AliTRDCalibViewerGUI.h:40
 AliTRDCalibViewerGUI.h:41
 AliTRDCalibViewerGUI.h:42
 AliTRDCalibViewerGUI.h:43
 AliTRDCalibViewerGUI.h:44
 AliTRDCalibViewerGUI.h:45
 AliTRDCalibViewerGUI.h:46
 AliTRDCalibViewerGUI.h:47
 AliTRDCalibViewerGUI.h:48
 AliTRDCalibViewerGUI.h:49
 AliTRDCalibViewerGUI.h:50
 AliTRDCalibViewerGUI.h:51
 AliTRDCalibViewerGUI.h:52
 AliTRDCalibViewerGUI.h:53
 AliTRDCalibViewerGUI.h:54
 AliTRDCalibViewerGUI.h:55
 AliTRDCalibViewerGUI.h:56
 AliTRDCalibViewerGUI.h:57
 AliTRDCalibViewerGUI.h:58
 AliTRDCalibViewerGUI.h:59
 AliTRDCalibViewerGUI.h:60
 AliTRDCalibViewerGUI.h:61
 AliTRDCalibViewerGUI.h:62
 AliTRDCalibViewerGUI.h:63
 AliTRDCalibViewerGUI.h:64
 AliTRDCalibViewerGUI.h:65
 AliTRDCalibViewerGUI.h:66
 AliTRDCalibViewerGUI.h:67
 AliTRDCalibViewerGUI.h:68
 AliTRDCalibViewerGUI.h:69
 AliTRDCalibViewerGUI.h:70
 AliTRDCalibViewerGUI.h:71
 AliTRDCalibViewerGUI.h:72
 AliTRDCalibViewerGUI.h:73
 AliTRDCalibViewerGUI.h:74
 AliTRDCalibViewerGUI.h:75
 AliTRDCalibViewerGUI.h:76
 AliTRDCalibViewerGUI.h:77
 AliTRDCalibViewerGUI.h:78
 AliTRDCalibViewerGUI.h:79
 AliTRDCalibViewerGUI.h:80
 AliTRDCalibViewerGUI.h:81
 AliTRDCalibViewerGUI.h:82
 AliTRDCalibViewerGUI.h:83
 AliTRDCalibViewerGUI.h:84
 AliTRDCalibViewerGUI.h:85
 AliTRDCalibViewerGUI.h:86
 AliTRDCalibViewerGUI.h:87
 AliTRDCalibViewerGUI.h:88
 AliTRDCalibViewerGUI.h:89
 AliTRDCalibViewerGUI.h:90
 AliTRDCalibViewerGUI.h:91
 AliTRDCalibViewerGUI.h:92
 AliTRDCalibViewerGUI.h:93
 AliTRDCalibViewerGUI.h:94
 AliTRDCalibViewerGUI.h:95
 AliTRDCalibViewerGUI.h:96
 AliTRDCalibViewerGUI.h:97
 AliTRDCalibViewerGUI.h:98
 AliTRDCalibViewerGUI.h:99
 AliTRDCalibViewerGUI.h:100
 AliTRDCalibViewerGUI.h:101
 AliTRDCalibViewerGUI.h:102
 AliTRDCalibViewerGUI.h:103
 AliTRDCalibViewerGUI.h:104
 AliTRDCalibViewerGUI.h:105
 AliTRDCalibViewerGUI.h:106
 AliTRDCalibViewerGUI.h:107