]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HMPID/AliHMPIDQAChecker.cxx
Flat esd friend added
[u/mrichter/AliRoot.git] / HMPID / AliHMPIDQAChecker.cxx
index 533884cdc45da9578681aa0179664119aa9c3e6d..bd28aea79c846bc42b40feac09d5a891b95dc84f 100644 (file)
@@ -77,9 +77,7 @@ fIsOnlineThr(kFALSE)
     if (fNoReference) 
       AliInfo("QA reference data NOT retrieved for Reconstruction check. No HMPIDChecker!");
   }
-  
-  InitOnlineThresholds();
-  
+    
 }
 
 //_________________________________________________________________
@@ -94,6 +92,8 @@ void AliHMPIDQAChecker::Check(Double_t *  check, AliQAv1::ALITASK_t index, TObjA
 // Main check function: Depending on the TASK, different checks are applied
 // At the moment:       check for empty histograms and checks for RecPoints
 
+  InitOnlineThresholds();    
+  
   if(fNoReference)  
 
   for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
@@ -119,8 +119,6 @@ void AliHMPIDQAChecker::Check(Double_t *  check, AliQAv1::ALITASK_t index, TObjA
     if(index == AliQAv1::kRAW) {       check[specie] = CheckRaw(specie,list[specie]);       }
                                
     
-
-
   } // species loop
 }
 //_________________________________________________________________
@@ -250,6 +248,7 @@ Double_t AliHMPIDQAChecker::CheckRaw(Int_t specie, TObjArray* list)
   // As of now (06/07/2012) the quality flag of all histos in raw will be est to the result of teh CheckRaw and displayed
   // in AMORE. But we can pu undividual labels.
   //
+  
   Int_t raqQualFlag = AliQAv1::kNULLBit;
   
   Int_t hmpQaFlags[4]={-1}; //init for the 4 shifter histos
@@ -615,12 +614,10 @@ void AliHMPIDQAChecker::InitOnlineThresholds()
   //
   // Init the online thresholds from GRP generated by AMORE
   //
-    
+  
   AliCDBManager* man = AliCDBManager::Instance(); 
   if(!man)  {     fIsOnlineThr = kFALSE;     return;   }
   
-//  man->SetRun(AliQAChecker::Instance()->GetRunNumber()); //this should be the normal code
- //  man->SetSpecificStorage("GRP/Calib/QAThresholds","local://$ALICE_ROOT/OCDB/");// need for development machine testing
 
   if(!man->Get("GRP/Calib/QAThresholds"))  {     fIsOnlineThr = kFALSE;    return;    }
  
@@ -635,19 +632,19 @@ void AliHMPIDQAChecker::InitOnlineThresholds()
   else 
      fIsOnlineThr = kTRUE; 
   
