]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/PHOS/AliHLTPHOSRcuHistogramProducer.h
- changes to make the clusterisation work for EMCAL
[u/mrichter/AliRoot.git] / HLT / PHOS / AliHLTPHOSRcuHistogramProducer.h
1 //-*- Mode: C++ -*-
2 // $Id$
3
4 // 1
5 // 2
6 // 3
7 // 4
8 // 5
9
10 #ifndef ALIHLTPHOSRCUHISTOGRAMPRODUCER_H
11 #define ALIHLTPHOSRCUHISTOGRAMPRODUCER_H 
12
13 /* Copyright(c) 2006, ALICE Experiment at CERN, All rights reserved. *
14  * See cxx source for full Copyright notice  */ 
15
16 #include "AliHLTPHOSDefinitions.h"
17 #include "TH1.h"
18 #include "TH2D.h"
19 #include "AliHLTPHOSRcuCellAccumulatedEnergyDataStruct.h"
20 //#include "AliHLTPHOSBase.h"
21 #include "AliHLTPHOSRcuProcessor.h"
22
23 class TH1;
24 class TH2D;
25 class AliHLTPHOSRcuCellAccumulatedEnergyDataStruct;
26 class AliHLTPHOSUtilities; 
27
28 #define XBINLOW  0
29 #define XBINUP   1023
30 #define NBINS    1023
31
32 //class AliHLTPHOSRcuHistogramProducer : public AliHLTPHOSBase
33 //class AliHLTPHOSRcuHistogramProducer : public AliHLTPHOSRcuProcessor
34 class AliHLTPHOSRcuHistogramProducer 
35 {
36  public:
37   //  AliHLTPHOSRcuHistogramProducer();
38   AliHLTPHOSRcuHistogramProducer(AliHLTUInt8_t moduleID, AliHLTUInt8_t rcuX, AliHLTUInt8_t rcuZ);
39   virtual ~AliHLTPHOSRcuHistogramProducer();
40   const AliHLTPHOSRcuCellAccumulatedEnergyDataStruct& GetCellAccumulatedEnergies(); 
41   void Init();
42   //void SetRcuX(AliHLTUInt8_t X);
43   // void SetRcuZ(AliHLTUInt8_t Z);
44   //void SetModuleID(AliHLTUInt8_t moduleID); 
45   void SetHistoOutDir(char *outDir);
46   void FillEnergy(AliHLTUInt8_t x, AliHLTUInt8_t z,  AliHLTUInt8_t gain, float energy);
47   void FillTime(AliHLTUInt8_t x,   AliHLTUInt8_t z,  AliHLTUInt8_t gain, float time); 
48   void FillLiveChannels(Int_t data[], int size, Int_t x, Int_t z, Int_t gain);
49   void FillLiveChannelHistograms();
50   void Reset();
51   void WriteAllHistograms(char opt[] = "update");
52
53  
54  private:
55   AliHLTPHOSRcuHistogramProducer(const AliHLTPHOSRcuHistogramProducer & );
56   AliHLTPHOSRcuHistogramProducer & operator = (const AliHLTPHOSRcuHistogramProducer &);
57   void SetDefaultHistoOutDir(); 
58   void ScanTimeString(char *timeString);
59   AliHLTPHOSRcuHistogramProducer();
60   char fHistoOutDir[512];
61   TH1F *fEnergyHistogramPtrs[NXCOLUMNSRCU][NZROWSRCU][NGAINS];    /**<Array to store energy distribution per channel for one rcu*/
62   TH1F *fTimingHistogramPtrs[NXCOLUMNSRCU][NZROWSRCU][NGAINS];    /**<Array to store timing distribution per channel for one rcu*/
63   //  TH1D *fDeadChannelMapHistogramPtrs[NXCOLUMNSRCU][NZROWSRCU][NGAINS];
64   TH2D *fDeadChannelMapHistogramPtrs[NGAINS];
65   Float_t fEnergyAverageValues[NXCOLUMNSRCU][NZROWSRCU][NGAINS];  /**<Accumulated energy divided by  hits*/
66   Double_t fAccumulatedValues[NXCOLUMNSRCU][NZROWSRCU][NGAINS];   /**<Array to store accumulated energy per channel for one rcu during run*/
67  
68
69   Float_t fTimingAverageValues[NXCOLUMNSRCU][NZROWSRCU][NGAINS];  /**<Avereage TOF*/
70   AliHLTUInt32_t fHits[NXCOLUMNSRCU][NZROWSRCU][NGAINS]; //comment
71   AliHLTUInt32_t fDeadChannelMap[NXCOLUMNSRCU][NZROWSRCU][NGAINS]; //comment
72   Double_t fTmpChannelData[ALTROMAXSAMPLES];        /**<temporary variable to store raw samples from a single altro channel*/
73   AliHLTPHOSRcuCellAccumulatedEnergyDataStruct fCellAccEnergy; //comment
74   AliHLTUInt8_t fModuleID; /**<ID of the module this component read data from (0-4)*/
75   AliHLTUInt8_t fRcuX;     /**<X position of RCU the data from this Equippment comes from (0 or 1)*/
76   AliHLTUInt8_t fRcuZ;     /**<Z position of RCU the data from this Equippment comes from (0 or 1)*/
77
78   AliHLTPHOSUtilities *fUtilitiesPtr;
79
80 };
81
82 #endif