]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCdataQA.h
During simulation: fill STU region w/ non null time sums
[u/mrichter/AliRoot.git] / TPC / AliTPCdataQA.h
index 41eda82722197af60e7b69515d9ae50609d06ada..94d02392796c5d6da5313eb8c55d3cbd69cf6a5e 100644 (file)
@@ -6,18 +6,17 @@
 
 
 #include <TH1F.h>
-#include <TProfile.h>
-#include <TObjArray.h>
+class TProfile;
 #include "AliRecoParam.h"
 
-class TArrayF;
+#include <TArray.h>
+
 class TH2F;
 class TTreeSRedirector;
 class AliTPCROC;
 class AliTPCCalROC;
 class AliTPCRawStream;
 class AliTPCRawStreamV3;
-class AliTPCRawStreamFast;
 class AliRawReader;
 class AliTPCAltroMapping;
 class AliTPCCalPad;
@@ -28,29 +27,31 @@ class AliTPCdataQA : public TH1F {
 
 public:
   AliTPCdataQA();
-  AliTPCdataQA(AliRecoParam::EventSpecie_t es);
   AliTPCdataQA(const AliTPCdataQA &ped);
   AliTPCdataQA(const TMap *config);
   virtual ~AliTPCdataQA();
 
   AliTPCdataQA& operator = (const  AliTPCdataQA &source);
  void  DumpToFile(const Char_t *filename, const Char_t *dir="", Bool_t append=kFALSE);
- void MakeTree(const char *fname="QApad.root");
+ void MakeTree(const char *fname="QApad.root") const;
 
   //
-  Bool_t ProcessEventFast(AliTPCRawStreamFast *rawStreamFast);
-  Bool_t ProcessEventFast(AliRawReader        *rawReader);
-  Bool_t ProcessEvent(AliTPCRawStream *rawStream);
-  Bool_t ProcessEvent(AliTPCRawStreamV3 *rawStreamV3);
-  Bool_t ProcessEvent(AliRawReader    *rawReader);
-  Bool_t ProcessEventOld(AliRawReader    *rawReader);
-  Bool_t ProcessEvent(eventHeaderStruct   *event);
+  Bool_t ProcessEvent(AliTPCRawStream *const rawStream);
+  Bool_t ProcessEvent(AliTPCRawStreamV3 *const rawStreamV3);
+  Bool_t ProcessEvent(AliRawReader    *const rawReader);
+  Bool_t ProcessEventOld(AliRawReader    *const rawReader);
+  Bool_t ProcessEvent(eventHeaderStruct   *const event);
 
   void   Analyse();
   //
   //
-  void SetPedestal(AliTPCCalPad *pedestalCal){ fPedestal = pedestalCal;}
-  void SetNoise(AliTPCCalPad *noiseCal){ fNoise = noiseCal;}
+  void SetPedestal(AliTPCCalPad *const pedestalCal){ fPedestal = pedestalCal;}
+  void SetNoise(AliTPCCalPad *const noiseCal){ fNoise = noiseCal;}
+
+  // DQM methods
+  void FillOccupancyProfile();
+  void ResetProfiles();
+
 
   AliTPCCalPad *GetNoThreshold() const { return fNoThreshold;}
   AliTPCCalPad *GetMaxCharge() const { return fMaxCharge;}
@@ -71,8 +72,13 @@ public:
   TH1F*     GetHistOccupancyVsEvent();
   TH1F*     GetHistNclustersVsEvent();
 
+  // DQM output
+  TProfile* GetHistOccVsSector()  const { return fHistOccVsSector; }
+  TProfile* GetHistQVsSector()    const { return fHistQVsSector; }
+  TProfile* GetHistQmaxVsSector() const { return fHistQmaxVsSector; }
+
   //
-  AliTPCAltroMapping **GetAltroMapping() { return fMapping; };
+  AliTPCAltroMapping **GetAltroMapping() const { return fMapping; };
   void  SetAltroMapping(AliTPCAltroMapping **mapp) { fMapping = mapp; };
   //
   //
@@ -87,10 +93,16 @@ public:
   Int_t  GetSignalCounter()  const { return fSignalCounter; }
   Int_t  GetClusterCounter() const { return fClusterCounter;}
 
+  // DQM getter
+  Bool_t    GetIsDQM() const { return fIsDQM; }
+
   void  SetRangeTime(Int_t tMin, Int_t tMax){ fFirstTimeBin=tMin; fLastTimeBin=tMax;}  // Set time bin range that is used for the pedestal calibration
   void  SetRangeAdc (Int_t aMin, Int_t aMax){ fAdcMin=aMin; fAdcMax=aMax; }  // Set adc range for the pedestal calibration
   void  SetMaxEvents   (Int_t value) { fMaxEvents = value; }
   void  SetEventsPerBin(Int_t value) { fEventsPerBin = value; }
+  
+  // DQM setter
+  void  SetIsDQM(Bool_t value) { fIsDQM = value; }
 
 private:
   Int_t Update(const Int_t iSector, const Int_t iRow, const Int_t iPad,
@@ -104,9 +116,8 @@ private:
   void GetPadAndTimeBin(Int_t bin, Int_t& iPad, Int_t& iTimeBin); // Get pad and time bin corresponding to the 1d bin
   Float_t GetQ(const Float_t* adcArray, const Int_t time,
               const Int_t pad, const Int_t maxTimeBins, 
-              Int_t& timeMin,Int_t& timeMax,Int_t& padMin,Int_t& padMax);
+              Int_t& timeMin,Int_t& timeMax,Int_t& padMin,Int_t& padMax) const;
   void UpdateEventHistograms();
-  void UpdateEventHisto(TH1F* hist, Float_t average);
 
   Int_t fFirstTimeBin;              //  First Time bin needed for analysis
   Int_t fLastTimeBin;               //  Last Time bin needed for analysis
@@ -154,8 +165,15 @@ private:
   Int_t fPadsMax;                  //!  Maximum number of time bins
   Int_t fTimeBinsMax;              //!  Maximum number of time bins
 
+  // DQM variables
+  Bool_t fIsDQM;                   //!  Is DQM -> Simple output (no 2D!)
+  TProfile* fHistOccVsSector;      //!  Occ vs sector (for DQM only)
+  TProfile* fHistQVsSector;        //!  Q vs sector (for DQM only)
+  TProfile* fHistQmaxVsSector;     //!  QMax vs sector (for DQM only)
+  TArrayD* fOccVec;                //!  Occupancy help counter for DQM
+  TArrayD* fOccMaxVec;             //!  Occupancy help normlization for DQM
+  
 
-public:
   ClassDef(AliTPCdataQA, 5)  // Implementation of the TPC Raw QA
 };