]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/AliTRDQADataMakerSim.cxx
Fixes for bug #49914: Compilation breaks in trunk, and bug #48629: Trunk cannot read...
[u/mrichter/AliRoot.git] / TRD / AliTRDQADataMakerSim.cxx
index 91e67fc18a988e0d5e617ece623ff5040399b8c0..86dd97cc6eb6e282e3368a4a3a26345e9ba5b3ad 100644 (file)
@@ -45,8 +45,9 @@
 #include "AliTRDQADataMakerSim.h"
 #include "AliTRDdigitsManager.h"
 #include "AliTRDgeometry.h"
-#include "AliTRDdataArrayS.h"
-//#include "AliTRDrawStreamTB.h"
+#include "AliTRDarrayADC.h"
+#include "AliTRDarraySignal.h"
+//#include "AliTRDrawStream.h"
 
 #include "AliQAChecker.h"
 
@@ -54,7 +55,7 @@ ClassImp(AliTRDQADataMakerSim)
 
 //____________________________________________________________________________ 
   AliTRDQADataMakerSim::AliTRDQADataMakerSim() : 
-  AliQADataMakerSim(AliQA::GetDetName(AliQA::kTRD), "TRD Quality Assurance Data Maker")
+  AliQADataMakerSim(AliQAv1::GetDetName(AliQAv1::kTRD), "TRD Quality Assurance Data Maker")
 {
   //
   // Default constructor
@@ -87,7 +88,7 @@ AliTRDQADataMakerSim& AliTRDQADataMakerSim::operator=(const AliTRDQADataMakerSim
 }
 
 //____________________________________________________________________________ 
-void AliTRDQADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list)
+void AliTRDQADataMakerSim::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray ** list)
 {
   //
   // Detector specific actions at end of cycle
@@ -96,7 +97,7 @@ void AliTRDQADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray
   //AliInfo(Form("EndOfCycle", "Fitting RecPoints %d", task));
 
   // call the checker
-  AliQAChecker::Instance()->Run(AliQA::kTRD, task, list) ;    
+  AliQAChecker::Instance()->Run(AliQAv1::kTRD, task, list) ;    
 
 
 }
@@ -218,6 +219,8 @@ void AliTRDQADataMakerSim::MakeHits(TTree * hitTree)
   tmp->Delete();
   delete tmp;
   MakeHits(hits);
+  hits->Delete();
+  delete hits;
 
 }
 
@@ -259,38 +262,36 @@ void AliTRDQADataMakerSim::MakeDigits(TTree * digits)
   TH1D *histTime = (TH1D*)GetDigitsData(1);
   TH1D *histSignal = (TH1D*)GetDigitsData(2);
 
-  for (Int_t i = 0; i < AliTRDgeometry::kNdet; i++) {
-
-    AliTRDdataArrayS *digitsIn = (AliTRDdataArrayS *) digitsManager->GetDigits(i);      
-
-    // This is to take care of switched off super modules
-    if (digitsIn->GetNtime() == 0) continue;
-
-    digitsIn->Expand();
-
-    //AliTRDSignalIndex* indexes = digitsManager->GetIndexes(i);
-    //if (indexes->IsAllocated() == kFALSE) digitsManager->BuildIndexes(i);
-
-    Int_t nRows = digitsIn->GetNrow();
-    Int_t nCols = digitsIn->GetNcol();
-    Int_t nTbins = digitsIn->GetNtime();
-
-    for(Int_t row = 0; row < nRows; row++) 
-      for(Int_t col = 0; col < nCols; col++) 
-       for(Int_t time = 0; time < nTbins; time++) {
-
-         Float_t signal = digitsIn->GetDataUnchecked(row,col,time);
-         if (signal < 1) continue;
-         histDet->Fill(i);
-         histTime->Fill(time);
-         histSignal->Fill(signal);
-       }
+  for (Int_t i = 0; i < AliTRDgeometry::kNdet; i++) 
+    {
+      AliTRDarrayADC *digitsIn = (AliTRDarrayADC *) digitsManager->GetDigits(i);      
+
+      // This is to take care of switched off super modules
+      if (digitsIn->GetNtime() == 0) continue;
+      
+      digitsIn->Expand();
+      
+      //AliTRDSignalIndex* indexes = digitsManager->GetIndexes(i);
+      //if (indexes->IsAllocated() == kFALSE) digitsManager->BuildIndexes(i);
+      
+      Int_t nRows = digitsIn->GetNrow();
+      Int_t nCols = digitsIn->GetNcol();
+      Int_t nTbins = digitsIn->GetNtime();
+      
+      for(Int_t row = 0; row < nRows; row++) 
+       for(Int_t col = 0; col < nCols; col++) 
+         for(Int_t time = 0; time < nTbins; time++) 
+           {   
+             Float_t signal = digitsIn->GetData(row,col,time);
+             if (signal < 1) continue;
+             histDet->Fill(i);
+             histTime->Fill(time);
+             histSignal->Fill(signal);
+           }
 
     //delete digitsIn;
   }
-
   delete digitsManager;
-
 }
 
 //____________________________________________________________________________
