ROOT logo
#ifndef HMDCEFFMENU_H
#define HMDCEFFMENU_H

#include "TObject.h"
#include "hmdcefficiency.h"

#include "TDialogCanvas.h"
#include "TButton.h"
#include "TPaveLabel.h"
#include "TText.h"

class TGTransientFrame;
class TList;
class TGLabel;
class TGTextEntry;
class TGTextButton;

class HMdcEffMenu : public TObject {
  protected:
    TGTransientFrame* fDialog;
    TList*            fWidgets;
    Int_t width;                 // dialog frame size 
    Int_t height;                // dialog frame size
    Int_t sHeight;               // start pozition for buttons
    Int_t dHeight;               // step size for buttons
    Int_t sWidth;                // start pozition for buttons
    Int_t dWidth;                // step size for buttons
    Bool_t stopLoop;
  
    static HMdcEffMenu* fEffMenu;
    HMdcEfficiency* mdcEff;
    HMdcEfficiencySec* feffSec;
    HMdcEfficiencyMod* feffMod;
    HMdcEfficiencyLayer* feffLay;
    TGTextButton *bSecMod[6][4];
    TGTextButton *bLayer[6];
    TGTextButton *bGroupMdcLay[2];
    TGTextButton *button[30];
    TGTextButton *bPlot[3];
    TGTextButton *bTypePlot[3];
    TGTextButton *bDrClSel;
    TGTextButton *bHist[6];
    TGTextButton *bHistMb;
    TGTextButton *bXYlayer;
    TGTextButton *bTimes;
    TGTextButton *bSummary;
    Int_t         indSec[6];
    Int_t         indMod[6][4];
    Int_t         indLay[6];          //for all selected modules
    Int_t         numLay;
    Int_t         indPlot[3];
    Int_t         typePlot;
    Int_t         indHist[6];
    Int_t         indHistMb;
    Int_t         numHists;
    Int_t         indXYlayers;
    Int_t         indTimes;
    Int_t         indSummary;
    Int_t         indGroup[2];
    Int_t         sumBnXY;
    Int_t         sumBnTimes;
    TGTextEntry  *pvLSumXY;
    TGTextEntry  *pvLSumTimes;
    Char_t        name[100];
    Char_t        doThis[100];
    TText*        text;
    Int_t         totModsSel;
    Int_t         nTotEv;
    Bool_t        calcEffFlag;
    Bool_t        eventLoopFlag;
    Int_t         nEvLoopAdd;
    Bool_t        endOfData;
    TGLabel      *lbEvTot;
    TGLabel      *lbEvLoop;
    
    HMdcEffMenu(HMdcEfficiency *feff);
    ~HMdcEffMenu();
    void menu();
    TGTextEntry* drawTextLine(Int_t x, Int_t y,const Char_t* name,Int_t textColor);
    TGLabel* drawLabel(Int_t x, Int_t y,const Char_t* name,Int_t textColor);
    TGTextButton* drawButton(Int_t x, Int_t y,const Char_t* name,const Char_t* doThis,Int_t textColor);
    TGTextButton* drawButtonXp(Int_t px, Int_t ,const Char_t* name,const Char_t* doThis,Int_t textColor);
    void setInitPoint(Int_t sw,Int_t dw,Int_t sh,Int_t dh);
    void drawNEvents(Int_t nEv);
    
  public:
    static HMdcEffMenu* makeMenu(HMdcEfficiency *feff);
    static void deleteMenu(void);
    void closeDial(void);
    void setSecMod(Int_t s, Int_t m);
    void setLayer(Int_t l);
    void setListPads();
    void setListLayer();
    void drawPlot(Int_t n);
    void setPlotType(Int_t n);
    void drawHist(Int_t n);
    void drawXYlayer();
    void drawTimes();
    void drawSummary();
    void drawHistMb();
    void setGroup(Int_t n);
    void rebinTimes(Int_t n);
    void rebinXY(Int_t n);
    void printClusters();
    void doDraw(Int_t ind=1);
    void doPlots(Int_t ind=1);
    void doEventPlots(Int_t ind=1);
    void loopEvents(Int_t nEv);
    void calcEff(void);
    void saveHist(void) {mdcEff->saveHist();}
    void clustSel();
    void stpLoop()      {stopLoop = kTRUE;}
    ClassDef(HMdcEffMenu,0) //Digitizes MDC data.
};
    
