LCOV - code coverage report
Current view: top level - STEER/CDB - AliBaseCalibViewerGUI.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 6 16.7 %
Date: 2016-06-14 17:26:59 Functions: 1 13 7.7 %

          Line data    Source code
       1             : #ifndef ALIBASECALIBVIEWERGUI_H
       2             : #define ALIBASECALIBVIEWERGUI_H
       3             : 
       4             : ///////////////////////////////////////////////////////////////////////////////
       5             : //                                                                           //
       6             : //  Base class for the AliTPCCalibViewerGUI and AliTRDCalibViewerGUI         //
       7             : //  used for the calibration monitor                                         //
       8             : //                                                                           //
       9             : ///////////////////////////////////////////////////////////////////////////////
      10             : 
      11             : #include <TGFrame.h>
      12             : #include <TGComboBox.h>
      13             : 
      14             : class TROOTt;
      15             : class TGWidget;
      16             : class TGFrame;
      17             : class TGButton;
      18             : class TGRadioButton;
      19             : class TGListBox;
      20             : class TGNumberEntry;
      21             : class TRootEmbeddedCanvas;
      22             : class TGSplitter;
      23             : class TGVSplitter;
      24             : class TGButtonGroup;
      25             : class TGTextButton;
      26             : class TGTextEntry;
      27             : class TGCheckButton;
      28             : class TGLabel;
      29             : class TGTab;
      30             : class TGCompositeFrame;
      31             : class TGWindow;
      32             : class TGGroupFrame;
      33             : class TString;
      34             : class AliBaseCalibViewer;
      35             : 
      36             : class AliBaseCalibViewerGUI : public TGCompositeFrame {
      37             : 
      38             :  public:
      39             :   AliBaseCalibViewerGUI(const TGWindow *p, UInt_t w, UInt_t h/*, char* fileName*/);  // constructor
      40             :   AliBaseCalibViewerGUI(const AliBaseCalibViewerGUI &c);                          // copy constructor
      41             :   AliBaseCalibViewerGUI &operator = (const AliBaseCalibViewerGUI &param);         // assignment operator
      42             : 
      43             :   virtual ~AliBaseCalibViewerGUI();
      44             : 
      45             :   void DrawGUI(const TGWindow *p, UInt_t w, UInt_t h);   // to be called by the costructor, here the windows is drawn
      46             : 
      47             :   void SetInitialValues();                                     // set the initial button states
      48             :   // initializes the GUI with default settings and opens tree for drawing
      49             :   virtual void Initialize(const char* fileName, const char* treeName = "tree") = 0; 
      50             :   // initializes the GUI with default settings and opens tree for drawing
      51             :   virtual void Initialize(AliBaseCalibViewer *viewer) = 0;
      52             :   // reload the viewer after it has been changed, e.g. added a new referenceTree, ...                  
      53             :   virtual void Reload() = 0;                          
      54             :   virtual void Reset() = 0;
      55             : 
      56             :   virtual TString* GetDrawString() = 0;                   // create the draw string out of selection
      57             :   virtual TString* GetCutString() = 0;                    // create the cut string out of selection
      58             :   virtual TString* GetSectorString() = 0;                 // create the sector string out of selection
      59             :   //virtual AliBaseCalibViewer* GetViewer() = 0;
      60           0 :   AliBaseCalibViewer* GetViewer() {return fViewer;}       // return the AliBaseCalibViewer pointer
      61             :   virtual Bool_t CreateDetailsTree(Int_t run, const Char_t* outFile, const Char_t* ocdbStorage="nothing") = 0;   // create a tree with pad level info for a given run
      62             : 
      63           0 :   TGTextEntry* GetDrawEntry() {return fComboCustom->GetTextEntry();}
      64           0 :   TGTextEntry* GetCutsEntry() {return fComboAddCuts->GetTextEntry();}
      65           0 :   TGTextEntry* GetDrawOptEntry() {return fComboAddDrawOpt->GetTextEntry();}
      66           0 :   TGTextEntry* GetFitEntry() {return fComboCustomFit->GetTextEntry();}
      67             : 
      68             :   void HandleButtonsGeneral(Int_t id = -1); // handles mutual radio button exclusions for general Tab
      69             :   void HandleButtons1D(Int_t id = -1);      // handles mutual radio button exclusions for 1D Tab
      70             :   void HandleButtonsStat(Int_t id = -1);    // handles statistic check boxes
      71             :   void HandleButtonsNoRedraw(Int_t id = -1);// handles label & scaling checkboxes without redrawing
      72             :   void ReplacePlaceHolders(TString &str);   // replace place holders of the draw variable and normalisation variable
      73             :   void DoNewSelection();                    // decides whether to redraw if user makes another selection
      74             :   virtual void DoDraw() = 0;                        // main method for drawing according to user selection
      75             :   void SavePicture();                       // method for saving
      76             :   void GetMinMax();                         // Read current Min & Max from the plot and set it to fTxtSetMin & fTxtSetMax
      77             :   void SetMinMaxLabel();                    // Set min, max and label without redrawing
      78             :   virtual void MouseMove(Int_t event, Int_t x, Int_t y, TObject *selected) = 0; 
      79             :   void UnchekAllStat();
      80             : 
      81             :  protected:   
      82             :   AliBaseCalibViewer   *fViewer;             // CalibViewer object used for drawing
      83             : 
      84             :   TGCompositeFrame    *fContTopBottom;      // container for all GUI elements, vertical divided
      85             :   TGCompositeFrame    *fContLCR;            // container for all GUI elements, horizontal divided
      86             :   TGCompositeFrame    *fContLeft;           // container for GUI elements on left side
      87             :   TGTab               *ftabLeft;            // Tabs on the left side for plot options
      88             :   TGCompositeFrame    *ftabLeft0;           // Tab 0 on the left side for general plot options
      89             :   TGCompositeFrame    *ftabLeft1;           // Tab 1 on the left side for 1D plot options
      90             :   TGTab               *ftabRight;           // Tabs on the right side
      91             :   TGCompositeFrame    *fTabRight0;          // Tab 0 on the right side for basic
      92             :   TGCompositeFrame    *fTabRight1;          // Tab 1 on the right side for advanced
      93             :   TGCompositeFrame    *fContRight;          // container for GUI elements on right side
      94             :   TGCompositeFrame    *fContCenter;         // container for GUI elements at the center
      95             :   TGCompositeFrame    *fContPlotOpt;        // container for plot options GUI elements
      96             :   TGCompositeFrame    *fContDrawOpt;        // container for draw options GUI elements
      97             :   TGCompositeFrame    *fContDrawOptSub1D2D; // container for 1D and 2D radio-button
      98             :   TGCompositeFrame    *fContNormalized;     // container for normalization options GUI elements
      99             :   TGCompositeFrame    *fContCustom;         // container for custom draw command GUI elements
     100             :   TGCompositeFrame    *fContCuts;           // container for cut options GUI elements  (drawn at TPC/TRD level)
     101             :   TGCompositeFrame    *fContAddCuts;        // container for additional cut command GUI elements
     102             :   TGCompositeFrame    *fContFit;            // container for fit GUI elements
     103             :   TGCompositeFrame    *fContAddFit;         // container for additional fit GUI elements
     104             :   TGCompositeFrame    *fContScaling;        // container for scaling GUI elements
     105             :   TGCompositeFrame    *fContSetMax;         // container for SetMaximum elements
     106             :   TGCompositeFrame    *fContSetMin;         // container for SetMinimum elements
     107             :   TGCompositeFrame    *fContAddDrawOpt;     // additional draw options container
     108             :   TGListBox           *fListVariables;      // listbox with possible variables
     109             :   TGTextButton        *fBtnDraw;            // draw button
     110             :   TGTextButton        *fBtnFit;             // fit button
     111             :   TGTextButton        *fBtnAddFitFunction;  // button to add fit function to normalization
     112             :   TGTextButton        *fBtnGetMinMax;       // GetMinMax-button
     113             :   TRootEmbeddedCanvas *fCanvMain;           // main drawing canvas
     114             :   TGRadioButton       *fRadioRaw;           // raw radio button
     115             :   TGRadioButton       *fRadioNormalized;    // normalized radio button
     116             :   TGRadioButton       *fRadioPredefined;    // predefined plot radio button
     117             :   TGRadioButton       *fRadioCustom;        // custom radio button
     118             :   TGRadioButton       *fRadio1D;            // 1D radio button
     119             :   TGRadioButton       *fRadio2D;            // 2D radio button
     120             :   TGComboBox          *fComboAddDrawOpt;    // additional draw options combo box
     121             :   TGCheckButton       *fChkAuto;            // automatic redraw checkbox
     122             :   TGCheckButton       *fChkAutoAppend;      // automatic appendign of "~" checkbox
     123             :   TGComboBox          *fComboMethod;        // normalization methods dropdown box
     124             :   TGListBox           *fListNormalization;  // listbox with possible normalization variables
     125             :   TGComboBox          *fComboCustom;        // combo box for custom draw commands
     126             :   TGLabel             *fLblCustomDraw;      // custom draw labal
     127             :   TGCheckButton       *fChkAddDrawOpt;      // additional draw options check box
     128             :   TGLabel             *fLblAddCuts;         // additional cuts label
     129             :   TGComboBox          *fComboAddCuts;       // additional cuts combo box
     130             :   TGComboBox          *fComboCustomFit;     // custom fit combo box
     131             :   TGCheckButton       *fChkSetMax;          // Set maximum check box
     132             :   TGCheckButton       *fChkSetMin;          // Set maximum check box
     133             :   TGCheckButton       *fChkGetMinMaxAuto;   // Get Min & Max automatically from plot
     134             :   TGTextEntry         *fTxtSetMax;          // custom maximum text box
     135             :   TGTextEntry         *fTxtSetMin;          // custom minimum text box
     136             :   TGGroupFrame        *fContDrawOpt1D;      // container in tabLeft1 
     137             :   TGCompositeFrame    *fcontDrawOpt1DSubLR; // container in tabLeft1 to divide L/R
     138             :   TGCompositeFrame    *fContDrawOpt1DSubNSC; // container in tabLeft1 for following radio buttons 
     139             :   TGRadioButton       *fRadioNorm;          // radio button for normal 1D drawing
     140             :   TGRadioButton       *fRadioSigma;         // radio button for sigma 1D drawing
     141             :   TGTextEntry         *fTxtSigmas;          // text box to specify sigmas
     142             :   TGCompositeFrame    *fContCumuLR;         // container in tabLeft1 for two colums for cumulative and integrative
     143             :   TGCompositeFrame    *fContCumLeft;        // container in tabLeft1 for cumulative, left
     144             :   TGCompositeFrame    *fContCumRight;       // container in tabLeft1 for cumulative, right
     145             :   TGLabel             *fLblSigmaMax;        // label to indicate sigmaMax
     146             :   TGTextEntry         *fTxtSigmaMax;        // text box to specify sigmaMax
     147             :   TGRadioButton       *fRadioCumulative;    // radio button for cumulative 1D drawing
     148             :   TGCheckButton       *fCheckCumulativePM;  // checkbox for plus/minus cumulative 1D drawing
     149             :   TGRadioButton       *fRadioIntegrate;     // radio button for integral 1D drawing
     150             :   TGCompositeFrame    *fContDrawOpt1DSubMML; // container in tabLeft1 for following check boxes
     151             :   TGCheckButton       *fChkMean;            // checkbox to plot mean
     152             :   TGCheckButton       *fChkMedian;          // checkbox to plot median
     153             :   TGCheckButton       *fChkLTM;             // checkbox to plot LTM
     154             :   TGGroupFrame        *fContStatOpt;        // container for statistic options in tabLeft1 
     155             :   TGCheckButton       *fChkStatName;        // checkbox to display histogram name in statistic legend
     156             :   TGCheckButton       *fChkStatEntries;     // checkbox to display entries in statistic legend
     157             :   TGCompositeFrame    *fContStatMean;       // container for mean and its error in stat opt
     158             :   TGCheckButton       *fChkStatMean;        // checkbox to display mean in statistic legend
     159             :   TGCheckButton       *fChkStatMeanPM;      // checkbox to display mean error in statistic legend
     160             :   TGCompositeFrame    *fContStatRMS;        // container for RMS and its error in stat opt
     161             :   TGCheckButton       *fChkStatRMS;         // checkbox to display RMS in statistic legend
     162             :   TGCheckButton       *fChkStatRMSPM;       // checkbox to display RMS error in statistic legend
     163             :   TGCheckButton       *fChkStatUnderflow;   // checkbox to display underflow error in statistic legend
     164             :   TGCheckButton       *fChkStatOverflow;    // checkbox to display overflow error in statistic legend
     165             :   TGCheckButton       *fChkStatIntegral;    // checkbox to display integral in statistic legend
     166             :   TGCompositeFrame    *fContStatSkew;       // container for skewness and its error in stat opt
     167             :   TGCheckButton       *fChkStatSkewness;    // checkbox to display skewness in statistic legend
     168             :   TGCheckButton       *fChkStatSkewnessPM;  // checkbox to display skewness error in statistic legend
     169             :   TGCompositeFrame    *fContStatKurt;       // container for kurtosis and its error in stat opt
     170             :   TGCheckButton       *fChkStatKurtosis;    // checkbox to display kurtosis in statistic legend
     171             :   TGCheckButton       *fChkStatKurtosisPM;  // checkbox to display kurtosis error in statistic legend
     172             :   TGButton            *fBtnUnchekAll;       // Button to uncheck all statistic entries
     173             :   TGGroupFrame        *fContLabeling;       // groupframe container for labeling
     174             :   TGCheckButton       *fChkLabelTitle;      // checkbox to display specified title
     175             :   TGTextEntry         *fTxtLabelTitle;      // text box to specify title
     176             :   TGCheckButton       *fChkLabelXaxis;      // checkbox to display specified xaxis label
     177             :   TGTextEntry         *fTxtLabelXaxis;      // text box to specify xaxis label
     178             :   TGCheckButton       *fChkLabelYaxis;      // checkbox to display specified yaxis label
     179             :   TGTextEntry         *fTxtLabelYaxis;      // text box to specify yaxis label
     180             :   TGCheckButton       *fChkLabelGetAuto;    // checkbox to get labels atuomatically from plot
     181             :   TGGroupFrame        *fContSave;           // container for save-button
     182             :   TGButton            *fBtnSave;            // Save button
     183             :   TGCompositeFrame    *fContAddSaveOpt;     // container for additional save options
     184             :   TGCheckButton       *fChkAddSaveOpt;      // checkbox for additional save options
     185             :   TGComboBox          *fComboAddSaveOpt;    // combobox for additional save options
     186             :   TGGroupFrame        *fContExport;         // container for cint-export
     187             :   TGCompositeFrame    *fContAddExport;      // container for dropdown list to enter export name
     188             :   TGComboBox          *fComboExportName;    // dropdownbox to enter a name for the exported CalPad
     189             :   TGTextButton        *fBtnExport;          // button to export a CalPad
     190             :   TGTextButton        *fBtnAddNorm;         // button to add a CalPad to the normalization
     191             :   TGCompositeFrame    *fContTree;           // container for tree functions
     192             :   TGTextButton        *fBtnDumpToFile;      // button to dump a new CalibTree to file
     193             :   TGTextButton        *fBtnLoadTree;        // button to load a new tree
     194             :   TGCheckButton       *fChkAddAsReference;  // checkbox to add a new tree as referenceTree
     195             :   TGTextEntry         *fTxtRefName;         // text box to specify the referenceTree's name
     196             :   
     197             :  protected:
     198             :   Bool_t fInitialized;                      // has the GUI already been initialized?
     199             :   
     200         128 :   ClassDef(AliBaseCalibViewerGUI, 0)
     201             : };
     202             :     
     203             : #endif

Generated by: LCOV version 1.11