]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/PHOS/AliHLTPHOSRcuHistogramProducer.h
bugfix: '-nextevent' command in configuration file for publisher inserted correctly...
[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
21
22 class TH1;
23 class TH2D;
24 class AliHLTPHOSRcuCellAccumulatedEnergyDataStruct;
25 class AliHLTPHOSUtilities; 
26
27 #define XBINLOW  0
28 #define XBINUP   1023
29 #define NBINS    1023
30
31
32 class AliHLTPHOSRcuHistogramProducer 
33 {
34  public:
35   //  AliHLTPHOSRcuHistogramProducer();
36   AliHLTPHOSRcuHistogramProducer(AliHLTUInt8_t moduleID, AliHLTUInt8_t rcuX, AliHLTUInt8_t rcuZ);
37   virtual ~AliHLTPHOSRcuHistogramProducer();
38   const AliHLTPHOSRcuCellAccumulatedEnergyDataStruct& GetCellAccumulatedEnergies(); 
39   void Init();
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   void FillLiveChannels(Int_t data[], int size, Int_t x, Int_t z, Int_t gain);
44   void FillLiveChannelHistograms();
45   void Reset();
46   void WriteAllHistograms(char opt[] = "update");
47
48  
49  private:
50   AliHLTPHOSRcuHistogramProducer(const AliHLTPHOSRcuHistogramProducer & );
51   AliHLTPHOSRcuHistogramProducer & operator = (const AliHLTPHOSRcuHistogramProducer &);
52   void SetDefaultHistoOutDir(); 
53   void ScanTimeString(char *timeString);
54   AliHLTPHOSRcuHistogramProducer();
55   char fHistoOutDir[512];
56   TH1F *fEnergyHistogramPtrs[NXCOLUMNSRCU][NZROWSRCU][NGAINS];    /**<Array to store energy distribution per channel for one rcu*/
57   TH1F *fTimingHistogramPtrs[NXCOLUMNSRCU][NZROWSRCU][NGAINS];    /**<Array to store timing distribution per channel for one rcu*/
58   //  TH1D *fDeadChannelMapHistogramPtrs[NXCOLUMNSRCU][NZROWSRCU][NGAINS];
59   TH2D *fDeadChannelMapHistogramPtrs[NGAINS];
60   Float_t fEnergyAverageValues[NXCOLUMNSRCU][NZROWSRCU][NGAINS];  /**<Accumulated energy divided by  hits*/
61   Double_t fAccumulatedValues[NXCOLUMNSRCU][NZROWSRCU][NGAINS];   /**<Array to store accumulated energy per channel for one rcu during run*/
62  
63
64   Float_t fTimingAverageValues[NXCOLUMNSRCU][NZROWSRCU][NGAINS];  /**<Avereage TOF*/
65   AliHLTUInt32_t fHits[NXCOLUMNSRCU][NZROWSRCU][NGAINS]; //comment
66   AliHLTUInt32_t fDeadChannelMap[NXCOLUMNSRCU][NZROWSRCU][NGAINS]; //comment
67   Double_t fTmpChannelData[ALTROMAXSAMPLES];        /**<temporary variable to store raw samples from a single altro channel*/
68   AliHLTPHOSRcuCellAccumulatedEnergyDataStruct fCellAccEnergy; //comment
69   AliHLTUInt8_t fModuleID; /**<ID of the module this component read data from (0-4)*/
70   AliHLTUInt8_t fRcuX;     /**<X position of RCU the data from this Equippment comes from (0 or 1)*/
71   AliHLTUInt8_t fRcuZ;     /**<Z position of RCU the data from this Equippment comes from (0 or 1)*/
72
73   AliHLTPHOSUtilities *fUtilitiesPtr;
74
75 };
76
77 #endif