//-----------------------------------------------------------------------
- AliFlowEventSimple::AliFlowEventSimple(Int_t aLenght):
- fTrackCollection(NULL),
- fNumberOfTracks(0),
- fEventNSelTracksIntFlow(0)
+AliFlowEventSimple::AliFlowEventSimple():
+ fTrackCollection(NULL),
+ fNumberOfTracks(0),
+ fEventNSelTracksIntFlow(0)
+{
+ cout << "AliFlowEventSimple: Default constructor to be used only by root for io" << endl;
+}
+
+//-----------------------------------------------------------------------
+
+AliFlowEventSimple::AliFlowEventSimple(Int_t aLenght):
+ fTrackCollection(NULL),
+ fNumberOfTracks(0),
+ fEventNSelTracksIntFlow(0)
{
//constructor
fTrackCollection = new TObjArray(aLenght) ;
AliFlowEventSimple::~AliFlowEventSimple()
{
//destructor
- fTrackCollection->Delete() ; delete fTrackCollection ;
+ if (fTrackCollection) {
+ fTrackCollection->Delete() ; delete fTrackCollection ;
+ }
+ else {
+ cout << "AliFlowEventSimple: Warning trying to delete track collections NULL pointer" << endl;
+ }
}
//-----------------------------------------------------------------------
class AliFlowEventSimple: public TObject {
public:
+ AliFlowEventSimple();
AliFlowEventSimple(Int_t aLenght);
AliFlowEventSimple(const AliFlowEventSimple& anEvent);
AliFlowEventSimple& operator=(const AliFlowEventSimple& anEvent);
Double_t fSumOfWeightsToPower7; // pow(w_1,7) + pow(w_2,7) + ... + pow(w_n,7)
Double_t fSumOfWeightsToPower8; // pow(w_1,8) + pow(w_2,8) + ... + pow(w_n,8)
- ClassDef(AliFlowVector, 0)
+ ClassDef(AliFlowVector, 1)
};
#endif
//________________________________________________________________________
AliAnalysisTaskFlowEvent::AliAnalysisTaskFlowEvent(const char *name, Bool_t on) :
AliAnalysisTask(name, ""),
+// fOutputFile(NULL),
fESD(NULL),
fAOD(NULL),
fEventMaker(NULL),
// Define input and output slots here
// Input slot #0 works with a TChain
DefineInput(0, TChain::Class());
- // Output slot #0 writes into a TList container
- DefineOutput(0, TObject::Class());
+ // Define here the flow event output
+ DefineOutput(0, AliFlowEventSimple::Class());
if(on) {
DefineOutput(1, TList::Class());
DefineOutput(2, TList::Class()); }
- // Define here the flow event output
+ // and for testing open an output file
+ // fOutputFile = new TFile("FlowEvents.root","RECREATE");
}
//________________________________________________________________________
AliAnalysisTaskFlowEvent::AliAnalysisTaskFlowEvent() :
+ // fOutputFile(NULL),
fESD(NULL),
fAOD(NULL),
fEventMaker(NULL),
fEvent = fEventMaker->FillTracks(fAOD);
}
- //fListHistos->Print();
+ //fListHistos->Print();
+ // fOutputFile->WriteObject(fEvent,"myFlowEventSimple");
PostData(0,fEvent);
if (fQA) {
PostData(1,fQAInt);
AliAnalysisTaskFlowEvent(const AliAnalysisTaskFlowEvent& aAnalysisTask);
AliAnalysisTaskFlowEvent& operator=(const AliAnalysisTaskFlowEvent& aAnalysisTask);
+ // TFile* fOutputFile; // temporary output file for testing
AliESDEvent* fESD; // ESD object
AliAODEvent* fAOD; // AOD object
AliFlowEventSimpleMaker* fEventMaker; // FlowEventSimple maker object
Bool_t fQA; // flag to set the filling of the QA hostograms
- ClassDef(AliAnalysisTaskFlowEvent, 1); // example of analysis
+ ClassDef(AliAnalysisTaskFlowEvent, 0); // example of analysis
};
#endif