Line data Source code
1 : #ifndef ALIESDHANDLER_H
2 : #define ALIESDHANDLER_H
3 : /* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
4 : * See cxx source for full Copyright notice */
5 :
6 : /* $Id$ */
7 :
8 : //-------------------------------------------------------------------------
9 : //
10 : // Implementation of the Event Handler Interface for ESD
11 : //
12 : //-------------------------------------------------------------------------
13 :
14 : #include "AliVEventHandler.h"
15 :
16 : class AliESDEvent;
17 : class AliESDfriend;
18 : class TFile;
19 : class TTree;
20 :
21 : class AliESDHandler : public AliVEventHandler {
22 :
23 : public:
24 : AliESDHandler();
25 : AliESDHandler(const char* name, const char* title);
26 : virtual ~AliESDHandler();
27 0 : virtual void SetOutputFileName(const char* fname){fFileName = fname;}
28 0 : virtual const char* GetOutputFileName() const {return fFileName.Data();}
29 : virtual Bool_t Init(Option_t* option);
30 0 : virtual Bool_t Init(TTree* /*tree*/, Option_t* /*option*/) {return kTRUE;}
31 0 : virtual Bool_t GetEntry() {return kTRUE;}
32 0 : virtual Bool_t BeginEvent(Long64_t /*entry*/){fIsEventSelectedForFriends = kFALSE; return kTRUE;}
33 0 : virtual Bool_t Notify() {return AliVEventHandler::Notify(); };
34 0 : virtual Bool_t Notify(const char * /* path */) {return kTRUE;}
35 : virtual Bool_t FinishEvent();
36 : virtual Bool_t Terminate();
37 : virtual Bool_t TerminateIO();
38 :
39 0 : AliESDfriend* GetESDfriend() {return fesdf;}
40 0 : virtual TTree* GetTree() const {return fTreeEF;}
41 : void FillTree();
42 0 : void SetInputTree(TTree* /*tree*/) {;}
43 0 : void SelectEventForFriends() {fIsEventSelectedForFriends = kTRUE;}
44 :
45 : private:
46 :
47 : AliESDHandler(const AliESDHandler&); // Not implemented
48 : AliESDHandler& operator=(const AliESDHandler&); // Not implemented
49 :
50 : AliESDfriend* fesdf; //! Pointer to the ESD friend
51 : TTree* fTreeEF; //! Output tree for friends
52 : TFile* fFileEF; //! Output file for friends
53 : TString fFileName; //! Output file name for friends
54 : Bool_t fIsEventSelectedForFriends; //! flag to indicate if the event was selected to have the friends kept
55 :
56 172 : ClassDef(AliESDHandler, 3)
57 : };
58 : #endif
|