8b2811b146620978fe8e36e70125cb685e32b102
[u/mrichter/AliRoot.git] / AD / ADrec / AliADQADataMakerRec.h
1 #ifndef ALIADQADATAMAKERREC_H
2 #define ALIADQADATAMAKERREC_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6
7 //  Produces the data needed to calculate the quality assurance  
8 //  All data must be mergeable objects
9 //  Handles ESDs and RAWs
10 //  Histos will be used for Raw Data control and monitoring
11
12 // --- ROOT system ---
13 class TH1F; 
14 class TH1I; 
15 class TObjArray; 
16
17 // --- Standard library ---
18
19 // --- AliRoot header files ---
20 #include "AliQADataMakerRec.h"
21
22 class AliCDBManager;
23 class AliCDBStorage;
24 class AliADCalibData;
25
26 class AliADQADataMakerRec: public AliQADataMakerRec {
27
28 public:
29   // Histograms for Raw data control
30   enum HRawType_t {kPedestalInt0,kPedestalInt1,
31                    kChargeEoI,kChargeEoIInt0,kChargeEoIInt1,
32                    kWidth,kHPTDCTime,kWidthBB,kWidthBG,kHPTDCTimeBB,kHPTDCTimeBG,
33                    kChargeVsClockInt0,kChargeVsClockInt1,kBBFlagVsClock,kBGFlagVsClock,kBBFlagsPerChannel,kBGFlagsPerChannel,
34                    kFlagNoTime,kTimeNoFlag,
35                    kTimeSlewingOff,kTimeSlewingOn,kWidthSlewing,
36                    kPedestalDiffInt0,kPedestalDiffInt1,
37                    kMultiADA,kMultiADC,kChargeADA,kChargeADC,kChargeAD, 
38                    kADATime,kADCTime,kDiffTime,kTimeADAADC,
39                    kNCoincADA,kNCoincADC,kPairTimeDiffMean,kPairTimeDiffRMS,
40                    kNChargeCorrADA,
41                    kNChargeCorrADC = kNChargeCorrADA + 28,
42                    kNTimeCorrADA = kNChargeCorrADC + 28,
43                    kNTimeCorrADC = kNTimeCorrADA + 28,
44                    kNTimeDiffADA = kNTimeCorrADC + 28,
45                    kNTimeDiffADC = kNTimeDiffADA + 28};
46                    
47                    
48   enum HESDType_t {kCellMultiADA,kCellMultiADC,
49                    kBBFlag,kBGFlag,kChargeChannel,kTimeChannel,
50                    kESDADATime,kESDADCTime,kESDDiffTime};
51         
52 public:
53   AliADQADataMakerRec() ;            // constructor
54   AliADQADataMakerRec(const AliADQADataMakerRec& qadm) ;   
55   AliADQADataMakerRec& operator = (const AliADQADataMakerRec& qadm) ;
56   virtual ~AliADQADataMakerRec() {;} // destructor
57   AliADCalibData *GetCalibData() const;
58   virtual void   InitRaws() ; 
59   
60 protected: 
61   AliADCalibData *fCalibData;        //! calibration data
62    
63 private:
64   virtual void   EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray ** list) ;
65   virtual void   InitESDs() ; 
66   virtual void   InitDigits();  
67   virtual void   MakeESDs(AliESDEvent * esd) ;
68   virtual void   MakeRaws(AliRawReader* rawReader) ;
69   virtual void   MakeDigits() ; 
70   virtual void   MakeDigits(TTree* digitTree) ; 
71   virtual void   StartOfDetectorCycle() ; 
72   Float_t CorrectLeadingTime(Int_t i, Float_t time, Float_t adc) const;
73   
74   Int_t   fEven[16];                  // even charge integrators
75   Int_t   fOdd[16];                   // odd charge intergators
76   Float_t fADCmean[32];              // mean adc per integrator
77   size_t fTrendingUpdateTime;         // trending histos update time
78   UInt_t fCycleStartTime;             // timestamp of QA start-of-cycle
79   UInt_t fCycleStopTime;              // timestamp of QA end-of-cycle
80   Float_t            fTimeOffset[16]; //! HPTDC time offsets channel by channel
81   TF1*               fTimeSlewing;    //! Function for time slewing correction
82
83   ClassDef(AliADQADataMakerRec,1)  // description 
84
85 };
86
87 #endif // AliADQADATAMAKERREC_H