]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
a/ AliTRDCalibChamberStatus (in ProcessEvent the warning and in Check trying to fix...
authorcblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 13 Apr 2010 13:57:30 +0000 (13:57 +0000)
committercblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 13 Apr 2010 13:57:30 +0000 (13:57 +0000)
b/ AliTRDCalChamberStatus.cxx and .h in the Cal directory for the plot function.

TRD/AliTRDCalibChamberStatus.cxx
TRD/Cal/AliTRDCalChamberStatus.cxx
TRD/Cal/AliTRDCalChamberStatus.h

index 38b9810d74ae6d993b88a9ec7fd42c900ebfa71f..299c3800361164ba3f20f4dc5ba8907284ce5766 100644 (file)
@@ -262,6 +262,7 @@ void AliTRDCalibChamberStatus::ProcessEvent(AliRawReader * rawReader, Int_t neve
   Bool_t notEmpty = kFALSE;
     
   AliTRDrawFastStream *rawStream = new AliTRDrawFastStream(rawReader);
+  rawStream->SetNoErrorWarning();
   rawStream->SetSharedPadReadout(kFALSE);
 
   AliTRDdigitsManager *digitsManager = new AliTRDdigitsManager(kTRUE);
@@ -455,14 +456,18 @@ void AliTRDCalibChamberStatus::CheckEORStatus(AliTRDCalDCS *calDCS) /*FOLD00*/
     if(stateB!=3 && stateB!=9) rphi = 2;
     vals[3] = rphi;
     if(rphi!=-1) fHnSparseHCM->Fill(&vals[0]);
-    
+
     //---------//
     //  Debug  //
     if(fDebugLevel > 0) {
       if( ((fCalChamberStatus->GetStatus(det) <= 1) && (stateA!=3 && stateA!=9)) || 
          ((fCalChamberStatus->GetStatus(det) <= 1) && (stateB!=3 && stateB!=9)) || 
-         ((fCalChamberStatus->GetStatus(det) >= 2) && (stateA==3 || stateA==9)) || 
-         ((fCalChamberStatus->GetStatus(det) >= 2) && (stateB==3 || stateB==9))  )
+         ((fCalChamberStatus->GetStatus(det) == 2) && (stateA==3 || stateA==9)) || 
+         ((fCalChamberStatus->GetStatus(det) == 2) && (stateB==3 || stateB==9)) ||
+         ((fCalChamberStatus->GetStatus(det) == 3) && (stateA==3 || stateA==9)) ||
+          ((fCalChamberStatus->GetStatus(det) == 3) && (stateB!=3 && stateB!=9)) ||
+         ((fCalChamberStatus->GetStatus(det) == 4) && (stateB==3 || stateB==9)) ||
+         ((fCalChamberStatus->GetStatus(det) == 4) && (stateA!=3 && stateA!=9)) )
        {
          //printf(" Different half chamber status in DCS and DATA!!\n");
          Double_t val[4] = {sm,lay,stac,1};
@@ -482,6 +487,44 @@ void AliTRDCalibChamberStatus::CheckEORStatus(AliTRDCalDCS *calDCS) /*FOLD00*/
     }
     //---------//
     //  Debug  //
+
+    //////////////////////////////////////////
+    // Change the status according to DCS
+    ///////////////////////////////////////////
+
+    // First put bad status if seen by DCS
+    /////////////////////////////////////////
+    if(stateA!=3 && stateA!=9 && stateB!=3 && stateB!=9) {
+      // completely masked from DCS
+      fCalChamberStatus->SetStatus(det,2);
+    }
+    if((stateA!=3 && stateA!=9) && (stateB==3 || stateB==9)) {
+      // Only A side masked from DCS
+      if(fCalChamberStatus->GetStatus(det) != 3) {
+       // But not from Data 
+       if(fCalChamberStatus->GetStatus(det) == 4) fCalChamberStatus->SetStatus(det,2);
+       if(fCalChamberStatus->GetStatus(det) <= 1) fCalChamberStatus->SetStatus(det,3);
+      }
+    }
+    if((stateA==3 || stateA==9) && (stateB!=3 && stateB!=9)) {
+      // Only B side masked from DCS
+      if(fCalChamberStatus->GetStatus(det) != 4) {
+       // But not from Data 
+       if(fCalChamberStatus->GetStatus(det) == 3) fCalChamberStatus->SetStatus(det,2);
+       if(fCalChamberStatus->GetStatus(det) <= 1) fCalChamberStatus->SetStatus(det,4);
+      }
+    }
+
+    // Then release in case of error 3 from DCS
+    /////////////////////////////////////////////
+    if(fCalChamberStatus->GetStatus(det)==2) {
+      if((stateA==3) && (stateB==3)) fCalChamberStatus->SetStatus(det,1);
+      if((stateA==3) && (stateB!=3)) fCalChamberStatus->SetStatus(det,4);
+      if((stateA!=3) && (stateB==3)) fCalChamberStatus->SetStatus(det,3);
+    }
+    if((fCalChamberStatus->GetStatus(det)==3) && (stateA==3)) fCalChamberStatus->SetStatus(det,1);
+    if((fCalChamberStatus->GetStatus(det)==4) && (stateB==3)) fCalChamberStatus->SetStatus(det,1);
+    
   }
 
 }