+  
   Int_t teCnt = 0;
   TString parName = "zero";
   while ( thresholds->GetThreshold(teCnt)) 
   {
-     
+     if(!((thresholds->GetThreshold(teCnt))->GetName())) return;
+         
      parName = (thresholds->GetThreshold(teCnt))->GetName();
-
-          
+     
      if( parName.Contains("HmpNumberOfExcludedDDLthreshold") )
      {
        TParameter<int>* myParam = (TParameter<int>*) thresholds->GetThreshold(teCnt); 
        fHmpQaThr_NumberOfExcludedDDL = myParam->GetVal();
-       myParam->Delete();
      }
    
      
@@ -655,58 +652,48 @@ void AliHMPIDQAChecker::InitOnlineThresholds()
      {
        TParameter<int>* myParam = (TParameter<int>*) thresholds->GetThreshold(teCnt); 
        fHmpQaThr_DataSizeLowerThreshold = myParam->GetVal();
-       myParam->Delete();        
      }
              
      if( parName.Contains("HmpDataSizeUpperThreshold") ) 
      {
        TParameter<int>* myParam = (TParameter<int>*) thresholds->GetThreshold(teCnt); 
        fHmpQaThr_DataSizeUpperThreshold = myParam->GetVal();
-       myParam->Delete();        
      }
-     
-     
+          
      if( parName.Contains("HmpPadOccupancyLowerThreshold") ) 
      {
        TParameter<float>* myParam = (TParameter<float>*) thresholds->GetThreshold(teCnt); 
        fHmpQaThr_PadOccupancyLowerThreshold = myParam->GetVal();
-       myParam->Delete();        
      }
            
      if( parName.Contains("HmpPadOccupancyUpperThreshold") ) 
      {
        TParameter<float>* myParam = (TParameter<float>*) thresholds->GetThreshold(teCnt); 
        fHmpQaThr_PadOccupancyUpperThreshold = myParam->GetVal();
-       myParam->Delete();        
      }
-       
-             
+                    
      if( parName.Contains("HmpSectorGainLossWarningThreshold") ) 
       {
        TParameter<int>* myParam = (TParameter<int>*) thresholds->GetThreshold(teCnt); 
        fHmpQaThr_SectorGainLossWarningThreshold = myParam->GetVal();
-       myParam->Delete();        
      } 
        
      if( parName.Contains("HmpSectorGainLossErrorThreshold") ) 
        {
        TParameter<int>* myParam = (TParameter<int>*) thresholds->GetThreshold(teCnt); 
        fHmpQaThr_SectorGainLossErrorThreshold = myParam->GetVal();
-       myParam->Delete();        
      } 
        
      if( parName.Contains("HmpMissingPadFractionWarningThreshold") ) 
        {
        TParameter<float>* myParam = (TParameter<float>*) thresholds->GetThreshold(teCnt); 
        fHmpQaThr_MissingPadFractionWarningThreshold = myParam->GetVal();
-       myParam->Delete();        
      }
      
      if( parName.Contains("HmpMissingPadFractionErrorThreshold") ) 
          {
        TParameter<float>* myParam = (TParameter<float>*) thresholds->GetThreshold(teCnt); 
        fHmpQaThr_MissingPadFractionErrorThreshold = myParam->GetVal();
-       myParam->Delete();        
      }
       
      teCnt++;    
@@ -719,16 +706,16 @@ void AliHMPIDQAChecker::InitOnlineThresholds()
 void AliHMPIDQAChecker::PrintThresholds()
 {
   Printf("--- Printing thresholds ---");  
-  Printf(Form("--- Default or online: %d ---",fIsOnlineThr));  
-  Printf(Form("--- fHmpQaThr_NumberOfExcludedDDL %d ---",fHmpQaThr_NumberOfExcludedDDL));
-  Printf(Form("--- fHmpQaThr_DataSizeLowerThreshold %d ---",fHmpQaThr_DataSizeLowerThreshold));
-  Printf(Form("--- fHmpQaThr_DataSizeUpperThreshold %d ---",fHmpQaThr_DataSizeUpperThreshold));
-  Printf(Form("--- fHmpQaThr_PadOccupancyLowerThreshold %f ---",fHmpQaThr_PadOccupancyLowerThreshold));
-  Printf(Form("--- fHmpQaThr_PadOccupancyUpperThreshold %f ---",fHmpQaThr_PadOccupancyUpperThreshold));
-  Printf(Form("--- fHmpQaThr_SectorGainLossWarningThreshold %d ---",fHmpQaThr_SectorGainLossWarningThreshold));
-  Printf(Form("--- fHmpQaThr_SectorGainLossErrorThreshold %d ---",fHmpQaThr_SectorGainLossErrorThreshold));
-  Printf(Form("--- fHmpQaThr_MissingPadFractionWarningThreshold %f ---",fHmpQaThr_MissingPadFractionWarningThreshold));
-  Printf(Form("--- fHmpQaThr_MissingPadFractionErrorThreshold %f ---",fHmpQaThr_MissingPadFractionErrorThreshold));
+  Printf("--- Default or online: %i ---",fIsOnlineThr);  
+  Printf("--- fHmpQaThr_NumberOfExcludedDDL: %i ---",fHmpQaThr_NumberOfExcludedDDL);
+  Printf("--- fHmpQaThr_DataSizeLowerThreshold: %i ---",fHmpQaThr_DataSizeLowerThreshold);
+  Printf("--- fHmpQaThr_DataSizeUpperThreshold: %i ---",fHmpQaThr_DataSizeUpperThreshold);
+  Printf("--- fHmpQaThr_PadOccupancyLowerThreshold: %f ---",fHmpQaThr_PadOccupancyLowerThreshold);
+  Printf("--- fHmpQaThr_PadOccupancyUpperThreshold: %f ---",fHmpQaThr_PadOccupancyUpperThreshold);
+  Printf("--- fHmpQaThr_SectorGainLossWarningThreshold: %i ---",fHmpQaThr_SectorGainLossWarningThreshold);
+  Printf("--- fHmpQaThr_SectorGainLossErrorThreshold: %i ---",fHmpQaThr_SectorGainLossErrorThreshold);
+  Printf("--- fHmpQaThr_MissingPadFractionWarningThreshold: %f ---",fHmpQaThr_MissingPadFractionWarningThreshold);
+  Printf("--- fHmpQaThr_MissingPadFractionErrorThreshold: %f ---",fHmpQaThr_MissingPadFractionErrorThreshold);
   Printf("--- Printing thresholds done ---");