Fix for memory leaks in digits TClonesArrays (Matevz)
[u/mrichter/AliRoot.git] / VZERO / AliVZEROQADataMakerRec.h
1 #ifndef ALIVZEROQADATAMAKERREC_H
2 #define ALIVZEROQADATAMAKERREC_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 AliVZEROCalibData;
25
26 class AliVZEROQADataMakerRec: public AliQADataMakerRec {
27
28 public:
29   // Histograms for Raw data control
30   enum HRawType_t {kPedestalInt0,kPedestalInt1,kPedestalCycleInt0,kPedestalCycleInt1,kPedestalTimeInt0,kPedestalTimeInt1
31                   ,kChargeEoIInt0,kChargeEoIInt1,kChargeEoITimeInt0,kChargeEoITimeInt1,kChargeEoICycleInt0,kChargeEoICycleInt1
32                   ,kChargeEoIBBInt0,kChargeEoIBBInt1,kChargeEoIBGInt0,kChargeEoIBGInt1,kChargeVsClockInt0,kChargeVsClockInt1
33                   ,kChargeMBBB0BG0Int0,kChargeMBBB0BG1Int0,kChargeMBBB1BG0Int0,kChargeMBBB1BG1Int0
34                   ,kChargeMBBB0BG0Int1,kChargeMBBB0BG1Int1,kChargeMBBB1BG0Int1,kChargeMBBB1BG1Int1
35                   ,kWidth,kWidthBB,kWidthBG,kHPTDCTime,kHPTDCTimeBB,kHPTDCTimeBG,kBBFlagVsClock,kBGFlagVsClock
36                   ,kMultiV0A,kMultiV0C,kChargeV0A,kChargeV0C,kChargeV0 
37                   ,kV0ATime,kV0CTime,kDiffTime
38                   ,kRawMIPV0A,kRawMIPV0C,kRawMIPV0,kRawMIPChannel
39                   ,kRawMeanChargePerRing,kRawMeanFlagPerRing,kRawDQMCharge,kRawDQMFlag} ;
40         
41  enum HESDType_t {kCellMultiV0A,kCellMultiV0C,kMIPMultiV0A,kMIPMultiV0C,kMIPMultiChannel
42                   ,kBBFlag,kBGFlag,kChargeChannel,kTimeChannel
43                   ,kESDV0ATime,kESDV0CTime,kESDDiffTime};
44
45 public:
46   AliVZEROQADataMakerRec() ;            // constructor
47   AliVZEROQADataMakerRec(const AliVZEROQADataMakerRec& qadm) ;   
48   AliVZEROQADataMakerRec& operator = (const AliVZEROQADataMakerRec& qadm) ;
49   virtual ~AliVZEROQADataMakerRec() {;} // destructor
50   AliVZEROCalibData *GetCalibData() const;
51   virtual void   InitRaws() ; 
52   void SetTrendingUpdateTime(size_t time) {fTrendingUpdateTime = time;};
53   
54 protected: 
55   AliVZEROCalibData *fCalibData;        //! calibration data
56    
57 private:
58   virtual void   EndOfDetectorCycle(AliQAv1::TASKINDEX_t, TObjArray ** list) ;
59   virtual void   InitESDs() ; 
60   virtual void   InitDigits();  
61   virtual void   MakeESDs(AliESDEvent * esd) ;
62   virtual void   MakeRaws(AliRawReader* rawReader) ;
63   virtual void   MakeDigits() ; 
64   virtual void   MakeDigits(TTree* digitTree) ; 
65   virtual void   StartOfDetectorCycle() ; 
66   void AddTrendingEntry();
67
68   Int_t   fEvent;
69   Int_t   fEven[64];
70   Int_t   fOdd[64];
71   Float_t fADCmean[128];
72   size_t fNTotEvents;
73   size_t fNSubEvents;
74   size_t fTrendingUpdateEvent;
75   size_t fNTrendingUpdates;
76   size_t fTrendingUpdateTime;
77   UInt_t fCycleStartTime;
78   UInt_t fCycleStopTime;
79   Double_t fMonitorRate;
80   Double_t fChargePerRing[8];
81   Double_t fFlagPerRing[8];
82   Double_t fChargePerChannel[64];
83   Double_t fFlagPerChannel[64];
84   Double_t fMeanChargePerChannel[64];
85   Double_t fMeanFlagPerChannel[64];
86
87   ClassDef(AliVZEROQADataMakerRec,2)  // description 
88
89 };
90
91 #endif // AliVZEROQADATAMAKERREC_H