]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TOF/AliTOFQADataMakerSim.cxx
Merging of the three alignment macros into one
[u/mrichter/AliRoot.git] / TOF / AliTOFQADataMakerSim.cxx
index caac702b7c1ce3f5bc0fc742ff6999dfbf25533b..bd7896ad771d2890646a5e82a998e0e623f7be9b 100644 (file)
@@ -78,21 +78,24 @@ void AliTOFQADataMakerSim::InitHits()
   //
   // create Hits histograms in Hits subdir
   //
+
+  Bool_t expert = kFALSE;
+
   TH1F * h0 = new TH1F("hTOFHits",    "Number of TOF Hits ",301, -1.02, 5.) ; 
   h0->Sumw2() ;
-  Add2HitsList(h0, 0) ;
+  Add2HitsList(h0, 0, expert) ;
 
   TH1F * h1  = new TH1F("hTOFHitsTime", "Hits Time Spectrum in TOF (ns)", 2000, 0., 200) ; 
   h1->Sumw2() ;
-  Add2HitsList(h1, 1) ;
+  Add2HitsList(h1, 1, expert) ;
 
   TH1F * h2  = new TH1F("hTOFHitsLength", "Length Spectrum in TOF (cm)", 500, 0., 500) ; 
   h2->Sumw2() ;
-  Add2HitsList(h2, 2) ;
+  Add2HitsList(h2, 2, expert) ;
 
   TH2F * h3  = new TH2F("hTOFHitsClusMap","Hits vs TOF eta-phi",183, -0.5, 182.5,865,-0.5,864.5) ; 
   h3->Sumw2() ;
-  Add2HitsList(h3, 3) ;
+  Add2HitsList(h3, 3, expert) ;
 }
 
 //____________________________________________________________________________ 
@@ -101,20 +104,23 @@ void AliTOFQADataMakerSim::InitDigits()
   //
   // create Digits histograms in Digits subdir
   //
+
+  Bool_t expert = kFALSE;
+
   TH1F * h0 = new TH1F("hTOFDigits",    "Number of TOF Digits ",301, -1.02, 5.) ;   h0->Sumw2() ;
-  Add2DigitsList(h0, 0) ;
+  Add2DigitsList(h0, 0, expert) ;
 
   TH1F * h1  = new TH1F("hTOFDigitsTime", "Digits Time Spectrum in TOF (ns)", 2000, 0., 200) ; 
   h1->Sumw2() ;
-  Add2DigitsList(h1, 1) ;
+  Add2DigitsList(h1, 1, expert) ;
 
   TH1F * h2  = new TH1F("hTOFDigitsToT", "Digits ToT Spectrum in TOF (ns)", 500, 0., 50) ; 
   h2->Sumw2() ;
-  Add2DigitsList(h2, 2) ;
+  Add2DigitsList(h2, 2, expert) ;
 
   TH2F * h3  = new TH2F("hTOFDigitsClusMap","Digits vs TOF eta-phi",183, -0.5, 182.5,865,-0.5,864.5) ; 
   h3->Sumw2() ;
-  Add2DigitsList(h3, 3) ;
+  Add2DigitsList(h3, 3, expert) ;
 
 }
 
@@ -124,16 +130,19 @@ void AliTOFQADataMakerSim::InitSDigits()
   //
   // create SDigits histograms in SDigits subdir
   //
+
+  Bool_t expert = kFALSE;
+
   TH1F * h0 = new TH1F("hTOFSDigits",    "Number of TOF SDigits ",301, -1.02, 5.) ;   h0->Sumw2() ;
-  Add2SDigitsList(h0, 0) ;
+  Add2SDigitsList(h0, 0, expert) ;
 
   TH1F * h1  = new TH1F("hTOFSDigitsTime", "SDigits Time Spectrum in TOF (ns)", 2000, 0., 200) ; 
   h1->Sumw2() ;
-  Add2SDigitsList(h1, 1) ;
+  Add2SDigitsList(h1, 1, expert) ;
 
   TH2F * h2  = new TH2F("hTOFSDigitsClusMap","SDigits vs TOF eta-phi",183, -0.5, 182.5,865,-0.5,864.5) ; 
   h2->Sumw2() ;
-  Add2SDigitsList(h2, 2) ;
+  Add2SDigitsList(h2, 2, expert) ;
 
 }
 
@@ -190,8 +199,12 @@ void AliTOFQADataMakerSim::MakeHits(TTree * hitTree)
     return;
   }
 
-  TClonesArray * hits = new TClonesArray("AliTOFhitT0", 1000);
-  TClonesArray * dummy = new TClonesArray("AliTOFhitT0", 1000);
+  static TClonesArray statichits("AliTOFhitT0", 1000);
+  statichits.Clear();
+  TClonesArray *hits = &statichits;
+  static TClonesArray staticdummy("AliTOFhitT0", 1000);
+  staticdummy.Clear();
+  TClonesArray *dummy = &staticdummy;
   branch->SetAddress(&dummy);
   Int_t index = 0 ;  
   for (Int_t ientry = 0 ; ientry < branch->GetEntries() ; ientry++) {
@@ -203,8 +216,6 @@ void AliTOFQADataMakerSim::MakeHits(TTree * hitTree)
     } 
   }    
 
-  dummy->Delete();
-  delete dummy;
   MakeHits(hits) ; 
 
 }
@@ -327,7 +338,7 @@ void AliTOFQADataMakerSim::StartOfDetectorCycle()
 }
 
 //____________________________________________________________________________ 
-void AliTOFQADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX task, TObjArray * list)
+void AliTOFQADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray ** list)
 {
   //Detector specific actions at end of cycle
   // do the QA checking