]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplayEventTab.h
Modified the online display to work
[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 #define NZRCUCOORD 2
33 #define NXRCUCOORD 2
34
35 using namespace PhosHLTConst;
36
37 class TGTab;
38 class TRootEmbeddedCanvas;
39 class TCanvas;
40 class TH2D;
41 class TH1D;
42 class AliHLTPHOSOnlineDisplayTH2D;
43 class AliHLTPHOSGetEventButton;
44 class AliHLTHOMERReader;
45 class AliHLTPHOSRcuCellEnergyDataStruct;
46 class AliHLTPHOSOnlineDisplay;
47 //class AliHLTPHOSSharedMemoryInterface;
48 class AliHLTPHOSSharedMemoryInterfacev2;
49
50
51 class AliHLTPHOSOnlineDisplayEventTab : public AliHLTPHOSOnlineDisplayTab
52 {
53  public:
54  
55   virtual ~AliHLTPHOSOnlineDisplayEventTab();
56
57
58   AliHLTPHOSOnlineDisplayEventTab(AliHLTPHOSOnlineDisplay * onlineDisplayPtr, TGTab  *tabPtr, 
59                                   AliHLTHOMERReader * homerSyncPtr, 
60                                   AliHLTHOMERReader * homerPtrs[MAXHOSTS], 
61                                   int nHosts,  int runnumber = -1);
62 //   AliHLTPHOSOnlineDisplayEventTab(AliHLTPHOSOnlineDisplay *onlineDisplayPtr, TGTab *tabPtr, 
63 //                                AliHLTHOMERReader *fgHomerReaderPtr, 
64 //                                AliHLTHOMERReader *fgHomerReadersPtr[MAXHOSTS], 
65 //                                int nHosts, const int runnumber = -1);
66     //    {
67
68  
69   
70  
71
72 /* 
73   void SetRunNumber(const int runnumber) 
74   {
75     
76     fRunNumber = runnumber ;
77     cout << __FILE__ <<":"<< __LINE__ << "RunNumber was set to "<< fRunNumber  <<endl; ;
78   };
79   */
80
81   Int_t GetRawData(TH1D *histPtr, int x, int z, int gain);
82   void UpdateDisplay();
83   int GetNextEvent();
84   virtual void ReadBlockData(AliHLTHOMERReader *homeReaderPtr);
85   void FindFourierBlocks(AliHLTHOMERReader *homeReaderPtr) const;
86
87   void ResetDisplay();
88   TGTab               *fTab;
89   TGTab               *fSubTab1;
90   TRootEmbeddedCanvas *fEc1, *fEc2, *fEc3, *fEc4, *fEc5, *fEc6;
91   TGCompositeFrame    *fSubF1, *fSubF2, *fSubF3;
92   TCanvas *fgCanvasPtr[NGAINS];
93   AliHLTPHOSOnlineDisplayTH2D *fgLegoPlotPtr[NGAINS];
94   int *fChannelData[NMODULES][NXRCUCOORD][NZRCUCOORD][NXCOLUMNSRCU][NZROWSRCU][NGAINS];
95   Int_t fNChannelSamples[NMODULES][NXRCUCOORD][NZRCUCOORD][NXCOLUMNSRCU][NZROWSRCU][NGAINS];
96   Int_t fChannelEnergy[NMODULES][NXRCUCOORD][NZRCUCOORD][NXCOLUMNSRCU][NZROWSRCU][NGAINS];
97
98  protected:
99   //  Bool_t fgAccumulate;
100
101  private:
102   AliHLTPHOSOnlineDisplayEventTab();
103   
104   void ChannelId2Coordinates(const UShort_t chid) const ;
105
106   AliHLTPHOSGetEventButton* fgEventButtPtr; 
107   void InitDisplay(TGTab *tabPtr){};
108   void InitDisplay(TGTab * tabPtr, int runnumber);
109   AliHLTPHOSOnlineDisplay *fOnlineDisplayPtr;
110   // AliHLTPHOSSharedMemoryInterface *fShmPtr;   
111   AliHLTPHOSSharedMemoryInterfacev2 *fShmPtr;   
112 //   AliHLTPHOSOnlineDisplayEventTab(const AliHLTPHOSOnlineDisplayEventTab& v);
113 //   AliHLTPHOSOnlineDisplayEventTab & operator=(const AliHLTPHOSOnlineDisplayEventTab v){}
114
115
116   ///int fEvent
117
118 };
119
120
121 #endif