]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ESDCheck/AliAnalysisTaskPt.cxx
Speedup of the TransportBz() method (S. Gorbunov)
[u/mrichter/AliRoot.git] / ESDCheck / AliAnalysisTaskPt.cxx
index ab952801a43acf44ce9150172e7195d050b466e3..648e868e108298051c0e405b4116558b192b66a2 100644 (file)
@@ -27,6 +27,7 @@
 #include <TH1.h>
 #include <TROOT.h>
 #include <TSystem.h>
+#include <TString.h> 
 
 #include "AliAnalysisTaskPt.h"
 #include "AliESD.h"
 //________________________________________________________________________
 AliAnalysisTaskPt::AliAnalysisTaskPt(const char *name) :
   AliAnalysisTask(name,""),  
+  fChain(0),
   fESD(0), 
-  fhPt(0) 
+  fhPt(0),
+  fOutputContainer(0)
 {
   // Constructor.
   // Input slot #0 works with an Ntuple
@@ -73,6 +76,9 @@ void AliAnalysisTaskPt::ConnectInputData(Option_t *)
 void AliAnalysisTaskPt::CreateOutputObjects()
 {
   // create histograms 
+
+  OpenFile(0) ; 
+
   fhPt = new TH1F("fhPt","This is the Pt distribution",15,0.1,3.1);
   fhPt->SetStats(kTRUE);
   fhPt->GetXaxis()->SetTitle("P_{T} [GeV]");
@@ -121,6 +127,8 @@ void AliAnalysisTaskPt::Terminate(Option_t *)
 {
   // Processing when the event loop is ended
 
+  Bool_t problem=kFALSE;
+
   AliInfo(Form(" *** %s Report:", GetName())) ; 
 
   TCanvas *c1 = new TCanvas("c1","Pt",10,10,310,310);
@@ -143,5 +151,13 @@ void AliAnalysisTaskPt::Terminate(Option_t *)
   sprintf(line, ".!rm -fR *.eps"); 
   gROOT->ProcessLine(line);
 
-  AliInfo(Form("!!! All the eps files are in %s.tar.gz !!! \n", GetName())) ;
+  AliInfo(Form("!!! All the eps files are in %s.tar.gz !!!", GetName())) ;
+  TString report ; 
+  if(problem)
+    report="Problems found, please check!!!";  
+  else 
+    report="OK";
+  
+  AliInfo(Form("*** %s Summary Report: %s \n",GetName(), report.Data())) ; 
 }