]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplayEventTab.h
Autoscaling of histogram (Oystein). 1)the number of samples
[u/mrichter/AliRoot.git] / HLT / PHOS / OnlineDisplay / AliHLTPHOSOnlineDisplayEventTab.h
1 #ifndef ALIHLTPHOSONLINEDISPLAYEVENTTAB_H
2 #define ALIHLTPHOSONLINEDISPLAYEVENTTAB_H
3
4 #include <TGTab.h>
5 #include <TRootEmbeddedCanvas.h>
6 #include "AliHLTPHOSOnlineDisplayTab.h"
7 #include <TCanvas.h>
8 #include <TH2D.h>
9 #include <TH1D.h>
10 #include "AliHLTPHOSOnlineDisplayTH2D.h"
11 #include "AliHLTPHOSConstants.h"
12
13 //#include 
14
15 //#include "AliHLTPHOSOnlineDisplay.h"
16
17 //#define N_SAMPLES 70 //BAD, someone is going to pay for this
18 //#define N_SAMPLES 140 //BAD, someone is going to pay for this
19 #define N_ZRCU_COORD 2
20 #define N_XRCU_COORD 2
21
22 using namespace PhosHLTConst;
23
24  
25 class AliHLTPHOSGetEventButton;
26 class AliHLTHOMERReader;
27 //class AliHLTPHOSRcuCellEnergyDataStruct;
28 class AliHLTPHOSRcuCellEnergyDataStruct;
29 class AliHLTPHOSOnlineDisplay;
30 class AliHLTPHOSSharedMemoryInterface;
31
32 //      AliHLTPHOSRcuCellEnergyDataStruct.h 
33 class AliHLTPHOSOnlineDisplayEventTab : public AliHLTPHOSOnlineDisplayTab
34 {
35  public:
36   virtual ~AliHLTPHOSOnlineDisplayEventTab();
37   AliHLTPHOSOnlineDisplayEventTab(AliHLTPHOSOnlineDisplay *onlineDisplayPtr, TGTab *tabPtr, AliHLTHOMERReader *fgHomerReaderPtr, AliHLTHOMERReader *fgHomerReadersPtr[MAX_HOSTS], int nHosts);
38   //  void GetRawData(TH1D *histPtr);
39   //AliHLTPHOSOnlineDisplayEventTab::GetRawData(TH1D *histPtr, int mod, int rcuX, int rcuZ, int x, int z, int gain)
40   //  Int_t GetRawData(TH1D *histPtr, int mod, int rcuX, int rcuZ, int x, int z, int gain, int& energy);
41   //Int_t GetRawData(TH1D *histPtr, int x, int z, int gain, int& energy);
42   
43   Int_t GetRawData(TH1D *histPtr, int mod, int rcuX, int rcuZ, int x, int z, int gain);
44   Int_t GetRawData(TH1D *histPtr, int x, int z, int gain);
45
46   void UpdateDisplay();
47   int GetNextEvent();
48   virtual void ReadBlockData(AliHLTHOMERReader *homeReaderPtr);
49   void ResetDisplay();
50   TGTab               *fTab;
51   TGTab               *fSubTab1;
52   TRootEmbeddedCanvas *fEc1, *fEc2, *fEc3, *fEc4, *fEc5, *fEc6;
53   TGCompositeFrame    *fSubF1, *fSubF2, *fSubF3;
54   TCanvas *fgCanvasHGPtr;
55   TCanvas *fgCanvasLGPtr;
56
57   //  TH2D *fgLegoPlotLGPtr;
58   // TH2D *fgLegoPlotHGPtr;
59
60   AliHLTPHOSOnlineDisplayTH2D *fgLegoPlotLGPtr;
61   AliHLTPHOSOnlineDisplayTH2D *fgLegoPlotHGPtr;
62
63
64   //  int *fChannelData[N_MODULES][N_RCUS_PER_MODULE][N_ZROWS_RCU][N_XCOLUMNS_RCU][N_GAINS];
65   int *fChannelData[N_MODULES][N_XRCU_COORD][N_ZRCU_COORD][N_XCOLUMNS_RCU][N_ZROWS_RCU][N_GAINS];
66   Int_t fNChannelSamples[N_MODULES][N_XRCU_COORD][N_ZRCU_COORD][N_XCOLUMNS_RCU][N_ZROWS_RCU][N_GAINS];
67   Int_t fChannelEnergy[N_MODULES][N_XRCU_COORD][N_ZRCU_COORD][N_XCOLUMNS_RCU][N_ZROWS_RCU][N_GAINS];
68
69  protected:
70   Bool_t fgAccumulate;
71
72  private:
73   AliHLTPHOSOnlineDisplayEventTab();
74   AliHLTPHOSGetEventButton* fgEventButtPtr; 
75   void InitDisplay(TGTab *tabPtr);
76
77   //  AliHLTPHOSOnlineDisplay. 
78   AliHLTPHOSOnlineDisplay *fOnlineDisplayPtr;
79   AliHLTPHOSSharedMemoryInterface *fShmPtr;   
80 };
81
82
83 #endif