KaliVeda
Toolkit for HIC analysis
KVTestIDGridDialog.h
1 #ifndef __KVTestIDGridDialog_H
2 #define __KVTestIDGridDialog_H
3 
4 #include "TGFrame.h"
5 #include "TGMenu.h"
6 #include "TGListBox.h"
7 #include "TGButtonGroup.h"
8 #include "TGButton.h"
9 #include "KVIDGraph.h"
10 #include "RQ_OBJECT.h"
11 #include <TGComboBox.h>
12 #include <TGLabel.h>
13 #include <TGNumberEntry.h>
14 #include <TGTextEntry.h>
15 #include <TGProgressBar.h>
16 #include "KVCanvas.h"
17 
25 
26  RQ_OBJECT("KVTestIDGridDialog")
27 
28  TGTransientFrame* fMain;
29 
30  TGHorizontalFrame* fHdataFrame;
31  TGLabel* fHdataNameLabel;
32  TGTextEntry* fHdataNameEntry;
33 
34  TGGroupFrame* fHzrealFrame;
35  TGHorizontalFrame* fHzrealNameFrame;
36  TGLabel* fHzrealNameLabel;
37  TGTextEntry* fHzrealNameEntry;
38  TGHorizontalFrame* fHzrealBinsFrame;
39  TGLabel* fHzrealBinsLabel;
40  TGLabel* fHzrealXminLabel;
41  TGLabel* fHzrealXmaxLabel;
42  TGNumberEntry* fHzrealBinsEntry;
43  TGNumberEntry* fHzrealXminEntry;
44  TGNumberEntry* fHzrealXmaxEntry;
45 
46  TGGroupFrame* fHzvseFrame;
47  TGHorizontalFrame* fHzvseNameFrame;
48  TGLabel* fHzvseNameLabel;
49  TGTextEntry* fHzvseNameEntry;
50  TGHorizontalFrame* fHzvseXBinsFrame;
51  TGLabel* fHzvseXBinsLabel;
52  TGLabel* fHzvseXminLabel;
53  TGLabel* fHzvseXmaxLabel;
54  TGNumberEntry* fHzvseXBinsEntry;
55  TGNumberEntry* fHzvseXminEntry;
56  TGNumberEntry* fHzvseXmaxEntry;
57  TGHorizontalFrame* fHzvsdeXBinsFrame;
58  TGLabel* fHzvsdeXBinsLabel;
59  TGLabel* fHzvsdeXminLabel;
60  TGLabel* fHzvsdeXmaxLabel;
61  TGNumberEntry* fHzvsdeXBinsEntry;
62  TGNumberEntry* fHzvsdeXminEntry;
63  TGNumberEntry* fHzvsdeXmaxEntry;
64  TGHorizontalFrame* fHzvseYBinsFrame;
65  TGLabel* fHzvseYBinsLabel;
66  TGLabel* fHzvseYminLabel;
67  TGLabel* fHzvseYmaxLabel;
68  TGNumberEntry* fHzvseYBinsEntry;
69  TGNumberEntry* fHzvseYminEntry;
70  TGNumberEntry* fHzvseYmaxEntry;
71 
72  TGHProgressBar* fProgressBar;
73 
74  TGHorizontalFrame* fButtonsFrame;
75  TGTextButton* fTestButton;
76  TGTextButton* fCloseButton;
77 
78  KVIDGraph* fSelectedGrid;
79 
80  static TString fNameData;
81  static TString fNameZreal;
82  static TString fNameZvsE;
83  static Int_t hzrealbins;
84  static Int_t hzrealxmin;
85  static Int_t hzrealxmax;
86  static Int_t hzvsexbins;
87  static Double_t hzvsexmin;
88  static Double_t hzvsexmax;
89  static Int_t hzvseybins;
90  static Int_t hzvseymin;
91  static Int_t hzvseymax;
92  static Int_t hzvsdexbins;
93  static Double_t hzvsdexmin;
94  static Double_t hzvsdexmax;
95 
96  std::unique_ptr<TCanvas> resultsCanvas;
97  std::unique_ptr<KVCanvas> resultsKVCanvas;
98  KVHashList histos;
99  void add_histo(TH1* h)
100  {
101  h->SetDirectory(nullptr);
102  histos.Add(h);
103  }
104 
105 public:
106  KVTestIDGridDialog(const TGWindow* p = 0, const TGWindow* main =
107  0, UInt_t w = 1, UInt_t h = 1, KVIDGraph* g = 0, TH2* data_histo = 0);
109 
110  void DoClose();
111  void CloseWindow();
112  void TestGrid();
113  void DrawChart(TVirtualPad* cc, Int_t zmin, Int_t zmax, Int_t nmin, Int_t nmax);
114 
116  {
117  return (name != "");
118  };
119 
120  ClassDef(KVTestIDGridDialog, 0) //dialog box for testing an ID grid
121 };
122 #endif
int Int_t
unsigned int UInt_t
#define RQ_OBJECT(sender_class)
bool Bool_t
double Double_t
#define ClassDef(name, id)
winID w
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t g
char name[80]
Extended version of ROOT THashList.
Definition: KVHashList.h:29
Base class for particle identification in a 2D map.
Definition: KVIDGraph.h:31
void Add(TObject *obj) override
GUI for testing identification grids.
KVTestIDGridDialog(const TGWindow *p=0, const TGWindow *main=0, UInt_t w=1, UInt_t h=1, KVIDGraph *g=0, TH2 *data_histo=0)
void DrawChart(TVirtualPad *cc, Int_t zmin, Int_t zmax, Int_t nmin, Int_t nmax)
Bool_t CheckNameOK(const TString &name)
virtual ~ KVTestIDGridDialog()
virtual void SetDirectory(TDirectory *dir)
int main(int argc, char **argv)
TH1 * h