CXGuiLSPlayer.h 2.44 KB
Newer Older
Jérémie Dudouet's avatar
Jérémie Dudouet committed
1 2 3 4 5 6 7 8
#ifndef CXGuiLSPlayer_H
#define CXGuiLSPlayer_H

#include "RQ_OBJECT.h"
#include "TGFrame.h"
#include "TGTextEntry.h"
#include "TGNumberEntry.h"

Jérémie Dudouet's avatar
Jérémie Dudouet committed
9 10
#include "LevelScheme.h"

Jérémie Dudouet's avatar
Jérémie Dudouet committed
11 12 13 14 15 16 17
using namespace std;

class TGCheckButton;
class CXLevelSchemePlayer;
class CXMainWindow;
class TGComboBox;

Jérémie Dudouet's avatar
Jérémie Dudouet committed
18 19
using namespace Gw;

Jérémie Dudouet's avatar
Jérémie Dudouet committed
20 21 22 23 24 25 26 27 28 29 30 31
class CXGuiLSPlayer : public  TGVerticalFrame
{
    RQ_OBJECT("CXGuiLSPlayer");

public:

private:

    CXMainWindow *fMainWindow = nullptr;

    TGTextEntry *fListOfNucleus = nullptr;

Jérémie Dudouet's avatar
Jérémie Dudouet committed
32 33
    TGComboBox *fDataSetMode = nullptr;

Jérémie Dudouet's avatar
Jérémie Dudouet committed
34
//    TGCheckButton *fDataType[2];
Jérémie Dudouet's avatar
Jérémie Dudouet committed
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
    Int_t fDataTypeMode; //0 No data ; 1 ENSDF ; 2 Exp ; 3 ALL
    Bool_t fYrastMode;

    TGCheckButton *fYrastButton;

    TGNumberEntry *fTextSize;
    TGCheckButton *fFullGammaTitle;
    TGNumberEntry *fBranchingRatio[2];
    TGCheckButton *fUseBranchingRatio;
    TGNumberEntry *fELevel[2];
    TGCheckButton *fUseELevels;
    TGNumberEntry *fSpins[2];
    TGCheckButton *fUseSpins;
    TGNumberEntry *fLifeTime[2];
    TGCheckButton *fUseLifeTime;
    TGComboBox    *fLifeTimeScale[2];

52 53
    TGCheckButton *fArrowMode;

Jérémie Dudouet's avatar
Jérémie Dudouet committed
54 55
    CXLevelSchemePlayer *fLSPlayer = nullptr;

Jérémie Dudouet's avatar
Jérémie Dudouet committed
56 57 58 59 60 61 62 63
    Bool_t fNucleiAreKnown = false;
    Int_t fNumberOfNuclei = 0;

    LevelScheme *fSelectedLevelScheme = nullptr;
    TString fCurrentDataSet = "ADOPTED LEVELS, GAMMAS";
    Int_t fSelectedEntry=0;
    Bool_t fNoUpdateDataSet = false;

Jérémie Dudouet's avatar
Jérémie Dudouet committed
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
public:
    CXGuiLSPlayer(const TGCompositeFrame *MotherFrame, UInt_t w, UInt_t h);
    ~CXGuiLSPlayer();

    void SetMainWindow(CXMainWindow *w);

    void ManuallyAddNucleus();
    void CheckListOfNuclei();
    void UpdateGammaRays();

    void GetBranchingRatio(Int_t &min, Int_t &max);
    void GetELevels(Float_t &min, Float_t &max);
    void GetSpins(Int_t &min, Int_t &max);
    void GetLifeTime(Float_t &min, Float_t &max);

79 80
    Bool_t GetColorMode(){return fArrowMode->GetState();}

Jérémie Dudouet's avatar
Jérémie Dudouet committed
81 82 83 84 85 86 87 88 89 90 91 92
    Int_t GetDataType(){return fDataTypeMode;}
    Bool_t GetYrastMode(){return fYrastMode;}

    Float_t GetTextSize(){return fTextSize->GetNumber();}
    Bool_t IsFullTitleMode(){return fFullGammaTitle->GetState();}
    Bool_t UseBranchingRatio(){return fUseBranchingRatio->GetState();}
    Bool_t UseELevels(){return fUseELevels->GetState();}
    Bool_t UseLifeTime(){return fUseLifeTime->GetState();}
    Bool_t UseSpins(){return fUseSpins->GetState();}

    void PlotLS();

Jérémie Dudouet's avatar
Jérémie Dudouet committed
93 94 95 96
    CXLevelSchemePlayer *GetPlayer() {return fLSPlayer;}

    void UpdateDataSet();

Jérémie Dudouet's avatar
Jérémie Dudouet committed
97 98 99 100 101 102 103 104
protected:

private:

    ClassDef(CXGuiLSPlayer,0);
};

#endif