#endif
 hmdceffmenu.h:1
 hmdceffmenu.h:2
 hmdceffmenu.h:3
 hmdceffmenu.h:4
 hmdceffmenu.h:5
 hmdceffmenu.h:6
 hmdceffmenu.h:7
 hmdceffmenu.h:8
 hmdceffmenu.h:9
 hmdceffmenu.h:10
 hmdceffmenu.h:11
 hmdceffmenu.h:12
 hmdceffmenu.h:13
 hmdceffmenu.h:14
 hmdceffmenu.h:15
 hmdceffmenu.h:16
 hmdceffmenu.h:17
 hmdceffmenu.h:18
 hmdceffmenu.h:19
 hmdceffmenu.h:20
 hmdceffmenu.h:21
 hmdceffmenu.h:22
 hmdceffmenu.h:23
 hmdceffmenu.h:24
 hmdceffmenu.h:25
 hmdceffmenu.h:26
 hmdceffmenu.h:27
 hmdceffmenu.h:28
 hmdceffmenu.h:29
 hmdceffmenu.h:30
 hmdceffmenu.h:31
 hmdceffmenu.h:32
 hmdceffmenu.h:33
 hmdceffmenu.h:34
 hmdceffmenu.h:35
 hmdceffmenu.h:36
 hmdceffmenu.h:37
 hmdceffmenu.h:38
 hmdceffmenu.h:39
 hmdceffmenu.h:40
 hmdceffmenu.h:41
 hmdceffmenu.h:42
 hmdceffmenu.h:43
 hmdceffmenu.h:44
 hmdceffmenu.h:45
 hmdceffmenu.h:46
 hmdceffmenu.h:47
 hmdceffmenu.h:48
 hmdceffmenu.h:49
 hmdceffmenu.h:50
 hmdceffmenu.h:51
 hmdceffmenu.h:52
 hmdceffmenu.h:53
 hmdceffmenu.h:54
 hmdceffmenu.h:55
 hmdceffmenu.h:56
 hmdceffmenu.h:57
 hmdceffmenu.h:58
 hmdceffmenu.h:59
 hmdceffmenu.h:60
 hmdceffmenu.h:61
 hmdceffmenu.h:62
 hmdceffmenu.h:63
 hmdceffmenu.h:64
 hmdceffmenu.h:65
 hmdceffmenu.h:66
 hmdceffmenu.h:67
 hmdceffmenu.h:68
 hmdceffmenu.h:69
 hmdceffmenu.h:70
 hmdceffmenu.h:71
 hmdceffmenu.h:72
 hmdceffmenu.h:73
 hmdceffmenu.h:74
 hmdceffmenu.h:75
 hmdceffmenu.h:76
 hmdceffmenu.h:77
 hmdceffmenu.h:78
 hmdceffmenu.h:79
 hmdceffmenu.h:80
 hmdceffmenu.h:81
 hmdceffmenu.h:82
 hmdceffmenu.h:83
 hmdceffmenu.h:84
 hmdceffmenu.h:85
 hmdceffmenu.h:86
 hmdceffmenu.h:87
 hmdceffmenu.h:88
 hmdceffmenu.h:89
 hmdceffmenu.h:90
 hmdceffmenu.h:91
 hmdceffmenu.h:92
 hmdceffmenu.h:93
 hmdceffmenu.h:94
 hmdceffmenu.h:95
 hmdceffmenu.h:96
 hmdceffmenu.h:97
 hmdceffmenu.h:98
 hmdceffmenu.h:99
 hmdceffmenu.h:100
 hmdceffmenu.h:101
 hmdceffmenu.h:102
 hmdceffmenu.h:103
 hmdceffmenu.h:104
 hmdceffmenu.h:105
 hmdceffmenu.h:106
 hmdceffmenu.h:107
 hmdceffmenu.h:108
 hmdceffmenu.h:109
 hmdceffmenu.h:110
 hmdceffmenu.h:111
 hmdceffmenu.h:112
 hmdceffmenu.h:113
 hmdceffmenu.h:114
 hmdceffmenu.h:115
 hmdceffmenu.h:116