ROOT logo
/*!\class TPeakFitGUI
\author Alexandre A. P. Suaide 
*/
#ifndef TPeakFitGUI_HH

#define TPeakFitGUI_HH

#include "TPeakFit.h"
#include "TGClient.h"

#include "TApplication.h"

#include "TGLabel.h"

#include "TGMsgBox.h"

#include "TString.h"

#include "TGTextBuffer.h"

#include "TGTextEntry.h"

#include "TGButton.h"

#include "TContainer.h"
#include "TCanvas.h"

#include "TLine.h"

#include "TMarker.h"

#include "TROOT.h"

#include "TList.h"

#include "TDialog.h"
#include "TF1.h"

#include "TH1.h"

#include "TG3DLine.h"

#include "TGTextEntry.h"

#include "math.h"

#include <iostream>

using namespace std;

#define MAXPOINTS 1000


class TPeakFitGUI : public TGTransientFrame
{
  private:    
    TGGroupFrame*    mFrame1;            
    TGGroupFrame*    mFrame2;
    TGRadioButton*   mP1;            
    TGRadioButton*   mP2;            
    TGRadioButton*   mP3;            
    TGRadioButton*   mB1;            
    TGRadioButton*   mB2;            
    TGRadioButton*   mB3;  
    TGRadioButton*   mB4;  
    TGCheckButton*   mPC1;
    TGCheckButton*   mPC2;
    TGCheckButton*   mBC1;
    TGTextButton*    mPGrab;
    TGTextButton*    mPReset;
    TGTextButton*    mBGrab;
    TGTextButton*    mBReset;
    TGTextButton*    mDet;
    TGTextButton*    mFit;
    TGTextButton*    mImp;
    TGTextButton*    mReset;
    TGTextButton*    mClose;
    TGTextButton*    mDraw;
    TGTextButton*    mClear;
    TGTextButton*    mPrint;
    TGTextEntry*     mBP;
    
    TContainer*      mTrash1;
    TContainer*      mTrash2;
    int              mGrabType;
    int              mGrabMode;
    
    int              mNP;
    float            mPX[MAXPOINTS];
    float            mPY[MAXPOINTS];
    float            mSI[MAXPOINTS];
    
    int              mNB;
    float            mBX[MAXPOINTS];
    float            mBY[MAXPOINTS];
    float            mBpX[MAXPOINTS];
    float            mBpY[MAXPOINTS];
    
    float            mXL;
    float            mYL;
    float            mpXL;
    float            mpYL;
    int              mFlag;
    TVirtualPad*     mGrabPad;
        
    TString          mCommand;
    
    TPeakFit*        mPeakFit;
    
    bool             mFitDone;
        
    void             reset(int = 0);
    void             grabMode(int);
    void             fit(int = 0);
    void             details();
  public:
                     TPeakFitGUI(TH1*, TVirtualPad*);
    virtual         ~TPeakFitGUI();
    void             CloseWindow();
    bool             ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);    
    void             grab();
    void             clear();
    void             draw();
    void             print();    
    TPeakFit*        getPeakFit() { return mPeakFit;}
   
  ClassDef(TPeakFitGUI,1)
};

#endif

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