]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TOF/AliTOFQADataMakerRec.cxx
Coding convention violations: suppression
[u/mrichter/AliRoot.git] / TOF / AliTOFQADataMakerRec.cxx
index 1938a8cfda6661066da5c08c966621c1c2bd913b..ef18d79a6107ea543bcf44fe0bfe316e8528df56 100644 (file)
@@ -88,7 +88,7 @@ void AliTOFQADataMakerRec::InitRaws()
   h0->Sumw2() ;
   Add2RawsList(h0, 0, !expert, image, !saveCorr) ;
 
-  TH1F * h1  = new TH1F("hTOFRawsTime", "Raws Time Spectrum in TOF (ns);Measured TOF time [ns];Counts", 2000, 0., 200) ; 
+  TH1F * h1  = new TH1F("hTOFRawsTime", "Raws Time Spectrum in TOF (ns);Measured TOF time [ns];Counts", 20000, 0., 2000) ; 
   h1->Sumw2() ;
   Add2RawsList(h1, 1, !expert, image, !saveCorr) ;
 
@@ -117,7 +117,7 @@ void AliTOFQADataMakerRec::InitDigits()
   h0->Sumw2() ;
   Add2DigitsList(h0, 0, !expert, image) ;
   
-  TH1F * h1  = new TH1F("hTOFDigitsTime", "Digits Time Spectrum in TOF (ns);Digitized TOF time [ns];Counts", 2000, 0., 200) ; 
+  TH1F * h1  = new TH1F("hTOFDigitsTime", "Digits Time Spectrum in TOF (ns);Digitized TOF time [ns];Counts", 20000, 0., 2000) ; 
   h1->Sumw2() ;
   Add2DigitsList(h1, 1, !expert, image) ;
   
@@ -129,7 +129,6 @@ void AliTOFQADataMakerRec::InitDigits()
   h3->Sumw2() ;
   h3->GetYaxis()->SetTitleOffset(1.15);
   Add2DigitsList(h3, 3, !expert, image) ;
-  
 }
 
 //____________________________________________________________________________ 
@@ -141,16 +140,16 @@ void AliTOFQADataMakerRec::InitRecPoints()
 
   const Bool_t expert   = kTRUE ; 
   const Bool_t image    = kTRUE ; 
-  
+
   TH1F * h0 = new TH1F("hTOFRecPoints",    "Number of TOF RecPoints;TOF recPoint number [10 power];Counts",301, -1.02, 5.) ;
   h0->Sumw2() ;
   Add2RecPointsList(h0, 0, !expert, image) ;
 
-  TH1F * h1  = new TH1F("hTOFRecPointsTime", "RecPoints Time Spectrum in TOF (ns);Calibrated TOF time [ns];Counts", 2000, 0., 200) ; 
+  TH1F * h1  = new TH1F("hTOFRecPointsTime", "RecPoints Time Spectrum in TOF (ns);Calibrated TOF time [ns];Counts", 20000, 0., 2000) ; 
   h1->Sumw2() ;
   Add2RecPointsList(h1, 1, !expert, image) ;
 
-  TH1F * h2  = new TH1F("hTOFRecPointsRawTime", "RecPoints raw Time Spectrum in TOF (ns);Measured TOF time [ns];Counts", 2000, 0., 200) ; 
+  TH1F * h2  = new TH1F("hTOFRecPointsRawTime", "RecPoints raw Time Spectrum in TOF (ns);Measured TOF time [ns];Counts", 20000, 0., 2000) ; 
   h2->Sumw2() ;
   Add2RecPointsList(h2, 2, !expert, image) ;
 
@@ -162,7 +161,6 @@ void AliTOFQADataMakerRec::InitRecPoints()
   h4->Sumw2() ;
   h4->GetYaxis()->SetTitleOffset(1.15);
   Add2RecPointsList(h4, 4, !expert, image) ;
-
 }
 
 //____________________________________________________________________________ 
@@ -178,11 +176,11 @@ void AliTOFQADataMakerRec::InitESDs()
   h0->Sumw2() ; 
   Add2ESDsList(h0, 0, !expert, image) ;
 
-  TH1F * h1  = new TH1F("hTOFESDsTime", "Time Spectrum in TOF (ns);Calibrated TOF time [ns];Counts", 2000, 0., 200) ; 
+  TH1F * h1  = new TH1F("hTOFESDsTime", "Time Spectrum in TOF (ns);Calibrated TOF time [ns];Counts", 20000, 0., 2000) ; 
   h1->Sumw2() ;
   Add2ESDsList(h1, 1, !expert, image) ;
 
