CXHist2DPlayer.h 1.24 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;
Jérémie Dudouet's avatar
Jérémie Dudouet committed
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30

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

private:

    CXMainWindow *fMainWindow = nullptr;

    Bool_t fTotProjX = true;

    CXTH1Proj *fCurrentProj = nullptr;

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

34 35
    TList *fListOfSavedGates = nullptr;

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

    void SetMainWindow(CXMainWindow *w);

    void InitGG(TH2 *hist_in =nullptr);
    void Project();
    void AddBackgd();
    void AddGate();
    void ClearGates();
47
    void ApplyLastGate();
Jérémie Dudouet's avatar
Jérémie Dudouet committed
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63

    void AddToStoredList(TObject *o);
    void UpdateStoredList();
    void ClearStoredList();
    void RemoveSelectedEntry();
    void SaveStoredList();
    void ProcessedButtonEvent(Event_t *event);
    void DoubleClicked(Int_t id);

private:
    CXTH1Proj *GetProj();

    ClassDef(CXHist2DPlayer,0);
};

#endif