]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - VZERO/AliVZEROQAChecker.cxx
Macro and default object for the new Pb-Pb entry.
[u/mrichter/AliRoot.git] / VZERO / AliVZEROQAChecker.cxx
index 52fbb58d9373c0a70017ef9672825b42d2a2b534..a14f743693a21ba65bdd278e1fa802dc96b56e04 100644 (file)
@@ -42,7 +42,7 @@
 ClassImp(AliVZEROQAChecker)
 
 //__________________________________________________________________
-Double_t * AliVZEROQAChecker::Check(AliQAv1::ALITASK_t index, TObjArray ** list, AliDetectorRecoParam * /*recoParam*/) 
+void AliVZEROQAChecker::Check(Double_t * check, AliQAv1::ALITASK_t index, TObjArray ** list, const AliDetectorRecoParam * /*recoParam*/) 
 {
 
 // Main check function: Depending on the TASK, different checks will be applied
@@ -56,7 +56,6 @@ Double_t * AliVZEROQAChecker::Check(AliQAv1::ALITASK_t index, TObjArray ** list,
 //   }
 
 //   Check that histos are filled - (FATAL) set if empty
-  Double_t * check = new Double_t[AliRecoParam::kNSpecies] ; 
   for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
     check[specie]    = 1.0 ; 
     if ( !AliQAv1::Instance()->IsEventSpecieSet(specie) ) 
@@ -69,7 +68,6 @@ Double_t * AliVZEROQAChecker::Check(AliQAv1::ALITASK_t index, TObjArray ** list,
           check[specie] =  CheckEsds(list[specie]);
     } 
   }
-  return check; 
 }
 
 //_________________________________________________________________
@@ -121,56 +119,56 @@ Double_t AliVZEROQAChecker::CheckEsds(TObjArray * list) const
 //  list->Print();
 
   Double_t test     = 1.0;     // initialisation to OK
-  Int_t    histo_nb =   0; 
-  Double_t Mult_V0A = 0.0;
-  Double_t Mult_V0C = 0.0;
-  Double_t V0A_BB_Ring[4], V0C_BB_Ring[4];
-  Double_t V0A_BG_Ring[4], V0C_BG_Ring[4];
+  Int_t    histonb =   0; 
+  Double_t multV0A = 0.0;
+  Double_t multV0C = 0.0;
+  Double_t v0ABBRing[4], v0CBBRing[4];
+  Double_t v0ABGRing[4], v0CBGRing[4];
   for (Int_t i=0; i<4; i++) { 
-       V0A_BB_Ring[i]= V0C_BB_Ring[i]= 0.0;
-       V0A_BG_Ring[i]= V0C_BG_Ring[i]= 0.0;
+       v0ABBRing[i]= v0CBBRing[i]= 0.0;
+       v0ABGRing[i]= v0CBGRing[i]= 0.0;
   }  
   TIter next(list) ; 
   TH1 * hdata ;
   
   while ( (hdata = dynamic_cast<TH1 *>(next())) ) {
          if (hdata) {
-                 switch (histo_nb) {
+                 switch (histonb) {
                  case AliVZEROQADataMakerRec::kCellMultiV0A:
-                         Mult_V0A  = hdata->GetMean();
+                         multV0A  = hdata->GetMean();
                          break;
                  case AliVZEROQADataMakerRec::kCellMultiV0C:
-                         Mult_V0C  = hdata->GetMean();
+                         multV0C  = hdata->GetMean();
                          break;
                  case AliVZEROQADataMakerRec::kBBFlag:
                  for (Int_t i=0; i<8; i++) {         
-                                 if(i<4) V0C_BB_Ring[i]  = hdata->Integral((i*8)+1, (i*8) +8);
-                                 else V0A_BB_Ring[i-4]  = hdata->Integral((i*8)+1, (i*8) +8);
+                                 if(i<4) v0CBBRing[i]  = hdata->Integral((i*8)+1, (i*8) +8);
+                                 else v0ABBRing[i-4]  = hdata->Integral((i*8)+1, (i*8) +8);
                          }           
                          break;
                  case AliVZEROQADataMakerRec::kBGFlag:
                  for (Int_t i=0; i<8; i++) {         
-                                 if(i<4) V0C_BG_Ring[i]  = hdata->Integral((i*8)+1, (i*8) +8);
-                                 else V0A_BG_Ring[i-4]  = hdata->Integral((i*8)+1, (i*8) +8);
+                                 if(i<4) v0CBGRing[i]  = hdata->Integral((i*8)+1, (i*8) +8);
+                                 else v0ABGRing[i-4]  = hdata->Integral((i*8)+1, (i*8) +8);
                          }           
                          break;
                  }
          }
-         histo_nb++;
+         histonb++;
   }
   
-  if(Mult_V0A == 0.0 || Mult_V0C == 0.0) {
+  if(multV0A == 0.0 || multV0C == 0.0) {
      AliWarning(Form("One of the two disks is missing !") );
      test = 0.0; // bit FATAL set
   }
-  if( V0A_BB_Ring[0]+V0A_BG_Ring[0] == 0.0 || 
-      V0A_BB_Ring[1]+V0A_BG_Ring[1] == 0.0 || 
-      V0A_BB_Ring[2]+V0A_BG_Ring[2] == 0.0 || 
-      V0A_BB_Ring[3]+V0A_BG_Ring[3] == 0.0 || 
-      V0C_BB_Ring[0]+V0C_BG_Ring[0] == 0.0 || 
-      V0C_BB_Ring[1]+V0C_BG_Ring[1] == 0.0 || 
-      V0C_BB_Ring[2]+V0C_BG_Ring[2] == 0.0 || 
-      V0C_BB_Ring[3]+V0C_BG_Ring[3] == 0.0  ){    
+  if( v0ABBRing[0]+v0ABGRing[0] == 0.0 || 
+      v0ABBRing[1]+v0ABGRing[1] == 0.0 || 
+      v0ABBRing[2]+v0ABGRing[2] == 0.0 || 
+      v0ABBRing[3]+v0ABGRing[3] == 0.0 || 
+      v0CBBRing[0]+v0CBGRing[0] == 0.0 || 
+      v0CBBRing[1]+v0CBGRing[1] == 0.0 || 
+      v0CBBRing[2]+v0CBGRing[2] == 0.0 || 
+      v0CBBRing[3]+v0CBGRing[3] == 0.0  ){    
       AliWarning(Form("One ring is missing !") );
       test = 0.1;   // bit ERROR set
   }
@@ -194,6 +192,8 @@ void AliVZEROQAChecker::Init(const AliQAv1::DETECTORINDEX_t det)
   lowValue[AliQAv1::kFATAL]     = -1.0   ; 
   hiValue[AliQAv1::kFATAL]      = 0.0 ; 
   SetHiLo(hiValue, lowValue) ; 
+  delete [] hiValue;
+  delete [] lowValue;
 }
 
 //______________________________________________________________________________