Comments and colors added to DQM histograms if problems occur. A threshold for the...
authorprino <prino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 20 Aug 2010 22:19:18 +0000 (22:19 +0000)
committerprino <prino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 20 Aug 2010 22:19:18 +0000 (22:19 +0000)
ITS/AliITSQASPDChecker.cxx
ITS/AliITSQASPDChecker.h
ITS/AliITSQASPDDataMakerRec.cxx

index d0c9655..9c65a2d 100644 (file)
@@ -24,6 +24,7 @@
 // --- ROOT system ---
 #include "TH1.h"
 #include "TString.h"
+#include "TList.h"
 
 // --- AliRoot header files ---
 #include "AliITSQASPDChecker.h"
 
 ClassImp(AliITSQASPDChecker)
 //__________________________________________________________________
+AliITSQASPDChecker::AliITSQASPDChecker() : 
+ TObject(),
+ fSubDetOffset(0), 
+ fStepBitSPD(NULL),
+ fLowSPDValue(NULL),
+ fHighSPDValue(NULL) 
+ {
+ for(Int_t i=0; i<6 ; i++) { 
+  fDisplayStatus[i] = new TPaveText(0.2,0.1,0.8,0.3,"NDC");
+  fDisplayStatus[i]->SetFillColor(kGreen);
+  fDisplayStatus[i]->AddText("OK");
+  } 
+ }
+//__________________________________________________________________
 AliITSQASPDChecker& AliITSQASPDChecker::operator = (const AliITSQASPDChecker& qac ) 
 {
   // Equal operator.
@@ -39,7 +54,15 @@ AliITSQASPDChecker& AliITSQASPDChecker::operator = (const AliITSQASPDChecker& qa
   new(this) AliITSQASPDChecker(qac);
   return *this;
 }
-
+//__________________________________________________________________
+AliITSQASPDChecker::~AliITSQASPDChecker() {
+if(fStepBitSPD) delete[] fStepBitSPD ;
+if(fLowSPDValue)delete[]fLowSPDValue;
+if(fHighSPDValue) delete[]fHighSPDValue;
+for(Int_t i=0; i<6; i++){
+delete fDisplayStatus[i];
+}
+} 
 
 //__________________________________________________________________
 Double_t AliITSQASPDChecker::Check(AliQAv1::ALITASK_t index, TObjArray * list, const AliDetectorRecoParam * /*recoParam*/)
@@ -153,30 +176,87 @@ Double_t response =0;
 Bool_t fatalProblem = kFALSE;
 
 while ( (hdata = dynamic_cast<TH1 *>(next())) ) {
-if (hdata) {
+ if (hdata) {
         TString histName = hdata->GetName();
         if(!histName.Contains("SPD")) continue;
         totalHistos++;
         // data format error
         if(histName.Contains("SPDErrorsAll")){
+       if(hdata->GetListOfFunctions()->GetEntries()<1) hdata->GetListOfFunctions()->Add(fDisplayStatus[0]);
         if(hdata->Integral(0,hdata->GetNbinsX())>0){
+          for(Int_t i=0; i<hdata->GetListOfFunctions()->GetEntries(); i++){
+          TString funcName = hdata->GetListOfFunctions()->At(i)->ClassName();
+          if(funcName.Contains("TPaveText")){
+            TPaveText *p = (TPaveText*)hdata->GetListOfFunctions()->At(i);
+            Bool_t isHighMult = kFALSE;
+            for(Int_t ieq=0; ieq<20; ieq++){
+             if(hdata->GetBinContent(ieq+1,17+1)>0 && hdata->GetBinContent(ieq+1,20+1)>0) isHighMult = kTRUE;
+            }
+            if(isHighMult) {
+              p->Clear();
+             p->SetFillColor(kOrange);
+             p->AddText("High occupancy in a chip detected (-> errors type 17,20 and 0 are present). ");
+             p->AddText("ONLY IF OTHER error types are present CALL the expert");
+             }
+            else {
+             p->Clear();
+            p->SetFillColor(kRed);
+            p->AddText("Data Format NOT OK. Please call the expert!");
+            }
+            
+           }
+          }
            response = fHighSPDValue[AliQAv1::kFATAL];
           fatalProblem=kTRUE;
            break;
-         }
+         } else {  
+         for(Int_t i=0; i<hdata->GetListOfFunctions()->GetEntries(); i++){
+          TString funcName = hdata->GetListOfFunctions()->At(i)->ClassName();
+          if(funcName.Contains("TPaveText")){
+            TPaveText *p = (TPaveText*)hdata->GetListOfFunctions()->At(i);
+            p->Clear();
+            p->SetFillColor(kGreen);
+            p->AddText("OK");
+          
+          }
+          }
+        }
         }
         // MEB error
-        if(histName.Contains("MEB")){
+        else if(histName.Contains("MEB")){
+       if(hdata->GetListOfFunctions()->GetEntries()<1) hdata->GetListOfFunctions()->Add(fDisplayStatus[1]);
           if(hdata->GetEntries()>0){
-          AliWarning("************* MEB ERROR!!!! ****************\n");
+             for(Int_t i=0; i<hdata->GetListOfFunctions()->GetEntries(); i++){
+          TString funcName = hdata->GetListOfFunctions()->At(i)->ClassName();
+          if(funcName.Contains("TPaveText")){
+            TPaveText *p = (TPaveText*)hdata->GetListOfFunctions()->At(i);
+            p->Clear();
+            p->SetFillColor(kRed);
+            p->AddText("MEB problem could be present. Please check if SPD is in READY state.");
+            p->AddText("If SPD is in -READY- state, please notify it to the expert."); 
+           }
+          } 
+         
+         
            response = fHighSPDValue[AliQAv1::kFATAL];
           fatalProblem=kTRUE;
            break;
+          } else {  
+         for(Int_t i=0; i<hdata->GetListOfFunctions()->GetEntries(); i++){
+          TString funcName = hdata->GetListOfFunctions()->At(i)->ClassName();
+          if(funcName.Contains("TPaveText")){
+            TPaveText *p = (TPaveText*)hdata->GetListOfFunctions()->At(i);
+            p->Clear();
+            p->SetFillColor(kGreen);
+            p->AddText("OK");
+          
+          }
           }
-         }
-        goodHistos++;
+        }      
         }
-}
+       goodHistos++;
+      }
+     }
     if(!fatalProblem) response = goodHistos/totalHistos;
    // printf("n histos %f - good ones %f ----> ratio %f , fatal response %i\n",totalHistos,goodHistos,goodHistos/totalHistos,(Int_t)fatalProblem);
     return response;
