Thresholds initialzed at SOR
authorgvolpe <gvolpe@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 6 Nov 2012 18:16:51 +0000 (18:16 +0000)
committergvolpe <gvolpe@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 6 Nov 2012 18:16:51 +0000 (18:16 +0000)
HMPID/AliHMPIDQAChecker.cxx

index 533884c..d71af56 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++;