]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCdataQA.cxx
Updates to keep temperature/pressure maps in CE entry. Also limit map periods to...
[u/mrichter/AliRoot.git] / TPC / AliTPCdataQA.cxx
index b9f61b5415e8e246bac7df30fc231652303b868d..bfaf56c66a52400b7d10634db6ebae6b2ab7a8e5 100644 (file)
@@ -223,14 +223,22 @@ AliTPCdataQA::AliTPCdataQA(const AliTPCdataQA &ped) : /*FOLD00*/
     fOverThreshold20  = new AliTPCCalPad(*ped.GetOverThreshold20());
   if(ped.GetOverThreshold30())
     fOverThreshold30  = new AliTPCCalPad(*ped.GetOverThreshold30());
-  if(ped.GetHistQVsTimeSideA())
+  if(ped.GetHistQVsTimeSideA()) {
     fHistQVsTimeSideA = new TProfile(*ped.GetHistQVsTimeSideA());
-  if(ped.GetHistQVsTimeSideC())
+    fHistQVsTimeSideA->SetDirectory(0);
+  }
+  if(ped.GetHistQVsTimeSideC()) {
     fHistQVsTimeSideC = new TProfile(*ped.GetHistQVsTimeSideC());
-  if(ped.GetHistQMaxVsTimeSideA())
+    fHistQVsTimeSideC->SetDirectory(0);
+  }
+  if(ped.GetHistQMaxVsTimeSideA()) {
     fHistQMaxVsTimeSideA = new TProfile(*ped.GetHistQMaxVsTimeSideA());
-  if(ped.GetHistQMaxVsTimeSideC())
+    fHistQMaxVsTimeSideA->SetDirectory(0);
+  }
+  if(ped.GetHistQMaxVsTimeSideC()) {
     fHistQMaxVsTimeSideC = new TProfile(*ped.GetHistQMaxVsTimeSideC());
+    fHistQMaxVsTimeSideC->SetDirectory(0);
+  }
 }
 
 //_____________________________________________________________________
@@ -375,9 +383,8 @@ Bool_t AliTPCdataQA::ProcessEvent(AliRawReader *rawReader)
   //
   //  Event processing loop - AliRawReader
   //
-  AliTPCRawStreamV3 *rawStreamV3 = new AliTPCRawStreamV3(rawReader, (AliAltroMapping**)fMapping);
-  Bool_t res=ProcessEvent(rawStreamV3);
-  delete rawStreamV3;
+  AliTPCRawStreamV3 rawStreamV3(rawReader, (AliAltroMapping**)fMapping);
+  Bool_t res=ProcessEvent(&rawStreamV3);
   if(res)
     fEventCounter++; // only increment event counter if there is TPC data
   return res;
@@ -431,13 +438,12 @@ Bool_t AliTPCdataQA::ProcessEventFast(AliRawReader *rawReader)
   //
   //  Event processing loop - AliRawReader
   //
-  AliTPCRawStreamFast *rawStreamFast = new AliTPCRawStreamFast(rawReader, (AliAltroMapping**)fMapping);
-  Bool_t res=ProcessEventFast(rawStreamFast);
+  AliTPCRawStreamFast rawStreamFast(rawReader, (AliAltroMapping**)fMapping);
+  Bool_t res=ProcessEventFast(&rawStreamFast);
   if(res)
     fEventCounter++; // only increment event counter if there is TPC data
                      // otherwise Analyse (called in QA) fails
 
-  delete rawStreamFast;
   return res;
 }
 
@@ -511,9 +517,8 @@ Bool_t AliTPCdataQA::ProcessEvent(eventHeaderStruct *event)
   //  process date event
   //
 
-  AliRawReader *rawReader = new AliRawReaderDate((void*)event);
-  Bool_t result=ProcessEvent(rawReader);
-  delete rawReader;
+  AliRawReaderDate rawReader((void*)event);
+  Bool_t result=ProcessEvent(&rawReader);
   return result;
 }
 
@@ -574,15 +579,23 @@ Int_t AliTPCdataQA::Update(const Int_t iSector, /*FOLD00*/
   if (!fOverThreshold10) fOverThreshold10 = new AliTPCCalPad("OverThreshold10","OverThreshold10");
   if (!fOverThreshold20) fOverThreshold20 = new AliTPCCalPad("OverThreshold20","OverThreshold20");
   if (!fOverThreshold30) fOverThreshold30 = new AliTPCCalPad("OverThreshold30","OverThreshold30");
-  if (!fHistQVsTimeSideA)
+  if (!fHistQVsTimeSideA) {
     fHistQVsTimeSideA  = new TProfile("hQVsTimeSideA", "Q vs time (side A); Time [Timebin]; Q [ADC ch]", 100, 0, 1000);
-  if (!fHistQVsTimeSideC)
+    fHistQVsTimeSideA->SetDirectory(0);
+  }
+  if (!fHistQVsTimeSideC) {
     fHistQVsTimeSideC  = new TProfile("hQVsTimeSideC", "Q vs time (side C); Time [Timebin]; Q [ADC ch]", 100, 0, 1000);
-  if (!fHistQMaxVsTimeSideA)
+    fHistQVsTimeSideC->SetDirectory(0);
+  }
+  if (!fHistQMaxVsTimeSideA) {
     fHistQMaxVsTimeSideA  = new TProfile("hQMaxVsTimeSideA", "Q_{MAX} vs time (side A); Time [Timebin]; Q_{MAX} [ADC ch]", 100, 0, 1000);
-  if (!fHistQMaxVsTimeSideC)
+    fHistQMaxVsTimeSideA->SetDirectory(0);
+  }
+  if (!fHistQMaxVsTimeSideC) {
     fHistQMaxVsTimeSideC  = new TProfile("hQMaxVsTimeSideC", "Q_{MAX} vs time (side C); Time [Timebin]; Q_{MAX} [ADC ch]", 100, 0, 1000);
-  
+    fHistQMaxVsTimeSideC->SetDirectory(0);
+  }
+
   // Make the arrays for expanding the data
 
   if (!fAllBins)