index c737809..5211f45 100644 (file)
 //
 
 #include "AliQAv1.h"
+#include "TPaveText.h"
 
 class AliITSQASPDChecker: public TObject {
 
 public:
-  AliITSQASPDChecker():fSubDetOffset(0),fStepBitSPD(NULL),fLowSPDValue(NULL),fHighSPDValue(NULL) {;} 
+  AliITSQASPDChecker();
   AliITSQASPDChecker& operator = (const AliITSQASPDChecker& qac) ; //operator =
-  virtual ~AliITSQASPDChecker() {if(fStepBitSPD) delete[] fStepBitSPD ;if(fLowSPDValue)delete[]fLowSPDValue;if(fHighSPDValue) delete[]fHighSPDValue;} // dtor
+  virtual ~AliITSQASPDChecker(); // dtor
   virtual Double_t Check(AliQAv1::ALITASK_t index, TObjArray * list, const AliDetectorRecoParam * recoParam);
   Double_t CheckRawData(const TObjArray *list);
   void SetTaskOffset(Int_t TaskOffset);
-
+  
   void SetStepBit(const Double_t *steprange);
   Double_t *GetStepBit() const {return fStepBitSPD;};
   void SetSPDLimits(const Float_t *lowvalue, const Float_t * highvalue);
@@ -35,8 +36,10 @@ private:
   Double_t *fStepBitSPD;         // parameter interface for ITS final QA
   Float_t *fLowSPDValue;         // lower limits for QA bit settings
   Float_t *fHighSPDValue;        // lower limits for QA bit settings
+  
+  TPaveText * fDisplayStatus[6]; //Online Comments for the DQM-shifter histos 
 
-  ClassDef(AliITSQASPDChecker,2)  // description 
+  ClassDef(AliITSQASPDChecker,3)  // description 
 
 };
 
index 5e1e0bc..6eba299 100644 (file)
@@ -133,10 +133,16 @@ void AliITSQASPDDataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObj
   ((TH2I*)list->At(5+shift))->Reset(); // clean up MEB histo (needed at the first cycle for small statistics)
   
    ((TH1F*)list->At(7+shift))->Divide(((TH1F*)list->At(1+shift)),((TH1F*)list->At(0+shift)));
