#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
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]");
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);
c1->SetFillColor(10);
c1->SetHighLightColor(10);
c1->cd(1)->SetLeftMargin(0.15);
c1->cd(1)->SetBottomMargin(0.15);
- c1->cd(1)->SetLogy();
+ if (fhPt->GetMaximum() > 0 )
+ c1->cd(1)->SetLogy();
fOutputContainer = (TObjArray*)GetOutputData(0);
fhPt = (TH1F*)fOutputContainer->At(0);
if (fhPt) fhPt->DrawCopy("E");
c1->Print("TracksPt.eps");
char line[1024] ;
- sprintf(line, ".!tar -zcvf %s.tar.gz *.eps", GetName()) ;
+ sprintf(line, ".!tar -zcf %s.tar.gz *.eps", GetName()) ;
gROOT->ProcessLine(line);
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())) ;
}