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