-   ((TH1F*)list->At(8+shift))->Divide(((TH1F*)list->At(2+shift)),((TH1F*)list->At(0+shift)));
-   ((TH1F*)list->At(9+shift))->Divide(((TH1F*)list->At(3+shift)),((TH1F*)list->At(4+shift)));
+   ((TH1F*)list->At(8+shift))->Divide(((TH1F*)list->At(2+shift)),((TH1F*)list->At(0+shift)));// missing FO ratio (per event)
+   ((TH1F*)list->At(9+shift))->Divide(((TH1F*)list->At(3+shift)),((TH1F*)list->At(4+shift)));// noisy FO ratio   (per event)
  
   for(Int_t i=0; i<1200; i++){
+  // threshold for protection in case of technical runs (->few entries per chip)
+   Short_t thre=20; // 20 is ok in run 104792 (where the problem occured).
+   if((((TH1F*)list->At(0+shift)))->GetBinContent(i+1)<thre) continue; // expected FO yield
+   if((((TH1F*)list->At(4+shift)))->GetBinContent(i+1)<thre) continue; // the total FO yield.
+
+    
   if(((TH1F*)list->At(8+shift))->GetBinContent(i+1)>0.5 && ((TH1F*)list->At(9+shift))->GetBinContent(i+1)>0.5){
    Int_t eq=i/60;
    Int_t hs=(i%60)/10;
@@ -211,8 +217,8 @@ Int_t AliITSQASPDDataMakerRec::InitRaws()
    hSPDChipsMEB->GetXaxis()->SetNdivisions(60,kFALSE);
    hSPDChipsMEB->GetYaxis()->SetTitle("SIDE C   ->   SIDE A           Chip");
    hSPDChipsMEB->GetYaxis()->SetNdivisions(20,kFALSE);
-   hSPDChipsMEB->SetMarkerStyle(21);
-   hSPDChipsMEB->SetMarkerColor(kRed);
+   hSPDChipsMEB->SetOption("COLZ");
+   hSPDChipsMEB->UseCurrentStyle();
    for(Int_t ibinx =0; ibinx< hSPDChipsMEB->GetNbinsX(); ibinx++){
    if(ibinx%6==0) hSPDChipsMEB->GetXaxis()->SetBinLabel(ibinx+1,Form("Sector %i__%i",ibinx/6,ibinx%6));
    else hSPDChipsMEB->GetXaxis()->SetBinLabel(ibinx+1,Form("%i",ibinx%6));
@@ -227,6 +233,8 @@ Int_t AliITSQASPDDataMakerRec::InitRaws()
   TH2F *hFastOrCorrelation = new TH2F("SPDFastOrCorrelation_OnlineSPD","Fast Or multiplicity correlation - SPD",100,0.,100.,100,0,100);
   hFastOrCorrelation->GetXaxis()->SetTitle("Layer 1");
   hFastOrCorrelation->GetYaxis()->SetTitle("Layer 2");
+  hFastOrCorrelation->SetOption("COLZ");
+  hFastOrCorrelation->UseCurrentStyle();
   rv = fAliITSQADataMakerRec->Add2RawsList(hFastOrCorrelation, 6+shift, !expert, image, !saveCorr);
   fSPDhRawsTask++;
 // 7
@@ -259,6 +267,8 @@ Int_t AliITSQASPDDataMakerRec::InitRaws()
   TH2F *herrorsAll = new TH2F("SPDErrorsAll_OnlineSPD","Error codes - SPD",20,-0.5,19.5,22,-0.5,21.5);
   herrorsAll->GetXaxis()->SetTitle("DDL");
   herrorsAll->GetYaxis()->SetTitle("Error Type");
+  herrorsAll->SetOption("COLZ");
+  herrorsAll->UseCurrentStyle();
   rv = fAliITSQADataMakerRec->Add2RawsList(herrorsAll, kAmoreFoOffset+shift, !expert, image, !saveCorr);
   fSPDhRawsTask++;
 //11-30
@@ -354,7 +364,8 @@ Int_t AliITSQASPDDataMakerRec::InitRaws()
   if(ibiny < 10) hFastOrMapStaveChip->GetYaxis()->SetBinLabel(ibiny+1,Form("%i",ibiny));
   else hFastOrMapStaveChip->GetYaxis()->SetBinLabel(ibiny+1,Form("%i",19-ibiny));
   }
-  hFastOrMapStaveChip->SetDrawOption("colz");
+  hFastOrMapStaveChip->SetOption("COLZ");
+  hFastOrMapStaveChip->UseCurrentStyle();
   rv = fAliITSQADataMakerRec->Add2RawsList(hFastOrMapStaveChip, 28+offset, !expert, image, !saveCorr);
   fSPDhRawsTask++;
 // 29
@@ -377,6 +388,8 @@ Int_t AliITSQASPDDataMakerRec::InitRaws()
   else hHitMapHalfStaveChipInner->GetYaxis()->SetBinLabel(ibiny+1,Form("%i",ibiny%2));
   hHitMapHalfStaveChipInner->GetYaxis()->SetTitleOffset(1.4);
   }
+  hHitMapHalfStaveChipInner->SetOption("COLZ");
+  hHitMapHalfStaveChipInner->UseCurrentStyle();
   rv = fAliITSQADataMakerRec->Add2RawsList(hHitMapHalfStaveChipInner, 30+offset, !expert, image, !saveCorr);
   fSPDhRawsTask++;
 // 31
@@ -393,6 +406,8 @@ Int_t AliITSQASPDDataMakerRec::InitRaws()
   else hHitMapHalfStaveChipOuter->GetYaxis()->SetBinLabel(ibiny+1,Form("%i",ibiny%4+2));
   hHitMapHalfStaveChipOuter->GetYaxis()->SetTitleOffset(1.4);
   }
+  hHitMapHalfStaveChipOuter->SetOption("COLZ");
+  hHitMapHalfStaveChipOuter->UseCurrentStyle();
   rv = fAliITSQADataMakerRec->Add2RawsList(hHitMapHalfStaveChipOuter, 31+offset, !expert, image, !saveCorr);
   fSPDhRawsTask++;
 // 32