-  TH1F * h2  = new TH1F("hTOFESDsRawTime", "raw Time Spectrum in TOF (ns);Measured TOF time [ns];Counts", 2000, 0., 200) ; 
+  TH1F * h2  = new TH1F("hTOFESDsRawTime", "raw Time Spectrum in TOF (ns);Measured TOF time [ns];Counts", 20000, 0., 2000) ; 
   h2->Sumw2() ;
   Add2ESDsList(h2, 2, !expert, image) ;
 
@@ -201,7 +199,7 @@ void AliTOFQADataMakerRec::MakeRaws(AliRawReader* rawReader)
   //
   // makes data from Raws
   //
-
+  
   Double_t tdc2ns=AliTOFGeometry::TdcBinWidth()*1E-3;
   Double_t tot2ns=AliTOFGeometry::ToTBinWidth()*1E-3;
 
@@ -248,24 +246,25 @@ void AliTOFQADataMakerRec::MakeRaws(AliRawReader* rawReader)
 }
 
 //____________________________________________________________________________
-void AliTOFQADataMakerRec::MakeDigits(TClonesArray * digits)
+void AliTOFQADataMakerRec::MakeDigits()
 {
   //
   // makes data from Digits
   //
   Double_t tdc2ns=AliTOFGeometry::TdcBinWidth()*1E-3;
   Double_t tot2ns=AliTOFGeometry::ToTBinWidth()*1E-3;
   Int_t in[5];
   Int_t out[5];
   
-  Int_t nentries=digits->GetEntriesFast();
+  Int_t nentries=fDigitsArray->GetEntriesFast();
   if(nentries<=0){
     GetDigitsData(0)->Fill(-1.) ; 
   }else{
     GetDigitsData(0)->Fill(TMath::Log10(nentries)) ; 
   } 
   
-  TIter next(digits) ; 
+  TIter next(fDigitsArray) ; 
   AliTOFdigit * digit ; 
   while ( (digit = dynamic_cast<AliTOFdigit *>(next())) ) {
     
@@ -280,7 +279,6 @@ void AliTOFQADataMakerRec::MakeDigits(TClonesArray * digits)
       GetMapIndeces(in,out);
       GetDigitsData(3)->Fill( out[0],out[1]) ;//digit map
   }
-  
 }
 
 //____________________________________________________________________________
@@ -289,16 +287,20 @@ void AliTOFQADataMakerRec::MakeDigits(TTree * digitTree)
   //
   // makes data from Digit Tree
   //
-  TClonesArray * digits = new TClonesArray("AliTOFdigit", 1000) ; 
+  
+  if (fDigitsArray) 
+    fDigitsArray->Clear() ; 
+  else
+    fDigitsArray = new TClonesArray("AliTOFdigit", 1000) ; 
   
   TBranch * branch = digitTree->GetBranch("TOF") ;
   if ( ! branch ) {
     AliError("TOF branch in Digit Tree not found") ; 
     return;
   }
-  branch->SetAddress(&digits) ;
+  branch->SetAddress(&fDigitsArray) ;
   branch->GetEntry(0) ; 
-  MakeDigits(digits) ; 
+  MakeDigits() ; 
 }
 
 //____________________________________________________________________________
@@ -307,7 +309,7 @@ void AliTOFQADataMakerRec::MakeRecPoints(TTree * clustersTree)
   //
   // Make data from Clusters
   //
-
   Double_t tdc2ns=AliTOFGeometry::TdcBinWidth()*1E-3;
   Double_t tot2ns=AliTOFGeometry::ToTBinWidth()*1E-3;
 
@@ -360,6 +362,7 @@ void AliTOFQADataMakerRec::MakeESDs(AliESDEvent * esd)
   //
   // make QA data from ESDs
   //  
+  
   Int_t ntrk = esd->GetNumberOfTracks() ; 
   Int_t ntof=0;
   Int_t ntofpid=0;
@@ -391,7 +394,6 @@ void AliTOFQADataMakerRec::MakeESDs(AliESDEvent * esd)
     Float_t ratio = (Float_t)ntofpid/(Float_t)ntof*100.;
     GetESDsData(4)->Fill(ratio) ;
   }
-
 }
 
 //____________________________________________________________________________ 
@@ -407,7 +409,6 @@ void AliTOFQADataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArr
 {
   //Detector specific actions at end of cycle
   // do the QA checking
-
   AliQAChecker::Instance()->Run(AliQAv1::kTOF, task, list) ;  
 }
 //____________________________________________________________________________