1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
16 /* $Id: AliAnalysisTaskJets.cxx 24457 2008-03-13 10:02:22Z morsch $ */
20 #include <TInterpreter.h>
25 #include "AliAnalysisManager.h"
26 #include "AliCdfJetFinder.h"
27 #include "AliESDEvent.h"
29 #include "AliAODEvent.h"
30 #include "AliAODHandler.h"
31 #include "AliMCEventHandler.h"
32 #include "AliESDInputHandler.h"
33 #include "AliMCEvent.h"
35 #include "AliJetReader.h"
37 #include "AliAnalysisTaskJetsCDF.h"
39 ClassImp(AliAnalysisTaskJetsCDF)
41 //______________________________________________________________________________
42 AliAnalysisTaskJetsCDF::AliAnalysisTaskJetsCDF():
47 // Default constructor
50 //______________________________________________________________________________
51 AliAnalysisTaskJetsCDF::AliAnalysisTaskJetsCDF(const char* name):
52 AliAnalysisTaskSE(name),
56 // Default constructor
57 DefineOutput(1, TList::Class());
60 //______________________________________________________________________________
61 void AliAnalysisTaskJetsCDF::UserCreateOutputObjects()
63 // Create the output container
65 if (fDebug > 1) printf("AnalysisTaskJetsCDF::CreateOutPutData() \n");
66 // Connect default AOD to jet finder
68 fJetFinder->ConnectAOD(AODEvent());
72 fListOfHistos = new TList();
74 Error("UserCreateOutputObjects", "No jet finder connected.");
77 fJetFinder->CreateOutputObjects(fListOfHistos);
80 //______________________________________________________________________________
81 void AliAnalysisTaskJetsCDF::LocalInit()
84 if (fDebug > 1) printf("AnalysisTaskJets::Init() \n");
86 // Call configuration file
87 gROOT->LoadMacro("ConfigJetAnalysisCDF.C");
88 fJetFinder = (AliCdfJetFinder*) gInterpreter->ProcessLine("ConfigJetAnalysis()");
89 // Initialise Jet Analysis
91 // Write header information to local file
92 fJetFinder->WriteHeaders();
95 //______________________________________________________________________________
96 void AliAnalysisTaskJetsCDF::UserExec(Option_t */*option*/)
98 // Execute analysis for current event
101 fJetFinder->GetReader()->SetInputEvent(InputEvent(), AODEvent(), MCEvent());
102 fJetFinder->ProcessEvent();
105 PostData(1, fListOfHistos);
108 //______________________________________________________________________________
109 void AliAnalysisTaskJetsCDF::Terminate(Option_t */*option*/)
111 // Terminate analysis
113 if (fDebug > 1) printf("AliAnalysisJetsCDF: Terminate() \n");
114 // if (fJetFinder) fJetFinder->FinishRun();