FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FairEveCut.h
Go to the documentation of this file.
1 /********************************************************************************
2  * Copyright (C) 2020 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
3  * *
4  * This software is distributed under the terms of the *
5  * GNU Lesser General Public Licence (LGPL) version 3, *
6  * copied verbatim in the file "LICENSE" *
7  ********************************************************************************/
8 /*
9  * FairEveCut.h
10  *
11  * Created on: 5 maj 2020
12  * Author: Daniel Wielanek
13  * E-mail: daniel.wielanek@gmail.com
14  * Warsaw University of Technology, Faculty of Physics
15  */
16 #ifndef FAIREVECUT_H_
17 #define FAIREVECUT_H_
18 #include <Rtypes.h> // for THashConsistencyHolder, ClassDef
19 #include <RtypesCore.h> // for Bool_t, Int_t, Double_t, kTRUE
20 #include <TGButton.h> // for TGCheckButton
21 #include <TObject.h> // for TObject
22 #include <TString.h> // for TString
23 class TBuffer;
24 class TClass;
25 class TGCompositeFrame;
26 class TGNumberEntry; // lines 25-25
27 class TGedFrame; // lines 24-24
28 class TMemberInspector;
29 
33 class FairEveCut : public TObject
34 {
35  protected:
36  const Int_t fWidth;
37  const TString fName;
38  TGedFrame *fParent;
39  TGCompositeFrame *fTab;
40 
41  public:
49  FairEveCut(TGedFrame *frame = 0, TGCompositeFrame *tab = 0, TString name = "", Int_t width = 170);
50  virtual void Init() = 0;
51  void AddUpdateButton();
52  virtual ~FairEveCut();
53  ClassDef(FairEveCut, 0)
54 };
55 
60 {
61  TGCheckButton *fUseCut;
62  TGNumberEntry *fLow;
63  TGNumberEntry *fHigh;
64 
65  public:
66  FairEveMinMaxCut(TGedFrame *frame = 0, TGCompositeFrame *tab = 0, TString name = "", Int_t width = 170);
67  void Init();
68  Bool_t GetValues(Double_t &min, Double_t &max) const;
69  virtual ~FairEveMinMaxCut();
70  ClassDef(FairEveMinMaxCut, 0)
71 };
72 
76 class FairEveBoolCut : public FairEveCut
77 {
78  TGCheckButton *fHasCut;
79  Bool_t fStatus;
80  Bool_t fAutoUpdate;
81 
82  public:
83  FairEveBoolCut(TGedFrame *frame = 0, TGCompositeFrame *tab = 0, TString name = "", Int_t width = 170);
84  void Init();
85  void UpdateWhenChanged() { fAutoUpdate = kTRUE; };
86  void SetInitStatus(Bool_t stat) { fStatus = stat; };
87  Bool_t GetValue() const { return fHasCut->IsOn(); };
88  virtual ~FairEveBoolCut();
89  ClassDef(FairEveBoolCut, 0)
90 };
91 
95 class FairEveIntCut : public FairEveCut
96 {
97  TGCheckButton *fUseCut;
98  TGNumberEntry *fCut;
99 
100  public:
101  FairEveIntCut(TGedFrame *frame = 0, TGCompositeFrame *tab = 0, TString name = "", Int_t width = 170);
102  void Init();
103  Bool_t GetValue(Int_t &val) const;
104  virtual ~FairEveIntCut(){};
105  ClassDef(FairEveIntCut, 0)
106 };
107 
108 #endif /* FAIREDTABEDITOR_H_ */
const TString fName
Definition: FairEveCut.h:37
virtual ~FairEveMinMaxCut()
Definition: FairEveCut.cxx:90
virtual void Init()=0
TGCompositeFrame * fTab
Definition: FairEveCut.h:39
const Int_t fWidth
Definition: FairEveCut.h:36
FairEveCut(TGedFrame *frame=0, TGCompositeFrame *tab=0, TString name="", Int_t width=170)
Definition: FairEveCut.cxx:25
void SetInitStatus(Bool_t stat)
Definition: FairEveCut.h:86
FairEveMinMaxCut(TGedFrame *frame=0, TGCompositeFrame *tab=0, TString name="", Int_t width=170)
Definition: FairEveCut.cxx:43
Bool_t GetValue() const
Definition: FairEveCut.h:87
FairEveBoolCut(TGedFrame *frame=0, TGCompositeFrame *tab=0, TString name="", Int_t width=170)
Definition: FairEveCut.cxx:92
TGedFrame * fParent
Definition: FairEveCut.h:38
Bool_t GetValue(Int_t &val) const
Definition: FairEveCut.cxx:139
Bool_t GetValues(Double_t &min, Double_t &max) const
Definition: FairEveCut.cxx:83
void AddUpdateButton()
Definition: FairEveCut.cxx:32
virtual ~FairEveBoolCut()
Definition: FairEveCut.cxx:113
FairEveIntCut(TGedFrame *frame=0, TGCompositeFrame *tab=0, TString name="", Int_t width=170)
Definition: FairEveCut.cxx:115
virtual ~FairEveCut()
Definition: FairEveCut.cxx:41
void UpdateWhenChanged()
Definition: FairEveCut.h:85
virtual ~FairEveIntCut()
Definition: FairEveCut.h:104