CXGuiLSPlayer.h 2.35 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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
    TGCheckButton *fDataType[2];
    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];

    CXLevelSchemePlayer *fLSPlayer = nullptr;

Jérémie Dudouet's avatar
Jérémie Dudouet committed
54 55 56 57 58 59 60 61
    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
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
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);

    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
89 90 91 92
    CXLevelSchemePlayer *GetPlayer() {return fLSPlayer;}

    void UpdateDataSet();

Jérémie Dudouet's avatar
Jérémie Dudouet committed
93 94 95 96 97 98 99 100
protected:

private:

    ClassDef(CXGuiLSPlayer,0);
};

#endif