HARPO  5.1.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HarpoNoiseMonitorGui.h
Go to the documentation of this file.
1 #ifndef HARPOMONITORGUI_H
2 #define HARPOMONITORGUI_H
3 
4 
5 
6 #include <TGClient.h>
7 
8 
9 #include <TPad.h>
10 #include <TH1.h>
11 #include <TH2.h>
12 #include <TLine.h>
13 #include <TCanvas.h>
14 #include <TRootEmbeddedCanvas.h>
15 #include <TGFrame.h>
16 #include <TGComboBox.h>
17 #include <TGButton.h>
18 #include <TGLabel.h>
19 #include <TGButtonGroup.h>
20 //#include <TGButton.h>
21 #include <TGNumberEntry.h>
22 #include <TGListBox.h>
23 #include <TObjArray.h>
24 #include <TLegend.h>
25 #include <TClonesArray.h>
26 #include <TSystemDirectory.h>
27 #include <TSystem.h>
28 #include <TStyle.h>
29 #include <TChain.h>
30 #include <TProfile.h>
31 #include <TGraph.h>
32 
33 #include <math.h>
34 
35 #include "HarpoReader.h"
37 
38 #include "TThread.h"
39 #include "TMapFile.h"
40 
41 
42 class HarpoNoiseMonitorGui : public TGMainFrame {
43 
44  private:
45 
47  Bool_t fAutoScale;
48 
49  TRootEmbeddedCanvas* ecTabEvent;
50  TRootEmbeddedCanvas* ecTabCumul;
51  TCanvas* cTabEvent;
52  TCanvas* cTabCumul;
53  TRootEmbeddedCanvas* ecSideSummary;
54  TCanvas* cSideSummary;
55  TGMainFrame* fFrameMain;
56 
57  TGTextButton* fAutoRefreshButton;
58  TGComboBox* fChooseRun;
59  TGNumberEntry* fChooseDelay;
60  TGNumberEntry* fChooseEvent;
61  TGNumberEntry* fChooseNEvents;
62  TGTextButton* fDisplayEvent;
63  TGTextButton* fNextEvent;
64  TGTextButton* fPrevEvent;
65 
66  TGTextButton* fTriggerText;
68  TGCheckButton* fCheckShowTrigger;
69 
70  TGNumberEntry* fChooseNmax;
71 
72  Int_t fRunNumber;
73 
74  TGTextButton* fDisplay;
75  TGTextButton* fDisplayBox;
76  TGTextButton* fSave;
77 
78  public:
79  HarpoNoiseMonitorGui(const TGWindow *p, UInt_t w, UInt_t h, UInt_t opt, int argc, char **argv);
81 
82  virtual void CloseWindow();
83 
84  void BuildButtonsFrame(TGVerticalFrame* f);
85  void BuildDisplayFrame(TGVerticalFrame* f);
86  void BuildInfoFrame(TGHorizontalFrame* f);
87 
88  void SetListOfRuns(TGComboBox* box, const char* dirname);
89  Bool_t GetNextEvent();
90  void NextEvent();
91  void PrevEvent();
92  void DisplayEvent(HarpoEvent* event);
93  void DisplayEvent();
94  void LoopEvents(Int_t nEvents =1);
95  void Save();
96 
97  void SetStyle();
98 
99  Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
100 
101  Int_t GetDelay(){return 1000*fChooseDelay->GetNumber();}
102 
103  void MakeNice1dHisto(TH1* hist, TVirtualPad* c1, const char* opt = "");
104  void MakeNice2dHisto(TH2* hist, TVirtualPad* c1, Bool_t colz = kTRUE);
105 
106  Double_t FindFWHM(TH1F* h, Double_t fact = 0.2);
107 
108  Bool_t fAutoRefresh;
109 
113 
114 
115 
116  // TH1F* h1Ch[2];
117  TH1F* hAllCh[2];
118  TH2F* h2D[2];
119 
120  // TH1F* hFFT1Ch[2];
121  TH1F* hFFTAllCh[2];
122  TH2F* hFFT2D[2];
123 
124  // TH1F* hPed1Ch[2];
125  TH1F* hPedAllCh[2];
126  TH2F* hPed2D[2];
127 
128  TH1F* hNoise[2];
129  TH2F* hNoise2D[2];
130 
131  Int_t fNevt;
132 
133 
134  ClassDef(HarpoNoiseMonitorGui, 1); // Harpo Noise display
135 };
136 
137 
138 
139 #endif
void BuildInfoFrame(TGHorizontalFrame *f)
Monitor noise in non-zerosuppressed data.
TRootEmbeddedCanvas * ecSideSummary
Double_t FindFWHM(TH1F *h, Double_t fact=0.2)
HarpoAnalyseNoiseMonitor * fAna
TRootEmbeddedCanvas * ecTabEvent
TRootEmbeddedCanvas * ecTabCumul
void BuildDisplayFrame(TGVerticalFrame *f)
A class which instantiate the real top level reader.
Definition: HarpoReader.h:33
TGTextButton * fDisplayEvent
void MakeNice2dHisto(TH2 *hist, TVirtualPad *c1, Bool_t colz=kTRUE)
TGNumberEntry * fChooseDelay
TGTextButton * fAutoRefreshButton
void LoopEvents(Int_t nEvents=1)
void MakeNice1dHisto(TH1 *hist, TVirtualPad *c1, const char *opt="")
TGCheckButton * fCheckShowTrigger
void SetListOfRuns(TGComboBox *box, const char *dirname)
Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
ClassDef(HarpoNoiseMonitorGui, 1)
TGNumberEntry * fChooseEvent
TGNumberEntry * fChooseNEvents
HarpoNoiseMonitorGui(const TGWindow *p, UInt_t w, UInt_t h, UInt_t opt, int argc, char **argv)
A class store HARPO row event data and header. Provide access metods to the row event data...
Definition: HarpoEvent.h:29
TGNumberEntry * fChooseNmax
void BuildButtonsFrame(TGVerticalFrame *f)