]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliAODHandler.h
Minor changes
[u/mrichter/AliRoot.git] / STEER / AliAODHandler.h
CommitLineData
ec4af4c1 1#ifndef ALIAODHANDLER_H
2#define ALIAODHANDLER_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// Implementation of the Event Handler Interface for AOD
10// Author: Andreas Morsch, CERN
11//-------------------------------------------------------------------------
12
f3214a54 13#include "AliVEventHandler.h"
ec4af4c1 14
15class AliAODEvent;
16class TFile;
17class TTree;
da97a08a 18class AliMCEventHandler;
ec4af4c1 19
20
21
f3214a54 22class AliAODHandler : public AliVEventHandler {
ec4af4c1 23
24 public:
25 AliAODHandler();
26 AliAODHandler(const char* name, const char* title);
27 virtual ~AliAODHandler();
7970f4ac 28 virtual void SetOutputFileName(const char* fname);
29 virtual const char* GetOutputFileName();
300d5701 30 virtual Bool_t Init(Option_t* option);
31 virtual Bool_t Init(TTree* /*tree*/, Option_t* /*option*/) {return kTRUE;}
da97a08a 32 virtual Bool_t BeginEvent(Long64_t /*entry*/){return kTRUE;}
276be602 33 virtual Bool_t Notify() { return AliVEventHandler::Notify(); };
890126ab 34 virtual Bool_t Notify(const char * /* path */) {return kTRUE;}
5f380da9 35 virtual Bool_t FinishEvent();
ec4af4c1 36 virtual Bool_t Terminate();
37 virtual Bool_t TerminateIO();
ec4af4c1 38 //
7c3a9fbf 39 virtual void SetCreateNonStandardAOD() {fIsStandard = kFALSE;}
da97a08a 40 virtual void SetFillAOD(Bool_t b) {fFillAOD = b;}
7c3a9fbf 41 virtual void SetNeedsHeaderReplication() {fNeedsHeaderReplication = kTRUE;}
75754ba8 42 virtual void SetNeedsTracksBranchReplication() {fNeedsTracksBranchReplication = kTRUE;}
43 virtual void SetNeedsVerticesBranchReplication() {fNeedsVerticesBranchReplication = kTRUE;}
44 virtual void SetNeedsV0sBranchReplication() {fNeedsV0sBranchReplication = kTRUE;}
45 virtual void SetNeedsTrackletsBranchReplication() {fNeedsTrackletsBranchReplication = kTRUE;}
46 virtual void SetNeedsPMDClustersBranchReplication() {fNeedsPMDClustersBranchReplication = kTRUE;}
47 virtual void SetNeedsJetsBranchReplication() {fNeedsJetsBranchReplication = kTRUE;}
48 virtual void SetNeedsFMDClustersBranchReplication() {fNeedsFMDClustersBranchReplication = kTRUE;}
49 virtual void SetNeedsCaloClustersBranchReplication() {fNeedsCaloClustersBranchReplication = kTRUE;}
50 virtual void SetAODIsReplicated() {fAODIsReplicated = kTRUE;}
78f7f935 51 //
ec4af4c1 52 AliAODEvent* GetAOD() {return fAODEvent;}
11326411 53 virtual TTree* GetTree() const {return fTreeA;}
954526ed 54 void CreateTree(Int_t flag);
ec4af4c1 55 void FillTree();
56 void AddAODtoTreeUserInfo();
0134949d 57 void AddBranch(const char* cname, void* addobj);
78f7f935 58 Bool_t IsStandard() {return fIsStandard;}
da97a08a 59 Bool_t GetFillAOD(){return fFillAOD;}
7c3a9fbf 60 Bool_t NeedsHeaderReplication() {return fNeedsHeaderReplication;}
75754ba8 61 Bool_t NeedsTracksBranchReplication() {return fNeedsTracksBranchReplication;}
62 Bool_t NeedsVerticesBranchReplication() {return fNeedsVerticesBranchReplication;}
63 Bool_t NeedsV0sBranchReplication() {return fNeedsV0sBranchReplication;}
64 Bool_t NeedsTrackletsBranchReplication() {return fNeedsTrackletsBranchReplication;}
65 Bool_t NeedsPMDClustersBranchReplication() {return fNeedsPMDClustersBranchReplication;}
66 Bool_t NeedsJetsBranchReplication() {return fNeedsJetsBranchReplication;}
67 Bool_t NeedsFMDClustersBranchReplication() {return fNeedsFMDClustersBranchReplication;}
68 Bool_t NeedsCaloClustersBranchReplication() {return fNeedsCaloClustersBranchReplication;}
69 Bool_t AODIsReplicated() {return fAODIsReplicated;}
933fd60f 70 //
71 void SetInputTree(TTree* /*tree*/) {;}
da97a08a 72 void SetMCEventHandler(AliMCEventHandler* mcH) {fMCEventH = mcH;} // For internal use
ec4af4c1 73 private:
da97a08a 74 void StoreMCParticles();
ec4af4c1 75 AliAODHandler(const AliAODHandler&); // Not implemented
76 AliAODHandler& operator=(const AliAODHandler&); // Not implemented
77 private:
75754ba8 78 Bool_t fIsStandard; // Flag for standard aod creation
da97a08a 79 Bool_t fFillAOD; // Flag for filling of the AOD tree at the end (all or nothing)
75754ba8 80 Bool_t fNeedsHeaderReplication; // Flag for header replication
81 Bool_t fNeedsTracksBranchReplication; // Flag for tracks replication
82 Bool_t fNeedsVerticesBranchReplication; // Flag for vertices replication
83 Bool_t fNeedsV0sBranchReplication; // Flag for V0s replication
84 Bool_t fNeedsTrackletsBranchReplication; // Flag for Tracklets replication
85 Bool_t fNeedsPMDClustersBranchReplication; // Flag for PMDClusters replication
86 Bool_t fNeedsJetsBranchReplication; // Flag for Jets replication
87 Bool_t fNeedsFMDClustersBranchReplication; // Flag for FMDClusters replication
88 Bool_t fNeedsCaloClustersBranchReplication; // Flag for CaloClusters replication
89 Bool_t fAODIsReplicated; // Flag true if replication as been executed
7c3a9fbf 90 AliAODEvent *fAODEvent; //! Pointer to the AOD event
da97a08a 91 AliMCEventHandler *fMCEventH; //! Pointer to mc event handler needed not to depend on the manager
7c3a9fbf 92 TTree *fTreeA; //! tree for AOD persistency
93 TFile *fFileA; //! Output file
94 TString fFileName; // Output file name
da97a08a 95 ClassDef(AliAODHandler, 3)
ec4af4c1 96};
97
98#endif