]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/Cal/AliTRDCalChamberStatus.cxx
Reduce memory consumption
[u/mrichter/AliRoot.git] / TRD / Cal / AliTRDCalChamberStatus.cxx
index bf9192116c94a11b225c47a0ea75d016a97e9504..a79bec1c5add3ff0d968dd94fdb144d7597c34f4 100644 (file)
@@ -21,6 +21,7 @@
 //                                                                           //
 ///////////////////////////////////////////////////////////////////////////////
 
+#include "TH2D.h"
 #include "AliTRDCalChamberStatus.h"
 
 ClassImp(AliTRDCalChamberStatus)
@@ -52,4 +53,30 @@ AliTRDCalChamberStatus::AliTRDCalChamberStatus(const Text_t *name, const Text_t
   }
 
 }
+//_____________________________________________________________________________
+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",sm),Form("sm_%d",sm),5,0.0,5.0,6,0.0,6.0);
+  
+  h2->SetXTitle("stack");
+  h2->SetYTitle("layer");
+
+  Int_t start = sm*30;
+  Int_t end = (sm+1)*30;
+  
+  for(Int_t i=start; i<end; i++) {
+    Int_t layer  = i%6;
+    Int_t stack  = static_cast<int>((i-start)/6.);
+    Int_t status = GetStatus(i);
+    h2->Fill(stack,layer,status);
+  }
+
+  return h2;
+
+}