index 2850c988ee11f82c7710923ef85160c39729f949..a79bec1c5add3ff0d968dd94fdb144d7597c34f4 100644 (file)
@@ -54,14 +54,14 @@ AliTRDCalChamberStatus::AliTRDCalChamberStatus(const Text_t *name, const Text_t
 
 }
 //_____________________________________________________________________________
-TH2D* AliTRDCalChamberStatus::Plot(Int_t sm, Int_t rphi
+TH2D* AliTRDCalChamberStatus::Plot(Int_t sm) 
 {
   //
   // Plot chamber status for supermodule and halfchamberside 
   // as a function of layer and stack
   //
 
-  TH2D *h2 = new TH2D(Form("sm_%d_rphi_%d",sm,rphi),Form("sm_%d_rphi_%d",sm,rphi),5,0.0,5.0,6,0.0,6.0);
+  TH2D *h2 = new TH2D(Form("sm_%d",sm),Form("sm_%d",sm),5,0.0,5.0,6,0.0,6.0);
   
   h2->SetXTitle("stack");
   h2->SetYTitle("layer");
@@ -73,17 +73,10 @@ TH2D* AliTRDCalChamberStatus::Plot(Int_t sm, Int_t rphi)
     Int_t layer  = i%6;
     Int_t stack  = static_cast<int>((i-start)/6.);
     Int_t status = GetStatus(i);
-    if(rphi == 0) {    
-      if(status!=4) h2->Fill(stack,layer,status);
-    }
-    else if(rphi == 1) {
-      if(status!=3) h2->Fill(stack,layer,status);
-    }
-    
+    h2->Fill(stack,layer,status);
   }
 
   return h2;
 
 }
 
-
index 05b96fe692d9c0b932e282df56e5e70d0c90fc60..bf0cb488d958a4ef48c0f0b03f0106f5993b6024 100644 (file)
@@ -32,7 +32,7 @@ class AliTRDCalChamberStatus : public TNamed {
   Bool_t IsHalfChamberSideAMasked(Int_t det) const     { return (GetStatus(det) == kHalfChamberSideAMasked)    ? kTRUE : kFALSE; }
   Bool_t IsHalfChamberSideBMasked(Int_t det) const     { return (GetStatus(det) == kHalfChamberSideBMasked)    ? kTRUE : kFALSE; }
 
-  TH2D *Plot(Int_t sm, Int_t rphi);          // Plot fStatus for sm and halfchamberside
+  TH2D *Plot(Int_t sm);                     // Plot fStatus for sm 
 
 
  protected:
@@ -45,4 +45,3 @@ class AliTRDCalChamberStatus : public TNamed {
 
 #endif
 
-