Possibility to filter the ESD friends and add objects to AliESDfriends.root. Major...
[u/mrichter/AliRoot.git] / ANALYSIS / AliAnalysisTaskFilter.h
CommitLineData
6d3a7bbf 1#ifndef ALIANALYSISTASKFILTER_H
2#define ALIANALYSISTASKFILTER_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7/* $Id$ */
8
9//////////////////////////////////////////////////////////////////////////
10//
11// Base class for filtering friends
12//
13//////////////////////////////////////////////////////////////////////////
14
15#include "AliAnalysisTask.h"
16class AliVEvent;
17class AliESDEvent;
18class AliESDfriend;
19class AliInputEventHandler;
20class AliESDfriendTrack;
21
22class TTree;
23
24class AliAnalysisTaskFilter : public AliAnalysisTask
25{
26 public:
27 AliAnalysisTaskFilter();
28 AliAnalysisTaskFilter(const char* name);
29 AliAnalysisTaskFilter(const AliAnalysisTaskFilter& obj);
30 AliAnalysisTaskFilter& operator=(const AliAnalysisTaskFilter& other);
31 virtual ~AliAnalysisTaskFilter() {;}
32
33 // Implementation of interface methods
34 virtual void ConnectInputData(Option_t *option = "");
35 virtual void CreateOutputObjects();
36 virtual void Exec(Option_t* option);
37 virtual void SetDebugLevel(Int_t level) {fDebug = level;}
38 virtual void Init() {;}
39 virtual void UserCreateOutputObjects() {;}
40 virtual void UserExec(Option_t* /*option*/) {;}
41
42 // To be implemented by user
43 virtual Bool_t UserSelectESDfriendForCurrentEvent(){return kTRUE;}
44
45 // Getters
46 virtual Int_t DebugLevel() {return fDebug; }
47 virtual AliVEvent* InputEvent() {return fInputEvent;}
48 virtual AliESDEvent* ESDEvent() {return fOutputESD; }
49 virtual AliESDfriend* ESDfriend() {return fOutputESDfriend; }
50 virtual TTree* OutputTree() {return fTreeE; }
51 virtual Long64_t Entry() {return fEntry; }
52 virtual const char* CurrentFileName();
53
54 // To add a friend track
55 void AddFriendTrackAt(AliESDfriendTrack* t, Int_t index);
56
57 protected:
58 Int_t fDebug; // Debug flag
59 Int_t fEntry; // Current entry in the chain
60 AliVEvent* fInputEvent; //! VEvent Input
61 AliInputEventHandler* fInputHandler; //! Input Handler
62 AliESDEvent* fOutputESD; //! ESD out
63 AliESDfriend* fOutputESDfriend; //! ESD friend out
64 TTree* fTreeE; // ESD output Tree
65
66 ClassDef(AliAnalysisTaskFilter, 1); // Analysis task for filtering friends
67};
68
69#endif