@@ -318,6 +319,7 @@ void AliTRDQADataMakerSim::MakeSDigits(TTree * digits)
   //
 
   AliTRDdigitsManager *digitsManager = new AliTRDdigitsManager();
+  digitsManager->SetSDigits(kTRUE);
   digitsManager->CreateArrays();
   digitsManager->ReadDigits(digits);
 
@@ -325,38 +327,38 @@ void AliTRDQADataMakerSim::MakeSDigits(TTree * digits)
   TH1D *histTime = (TH1D*)GetSDigitsData(1);
   TH1D *histSignal = (TH1D*)GetSDigitsData(2);
 
-  for (Int_t i = 0; i < AliTRDgeometry::kNdet; i++) {
-
-    AliTRDdataArrayS *digitsIn = (AliTRDdataArrayS *) digitsManager->GetDigits(i);      
-
+  for (Int_t i = 0; i < AliTRDgeometry::kNdet; i++) 
+    {
+      AliTRDarraySignal *digitsIn = (AliTRDarraySignal *) digitsManager->GetSDigits(i);
+  
     // This is to take care of switched off super modules
-    if (digitsIn->GetNtime() == 0) continue;
-
-    digitsIn->Expand();
-
-    //AliTRDSignalIndex* indexes = digitsManager->GetIndexes(i);
-    //if (indexes->IsAllocated() == kFALSE) digitsManager->BuildIndexes(i);
-
-    Int_t nRows = digitsIn->GetNrow();
-    Int_t nCols = digitsIn->GetNcol();
-    Int_t nTbins = digitsIn->GetNtime();
-
-    for(Int_t row = 0; row < nRows; row++) 
-      for(Int_t col = 0; col < nCols; col++) 
-       for(Int_t time = 0; time < nTbins; time++) {
-
-         Float_t signal = digitsIn->GetDataUnchecked(row,col,time);
-         if (signal < 1) continue;
-         histDet->Fill(i);
-         histTime->Fill(time);
-         histSignal->Fill(signal);
-       }
-
-    // delete digitsIn;
-  }
-
+      if (digitsIn->GetNtime() == 0) continue;
+      
+    digitsIn->Expand(); 
+      
+      //AliTRDSignalIndex* indexes = digitsManager->GetIndexes(i);
+      //if (indexes->IsAllocated() == kFALSE) digitsManager->BuildIndexes(i);
+      Int_t nRows = digitsIn->GetNrow();
+      Int_t nCols = digitsIn->GetNcol();
+      Int_t nTbins = digitsIn->GetNtime();
+
+      for(Int_t row = 0; row < nRows; row++) 
+       {
+         for(Int_t col = 0; col < nCols; col++) 
+           {
+             for(Int_t time = 0; time < nTbins; time++) 
+               {           
+                 Float_t signal = digitsIn->GetData(row,col,time);
+                 if (signal < 1) continue;
+                 histDet->Fill(i);
+                 histTime->Fill(time);
+                 histSignal->Fill(signal);
+               }
+           }
+       }
+      // delete digitsIn;
+    }
   delete digitsManager;
-
 }
 
 //____________________________________________________________________________