// Output slot #0 writes into a TList container
DefineOutput(0, TList::Class());
- //event maker
- fEventMaker = new AliFlowEventSimpleMaker();
- //Analyser
- fSP = new AliFlowAnalysisWithScalarProduct() ;
- fSP-> Init();
+}
+
+//________________________________________________________________________
+AliAnalysisTaskScalarProduct::~AliAnalysisTaskScalarProduct()
+{
+ //
+ // Destructor
+ //
+
+ // histograms are in the output list and deleted when the output
+ // list is deleted by the TSelector dtor
+
+ // if (ListHistos) {
+ // delete fListHistos;
+ // fListHistos = NULL;
+ // }
}
//________________________________________________________________________
//________________________________________________________________________
void AliAnalysisTaskScalarProduct::CreateOutputObjects()
{
- // Called once
+ // Called at every worker node to initialize
cout<<"AliAnalysisTaskScalarProduct::CreateOutputObjects()"<<endl;
+ //event maker
+ fEventMaker = new AliFlowEventSimpleMaker();
+ //Analyser
+ fSP = new AliFlowAnalysisWithScalarProduct() ;
+ fSP-> Init();
if (fSP->GetHistList()) {
fSP->GetHistList()->Print();
-// *fListHistos = new TList();
+// fListHistos = new TList(fSP->GetHistList());
fListHistos = fSP->GetHistList();
+ fListHistos->Print();
}
else {Printf("ERROR: Could not retrieve histogram list"); }
}
{
// Called once at the end of the query
fSP->Finish();
- PostData(0,fListHistos);
+ // PostData(0,fListHistos);
delete fSP;
delete fEventMaker;
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
-/* $Id$ */
+/* $Id: $ */
#ifndef AliAnalysisTaskScalarProduct_H
#define AliAnalysisTaskScalarProduct_H
class AliAnalysisTaskScalarProduct : public AliAnalysisTask {
public:
- AliAnalysisTaskScalarProduct(const char *name = "AliAnalysisTaskScalarProduct");
- virtual ~AliAnalysisTaskScalarProduct() {}
+ AliAnalysisTaskScalarProduct(const char *name = "");
+ virtual ~AliAnalysisTaskScalarProduct();
virtual void ConnectInputData(Option_t *);
virtual void CreateOutputObjects();
//fCommonHistsRes = new AliFlowCommonHistResults("SP");
fHistList->Add(fCommonHists);
- fEventNumber = 0; //set number of events to zero
-
-}
-
+ fEventNumber = 0; //set number of events to zero
+}
+
//-----------------------------------------------------------------------
void AliFlowAnalysisWithScalarProduct::Make(AliFlowEventSimple* anEvent) {