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 **************************************************************************/
18 #include <TInterpreter.h>
22 #include "AliAnalysisTaskJets.h"
23 #include "AliJetFinder.h"
26 ClassImp(AliAnalysisTaskJets)
28 ////////////////////////////////////////////////////////////////////////
30 AliAnalysisTaskJets::AliAnalysisTaskJets(const char* name):
31 AliAnalysisTask(name, "AnalysisTaskJets"),
36 // Default constructor
37 DefineInput (0, TChain::Class());
38 DefineOutput(0, TH1::Class());
41 void AliAnalysisTaskJets::Init(Option_t */*option*/)
45 printf("AnalysisJets::Init() \n");
47 // Call configuration file
48 gROOT->LoadMacro("ConfigJetAnalysis.C");
49 fJetFinder = (AliJetFinder*) gInterpreter->ProcessLine("ConfigJetAnalysis()");
50 // Initialise Jet Analysis
52 fChain = (TChain*)GetInputData(0);
53 fJetFinder->ConnectTree(fChain);
54 fJetFinder->WriteHeaders();
57 void AliAnalysisTaskJets::Exec(Option_t */*option*/)
59 // Execute analysis for current event
61 Long64_t ientry = fChain->GetReadEntry();
62 printf("Analysing event # %5d \n", (Int_t) ientry);
64 fJetFinder->ProcessEvent(ientry);
67 void AliAnalysisTaskJets::Terminate(Option_t */*option*/)
71 printf("AnalysisJets: Terminate() \n");
72 fJetFinder->FinishRun();