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