]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/ESD/AliESDInputHandler.h
Updates in event mixing code for low-pt code
[u/mrichter/AliRoot.git] / STEER / ESD / AliESDInputHandler.h
CommitLineData
d3dd3d14 1#ifndef ALIESDINPUTHANDLER_H
2#define ALIESDINPUTHANDLER_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// ESD Input Handler realisation of the AliVEventHandler interface
10// Author: Andreas Morsch, CERN
11//-------------------------------------------------------------------------
12
13#include "AliInputEventHandler.h"
fedd7a0d 14#include "AliESDEvent.h"
1aa09fd1 15class TChain;
16class TTree;
17class AliRunTag;
cec9e119 18class AliEventTag;
f0f29480 19class TMap;
620ad672 20class AliESDfriend;
67675e42 21class AliESDpid;
5e6a3170 22class AliESDEvent;
9006fe9c 23class AliPIDResponse;
67675e42 24
d3dd3d14 25
26class AliESDInputHandler : public AliInputEventHandler {
27
28 public:
29 AliESDInputHandler();
30 AliESDInputHandler(const char* name, const char* title);
31 virtual ~AliESDInputHandler();
22d7ad3e 32 virtual Bool_t Init(Option_t* opt) {return AliInputEventHandler::Init(opt);}
300d5701 33 virtual Bool_t Init(TTree* tree, Option_t* opt);
ed97dc98 34 virtual Bool_t BeginEvent(Long64_t entry);
a37ff5af 35 virtual Bool_t Notify() { return AliInputEventHandler::Notify(); };
1aa09fd1 36 virtual Bool_t Notify(const char* path);
6989bff3 37 virtual Bool_t FinishEvent();
aaf2d706 38 void CheckSelectionMask();
1aa09fd1 39 AliESDEvent *GetEvent() const {return fEvent;}
40 Option_t *GetAnalysisType() const {return fAnalysisType;}
c2b6979d 41 Option_t *GetDataType() const;
f0f29480 42 // Tag cut summary analysis
43 Int_t GetNEventAcceptedInFile();
44 Int_t GetNEventRejectedInFile();
c334d0d3 45 Bool_t GetCutSummaryForChain(Int_t *aTotal, Int_t *aAccepted, Int_t *aRejected);
46 Int_t GetNFilesEmpty();
67675e42 47 // HLT analysis
6ccd727b 48 AliESDEvent *GetHLTEvent() const {return fHLTEvent;}
49 TTree *GetHLTTree() const {return fHLTTree;}
59e0dcd5 50 void SetReadHLT() {Changed(); fUseHLT = kTRUE;}
51 Bool_t GetReadHLT() const {return fUseHLT;}
67675e42 52 // Friends&Co
53 AliESDfriend *GetESDfriend() const {return fFriend;}
59e0dcd5 54 void SetReadFriends(Bool_t flag) {Changed(); fReadFriends = flag;}
55 Bool_t GetReadFriends() const {return fReadFriends;}
56 void SetFriendFileName(const char *fname) {Changed(); fFriendFileName = fname;}
57 const char *GetFriendFileName() const {return fFriendFileName;}
1aa09fd1 58 // Tag analysis
59e0dcd5 59 void SetReadTags() {Changed(); fUseTags = kTRUE;}
cec9e119 60 AliRunTag *GetRunTag() const {return fRunTag;}
61 const AliEventTag *GetEventTag() const {return fEventTag;}
70908d05 62 // Get the statistics object (currently TH2). Option can be BIN0.
63 virtual TObject *GetStatistics(Option_t *option="") const;
9006fe9c 64
65 //PID response
66 virtual AliPIDResponse* GetPIDResponse() {return (AliPIDResponse*)fESDpid;}
67 virtual void CreatePIDResponse(Bool_t isMC=kFALSE);
68 AliESDpid *GetESDpid() const {return fESDpid;}
59e0dcd5 69 void SetESDpid(AliESDpid* pid) {Changed(); fESDpid = pid;}
21e601a3 70
71 //HLT
8e957daa 72 virtual AliVfriendEvent* GetVfriendEvent() const {return fFriend;};
9006fe9c 73
300d5701 74 private:
87d395bd 75 AliESDInputHandler(const AliESDInputHandler& handler);
76 AliESDInputHandler& operator=(const AliESDInputHandler& handler);
9d4be30f 77 void ConnectFriends();
4d2a7370 78 protected:
1aa09fd1 79 // ESD event
b626cd71 80 AliESDEvent *fEvent; //! Pointer to the event
81 AliESDfriend *fFriend; //! Pointer to the esd friend
82 AliESDpid *fESDpid; //! Pointer to PID information
83 Option_t *fAnalysisType; //! local, proof, grid
84 Int_t fNEvents; //! Number of events in the current tree
6ccd727b 85 // HLT event
b626cd71 86 AliESDEvent *fHLTEvent; //! Pointer to the HLT Event (if present)
87 TTree *fHLTTree; //! Pointer to the HLT Event (if present)
88 Bool_t fUseHLT; // Flag to access HLT Events
f0f29480 89 // ESD Tag Cut Summary
b626cd71 90 TMap *fTagCutSumm; //! Tag cut summary map
1aa09fd1 91 // ESD Tags (optional)
b626cd71 92 Bool_t fUseTags; // Flag to use tags
93 TChain *fChainT; //! File with event tags
94 TTree *fTreeT; //! Tree of tags
95 AliRunTag *fRunTag; //! Pointer to the run tag
cec9e119 96 const AliEventTag *fEventTag; //! Current event tag
b626cd71 97 // Friends
98 Bool_t fReadFriends; // Flag for friends reading
99 TString fFriendFileName;// Name of the file containing the frien tree (branch)
b626cd71 100 ClassDef(AliESDInputHandler, 6);
d3dd3d14 101};
102
103#endif