/************************************************************************* * Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. * * * * Author: The ALICE Off-line Project. * * Contributors are mentioned in the code where appropriate. * * * * Permission to use, copy, modify and distribute this software and its * * documentation strictly for non-commercial purposes is hereby granted * * without fee, provided that the above copyright notice appears in all * * copies and that both the copyright notice and this permission notice * * appear in the supporting documentation. The authors make no claims * * about the suitability of this software for any purpose. It is * * provided "as is" without express or implied warranty. * **************************************************************************/ #include "Riostream.h" //needed as include #include "TProfile.h" #include "TProfile2D.h" #include "TList.h" class AliAnalysisTask; #include "AliAnalysisManager.h" #include "AliFlowEventSimple.h" #include "AliAnalysisTaskMCEventPlane.h" #include "AliFlowAnalysisWithMCEventPlane.h" #include "AliFlowCommonHist.h" #include "AliFlowCommonHistResults.h" // AliAnalysisTaskMCEventPlane: // // analysis task for Monte Carlo Event Plane // // Author: Naomi van der Kolk (kolk@nikhef.nl) ClassImp(AliAnalysisTaskMCEventPlane) //________________________________________________________________________ AliAnalysisTaskMCEventPlane::AliAnalysisTaskMCEventPlane(const char *name) : AliAnalysisTask(name, ""), fEvent(NULL), fMc(NULL), fListHistos(NULL) { // Constructor cout<<"AliAnalysisTaskMCEventPlane::AliAnalysisTaskMCEventPlane(const char *name)"< Init(); if (fMc->GetHistList()) { //fMc->GetHistList()->Print(); fListHistos = fMc->GetHistList(); //fListHistos->Print(); } else {Printf("ERROR: Could not retrieve histogram list"); } } //________________________________________________________________________ void AliAnalysisTaskMCEventPlane::Exec(Option_t *) { // Main loop // Called for each event fEvent = dynamic_cast(GetInputData(0)); if (fEvent){ fMc->Make(fEvent); } else { cout << "Warning no input data!!!" << endl; } PostData(0,fListHistos); } //________________________________________________________________________ void AliAnalysisTaskMCEventPlane::Terminate(Option_t *) { // Called once at the end of the query AliFlowAnalysisWithMCEventPlane* fMcTerm = new AliFlowAnalysisWithMCEventPlane() ; //Get output data fListHistos = (TList*)GetOutputData(0); // cout << "histogram list in Terminate" << endl; if (fListHistos) { fMcTerm->GetOutputHistograms(fListHistos); fMcTerm->Finish(); PostData(0,fListHistos); //fListHistos->Print(); } else { cout << "histogram list pointer is empty" << endl; } }