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