CXHist2DPlayer.h 1.12 KB
Newer Older
Jérémie Dudouet's avatar
Jérémie Dudouet committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#ifndef CXHist2DPlayer_H
#define CXHist2DPlayer_H

#include "RQ_OBJECT.h"
#include "TGFrame.h"

using namespace std;

class CXMainWindow;
class TH2;
class CXTH1Proj;
class TGListBox;
class TGLBEntry;
class TGCheckButton;
15
class TGTextEntry;
16
class TGComboBox;
Jérémie Dudouet's avatar
Jérémie Dudouet committed
17 18 19 20 21 22 23 24 25

class CXHist2DPlayer : public  TGVerticalFrame
{
    RQ_OBJECT("CXHist2DPlayer");

private:

    CXMainWindow *fMainWindow = nullptr;

26
    Int_t fAxisProj = 0; // X => 0 ; Y => 1
Jérémie Dudouet's avatar
Jérémie Dudouet committed
27 28 29 30 31

    CXTH1Proj *fCurrentProj = nullptr;

    TGListBox *fStoredSpectraBox = nullptr;
    TList *fListOfStoredSpectra = nullptr;
32
    TGTextEntry *fDrawOpt = nullptr;
Jérémie Dudouet's avatar
Jérémie Dudouet committed
33 34
    TGCheckButton *fFixRange = nullptr;

35 36
    TGComboBox *fProjectionAxis = nullptr;

Jérémie Dudouet's avatar
Jérémie Dudouet committed
37
public:
Jérémie Dudouet's avatar
Jérémie Dudouet committed
38
    CXHist2DPlayer(const TGCompositeFrame *MotherFrame, UInt_t w, UInt_t h, CXMainWindow *window);
Jérémie Dudouet's avatar
Jérémie Dudouet committed
39 40 41 42 43
    ~CXHist2DPlayer();

    void SetMainWindow(CXMainWindow *w);

    void InitGG(TH2 *hist_in =nullptr);
44 45
    void UpdateProjection();

Jérémie Dudouet's avatar
Jérémie Dudouet committed
46 47 48 49
    void Project();
    void AddBackgd();
    void AddGate();
    void ClearGates();
50
    void ApplyLastGate();
Jérémie Dudouet's avatar
Jérémie Dudouet committed
51

Jérémie Dudouet's avatar
Jérémie Dudouet committed
52
    void UpdateDrawOpt();
Jérémie Dudouet's avatar
Jérémie Dudouet committed
53 54 55 56 57 58 59 60

private:
    CXTH1Proj *GetProj();

    ClassDef(CXHist2DPlayer,0);
};

#endif