]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplayEventTab.h
Online display: The raw data display now works again
[u/mrichter/AliRoot.git] / HLT / PHOS / OnlineDisplay / AliHLTPHOSOnlineDisplayEventTab.h
1 //-*- Mode: C++ -*-
2 // $Id$
3
4 /**************************************************************************
5  * Copyright(c) 2006, ALICE Experiment at CERN, All rights reserved.      *
6  *                                                                        *
7  * Authors: Per Thomas Hille for the ALICE                                *
8  * offline/HLT Project. Contributors are mentioned in the code where      *
9  * appropriate.                                                           *
10  *                                                                        *
11  * Permission to use, copy, modify and distribute this software and its   *
12  * documentation strictly for non-commercial purposes is hereby granted   *
13  * without fee, provided that the above copyright notice appears in all   *
14  * copies and that both the copyright notice and this permission notice   *
15  * appear in the supporting documentation. The authors make no claims     *
16  * about the suitability of this software for any purpose. It is          *
17  * provided "as is" without express or implied warranty.                  *
18  **************************************************************************/
19
20 #ifndef ALIHLTPHOSONLINEDISPLAYEVENTTAB_H
21 #define ALIHLTPHOSONLINEDISPLAYEVENTTAB_H
22
23 //#include <TGTab.h>
24 // #include <TRootEmbeddedCanvas.h>
25 #include "AliHLTPHOSOnlineDisplayTab.h"
26 // #include <TCanvas.h>
27 // #include <TH2D.h>
28 // #include <TH1D.h>
29 // #include "AliHLTPHOSOnlineDisplayTH2D.h"
30 #include "AliHLTPHOSConstants.h"
31
32 #include "AliHLTPHOSMapper.h"
33
34 #define NZRCUCOORD 2
35 #define NXRCUCOORD 2
36
37 using namespace PhosHLTConst;
38
39 class TGTab;
40 class TRootEmbeddedCanvas;
41 class TCanvas;
42 class TH2D;
43 class TH1D;
44 class AliHLTPHOSOnlineDisplayTH2D;
45 class AliHLTPHOSGetEventButton;
46 class AliHLTHOMERReader;
47 class AliHLTPHOSRcuCellEnergyDataStruct;
48 class AliHLTPHOSOnlineDisplay;
49 //class AliHLTPHOSSharedMemoryInterface;
50 class AliHLTPHOSSharedMemoryInterfacev2;
51 class AliHLTPHOSChannelRawDataStruct;
52
53 class AliHLTPHOSOnlineDisplayEventTab : public AliHLTPHOSOnlineDisplayTab
54 {
55  public:
56  
57   virtual ~AliHLTPHOSOnlineDisplayEventTab();
58
59
60   AliHLTPHOSOnlineDisplayEventTab(AliHLTPHOSOnlineDisplay * onlineDisplayPtr, TGTab  *tabPtr, 
61                                   AliHLTHOMERReader * homerSyncPtr, 
62                                   AliHLTHOMERReader * homerPtrs[MAXHOSTS], 
63                                   int nHosts,  int runnumber = -1);
64 //   AliHLTPHOSOnlineDisplayEventTab(AliHLTPHOSOnlineDisplay *onlineDisplayPtr, TGTab *tabPtr, 
65 //                                AliHLTHOMERReader *fgHomerReaderPtr, 
66 //                                AliHLTHOMERReader *fgHomerReadersPtr[MAXHOSTS], 
67 //                                int nHosts, const int runnumber = -1);
68     //    {
69
70  
71   
72  
73
74 /* 
75   void SetRunNumber(const int runnumber) 
76   {
77     
78     fRunNumber = runnumber ;
79     cout << __FILE__ <<":"<< __LINE__ << "RunNumber was set to "<< fRunNumber  <<endl; ;
80   };
81   */
82
83   Int_t GetRawData(TH1D *histPtr, int x, int z, int gain);
84
85   void UpdateDisplay();
86   int GetNextEvent();
87   virtual void ReadBlockData(AliHLTHOMERReader *homeReaderPtr);
88   void FindFourierBlocks(AliHLTHOMERReader *homeReaderPtr) const;
89
90   void ResetDisplay();
91   TGTab               *fTab;
92   TGTab               *fSubTab1;
93   TRootEmbeddedCanvas *fEc1, *fEc2, *fEc3, *fEc4, *fEc5, *fEc6;
94   TGCompositeFrame    *fSubF1, *fSubF2, *fSubF3;
95   TCanvas *fgCanvasPtr[NGAINS];
96   AliHLTPHOSOnlineDisplayTH2D *fgLegoPlotPtr[NGAINS];
97
98   /*
99   int *fChannelData[NMODULES][NXRCUCOORD][NZRCUCOORD][NXCOLUMNSRCU][NZROWSRCU][NGAINS];
100   Int_t fNChannelSamples[NMODULES][NXRCUCOORD][NZRCUCOORD][NXCOLUMNSRCU][NZROWSRCU][NGAINS];
101   Int_t fChannelEnergy[NMODULES][NXRCUCOORD][NZRCUCOORD][NXCOLUMNSRCU][NZROWSRCU][NGAINS];
102   */  
103
104   int *fChannelData[NMODULES][NZROWSMOD][NXCOLUMNSMOD][NGAINS];
105   Int_t fNChannelSamples[NMODULES][NZROWSMOD][NXCOLUMNSMOD][NGAINS];
106   Int_t fChannelEnergy[NMODULES][NZROWSMOD][NXCOLUMNSMOD][NGAINS];
107
108   //protected:
109   //  Bool_t fgAccumulate;
110
111  private:
112   AliHLTPHOSOnlineDisplayEventTab();
113
114   void FillRawData(const AliHLTPHOSChannelRawDataStruct &rawStr);
115   
116   // void ChannelId2Coordinates(const UShort_t chid) const ;
117
118   AliHLTPHOSGetEventButton* fgEventButtPtr; 
119   void InitDisplay(TGTab *tabPtr){};
120   void InitDisplay(TGTab * tabPtr, int runnumber);
121   AliHLTPHOSOnlineDisplay *fOnlineDisplayPtr;
122   // AliHLTPHOSSharedMemoryInterface *fShmPtr;   
123   AliHLTPHOSSharedMemoryInterfacev2 *fShmPtr;   
124 //   AliHLTPHOSOnlineDisplayEventTab(const AliHLTPHOSOnlineDisplayEventTab& v);
125 //   AliHLTPHOSOnlineDisplayEventTab & operator=(const AliHLTPHOSOnlineDisplayEventTab v){}
126
127
128   ///int fEvent
129
130 };
131
132
133 #endif