AliRoot Core  3dc7879 (3dc7879)
Go to the documentation of this file.
3 /* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice */
6 /* $Id$ */
13 #include "AliVEventHandler.h"
14 #include "AliAODExtension.h"
16 class AliAODEvent;
17 class TFile;
18 class TTree;
19 class TObjArray;
20 class AliMCEventHandler;
21 class AliAODMCHeader;
22 class AliGenEventHeader;
23 class TMap;
24 class AliAnalysisFilter;
25 class AliVCuts;
29  public:
30  AliAODHandler();
31  AliAODHandler(const char* name, const char* title);
32  virtual ~AliAODHandler();
33  virtual void SetOutputFileName(const char* fname);
34  virtual const char* GetOutputFileName() const;
35  // Extra outputs as a string separated by commas
36  virtual const char* GetExtraOutputs(Bool_t merge=kTRUE) const;
37  virtual Bool_t Init(Option_t* option);
38  virtual Bool_t Init(TTree* /*tree*/, Option_t* /*option*/) {return kTRUE;}
39  virtual Bool_t GetEntry() {return kTRUE;}
41  virtual Bool_t BeginEvent(Long64_t /*entry*/) {fFillAOD=kFALSE; fFillExtension=kFALSE; return kTRUE;}
42  virtual Bool_t Notify() { return AliVEventHandler::Notify(); };
43  virtual Bool_t Notify(const char * /* path */) {return kTRUE;}
44  virtual Bool_t FinishEvent();
45  virtual Bool_t Terminate();
46  virtual Bool_t TerminateIO();
47  virtual AliVCuts* GetEventSelection() const {return NULL;}
48  //
49  virtual void SetCreateNonStandardAOD() {Changed(); fIsStandard = kFALSE;}
50  virtual void SetFillAOD(Bool_t b) {Changed(); fFillAOD = b;}
51  virtual void SetFillExtension(Bool_t b) {Changed(); fFillExtension = b;}
52  virtual void SetFillAODforRun(Bool_t b) {Changed(); fFillAODRun = b;}
69  virtual void SetAODIsReplicated() {Changed(); fAODIsReplicated = kTRUE;}
70  virtual void SetAODExtensionMode() {Changed(); fIsStandard=kFALSE; fFillAOD=kFALSE; fFillAODRun=kFALSE; fFillExtension=kTRUE;}
71  //
73  virtual TTree* GetTree() const {return fTreeA;}
74  TObjArray* GetExtensions() const {return fExtensions;}
75  AliAODExtension* GetExtension(const char *filename) const;
76  TObjArray* GetFilters() const {return fFilters;}
77  AliAODExtension* GetFilteredAOD(const char *filename) const;
78  void CreateTree(Int_t flag);
79  void FillTree();
80  void AddAODtoTreeUserInfo();
81  void AddBranch(const char* cname, void* addobj, const char *fname="");
83  AliAODExtension* AddExtension(const char *filename, const char *title="", Bool_t tomerge=kFALSE);
84  AliAODExtension* AddFilteredAOD(const char *filename, const char *filtername, Bool_t tomerge=kFALSE);
85 // AliAODExtension* FindExtensionContainingBranch(const char* bname) const;
86  Bool_t IsStandard() const {return fIsStandard;}
87  Bool_t GetFillAOD() const {return fFillAOD;}
88  Bool_t GetFillExtension() const {return fFillExtension;}
105  Bool_t AODIsReplicated() const {return fAODIsReplicated;}
106  //
107  void SetInputTree(TTree* /*tree*/) {;}
108  void SetMCEventHandler(AliMCEventHandler* mcH) {fMCEventH = mcH;} // For internal use
109  void StoreMCParticles(); // Store MC particles, only to be called from AliAnalyisTaskMCParticleFilter
110  void SetTreeBuffSize(Long64_t sz=30000000) {fTreeBuffSize = sz;}
111  Bool_t HasExtensions() const;
113  void Print(Option_t* opt="") const;
115  private:
116  void SetMCHeaderInfo(AliAODMCHeader *mcHeader,AliGenEventHeader *genHeader); // Utility function t catch different types of eventheaders
117  AliAODHandler(const AliAODHandler&); // Not implemented
118  AliAODHandler& operator=(const AliAODHandler&); // Not implemented
119  void PrintExtensions(const TObjArray& array) const;
121  private:
122  Bool_t fIsStandard;
123  Bool_t fFillAOD;
124  Bool_t fFillAODRun;
125  Bool_t fFillExtension;
143  // Counters for SetAutoFlush configuration
144  Long64_t fTreeBuffSize;
145  Long64_t fMemCountAOD;
148  TTree *fTreeA;
149  TFile *fFileA;
150  TString fFileName;
154  ClassDef(AliAODHandler, 8)
155 };
157 #endif
TBrowser b
Definition: RunAnaESD.C:12
Bool_t AODIsReplicated() const
Bool_t NeedsTOFHeaderReplication() const
Definition: AliAODHandler.h:90
virtual Bool_t GetEntry()
Definition: AliAODHandler.h:39
virtual const char * GetExtraOutputs(Bool_t merge=kTRUE) const
virtual void SetNeedsCascadesBranchReplication()
Definition: AliAODHandler.h:59
void CreateTree(Int_t flag)
void PrintExtensions(const TObjArray &array) const
Implementation of the Event Handler Interface for AOD.
Definition: AliAODHandler.h:27
Bool_t NeedsCascadesBranchReplication() const
Definition: AliAODHandler.h:95
Bool_t NeedsTrackletsBranchReplication() const
Definition: AliAODHandler.h:96
Bool_t fNeedsVerticesBranchReplication
Flag for vertices replication.
Bool_t GetFillExtension() const
Definition: AliAODHandler.h:88
virtual TTree * GetTree() const
Definition: AliAODHandler.h:73
virtual void SetNeedsCaloClustersBranchReplication()
Definition: AliAODHandler.h:64
Bool_t HasExtensions() const
virtual void SetNeedsHeaderReplication()
Definition: AliAODHandler.h:53
Bool_t NeedsTracksBranchReplication() const
Definition: AliAODHandler.h:92
virtual void SetNeedsJetsBranchReplication()
Definition: AliAODHandler.h:62
Bool_t fAODIsReplicated
Flag true if replication as been executed.
Bool_t fNeedsVZEROReplication
Flag for header replication.
#define TObjArray
Bool_t fNeedsCaloClustersBranchReplication
Flag for CaloClusters replication.
virtual void SetAODIsReplicated()
Definition: AliAODHandler.h:69
Bool_t fNeedsTrackletsBranchReplication
Flag for Tracklets replication.
virtual Bool_t Notify()
Definition: AliAODHandler.h:42
void SetTreeBuffSize(Long64_t sz=30000000)
Bool_t NeedsVZEROReplication() const
Definition: AliAODHandler.h:91
AliAODExtension * GetFilteredAOD(const char *filename) const
virtual Bool_t Notify(const char *)
Definition: AliAODHandler.h:43
Bool_t NeedsCaloTriggerBranchReplication() const
Bool_t fNeedsTracksBranchReplication
Flag for tracks replication.
TString fFileName
Output file name.
Manager class for filter decisions based on cuts The filter contains a list of sets of cuts...
Bool_t fNeedsMCParticlesBranchReplication
Flag for MCParticles replication.
virtual const char * GetOutputFileName() const
Bool_t fIsStandard
Flag for standard aod creation.
Bool_t NeedsHeaderReplication() const
Definition: AliAODHandler.h:89
virtual void SetNeedsTOFHeaderReplication()
Definition: AliAODHandler.h:54
AliAODExtension * AddExtension(const char *filename, const char *title="", Bool_t tomerge=kFALSE)
virtual Bool_t FinishEvent()
AliAODHandler & operator=(const AliAODHandler &)
AliAODExtension * GetExtension(const char *filename) const
TObjArray * array
Definition: AnalyzeLaser.C:12
virtual void SetNeedsTracksBranchReplication()
Definition: AliAODHandler.h:56
Bool_t fNeedsPMDClustersBranchReplication
Flag for PMDClusters replication.
virtual void SetFillAODforRun(Bool_t b)
Definition: AliAODHandler.h:52
virtual void SetNeedsFMDClustersBranchReplication()
Definition: AliAODHandler.h:63
virtual void SetFillAOD(Bool_t b)
Definition: AliAODHandler.h:50
Bool_t fNeedsV0sBranchReplication
Flag for V0s replication.
Bool_t IsStandard() const
Definition: AliAODHandler.h:86
TObjArray * GetFilters() const
Definition: AliAODHandler.h:76
Bool_t NeedsPMDClustersBranchReplication() const
Definition: AliAODHandler.h:97
void SetMCEventHandler(AliMCEventHandler *mcH)
virtual void SetNeedsTrackletsBranchReplication()
Definition: AliAODHandler.h:60
virtual void SetCreateNonStandardAOD()
Definition: AliAODHandler.h:49
void SetMCHeaderInfo(AliAODMCHeader *mcHeader, AliGenEventHeader *genHeader)
TObjArray * GetExtensions() const
Definition: AliAODHandler.h:74
Bool_t NeedsFMDClustersBranchReplication() const
Definition: AliAODHandler.h:99
Bool_t fNeedsHMPIDBranchReplication
Flag for HMPID replication.
virtual void SetNeedsHMPIDBranchReplication()
Definition: AliAODHandler.h:68
virtual ~AliAODHandler()
Bool_t NeedsV0sBranchReplication() const
Definition: AliAODHandler.h:94
virtual Bool_t Init(Option_t *option)
Bool_t NeedsHMPIDBranchReplication() const
virtual void SetNeedsV0sBranchReplication()
Definition: AliAODHandler.h:58
Bool_t NeedsJetsBranchReplication() const
Definition: AliAODHandler.h:98
Bool_t NeedsCaloClustersBranchReplication() const
AliAODEvent * fAODEvent
! Pointer to the AOD event
virtual Bool_t Init(TTree *, Option_t *)
Definition: AliAODHandler.h:38
Bool_t fNeedsJetsBranchReplication
Flag for Jets replication.
TTree * fTreeA
! tree for AOD persistency
AliMCEventHandler * fMCEventH
! Pointer to mc event handler needed not to depend on the manager
virtual void SetNeedsVZEROReplication()
Definition: AliAODHandler.h:55
Bool_t fNeedsFMDClustersBranchReplication
Flag for FMDClusters replication.
TObjArray * fExtensions
List of extensions.
Long64_t fMemCountAOD
! accumulated AOD size before AutoSave
virtual void SetNeedsMCParticlesBranchReplication()
Definition: AliAODHandler.h:66
virtual void SetNeedsDimuonsBranchReplication()
Definition: AliAODHandler.h:67
void AddAODtoTreeUserInfo()
virtual void SetFillExtension(Bool_t b)
Definition: AliAODHandler.h:51
AOD base class.
Definition: AliAODEvent.h:48
Bool_t fNeedsTOFHeaderReplication
Flag for header replication.
void Print(Option_t *opt="") const
AliAODEvent * GetAOD()
Definition: AliAODHandler.h:72
void SetInputTree(TTree *)
Bool_t fNeedsHeaderReplication
Flag for header replication.
void AddBranch(const char *cname, void *addobj, const char *fname="")
virtual void SetOutputFileName(const char *fname)
Bool_t NeedsMCParticlesBranchReplication() const
virtual Bool_t Terminate()
Bool_t fNeedsCaloTriggerBranchReplication
Flag for Calo Trigger replication.
virtual Bool_t BeginEvent(Long64_t)
Definition: AliAODHandler.h:41
Bool_t fFillExtension
Flag for filling or the delta AOD tree at the end.
Implementation of Class AliAODMCHeader.
virtual void SetNeedsPMDClustersBranchReplication()
Definition: AliAODHandler.h:61
Bool_t fNeedsCascadesBranchReplication
Flag for Cascade replication.
virtual void SetNeedsVerticesBranchReplication()
Definition: AliAODHandler.h:57
virtual Bool_t TerminateIO()
Bool_t fFillAOD
Flag for filling of the AOD tree at the end (all or nothing evt by evt)
virtual void SetNeedsCaloTriggerBranchReplication()
Definition: AliAODHandler.h:65
virtual Bool_t Notify()
Bool_t NeedsVerticesBranchReplication() const
Definition: AliAODHandler.h:93
AliAODExtension * AddFilteredAOD(const char *filename, const char *filtername, Bool_t tomerge=kFALSE)
Bool_t fFillAODRun
Flag for filling of the AOD tree at the end (run)
virtual AliVCuts * GetEventSelection() const
Definition: AliAODHandler.h:47
Bool_t GetFillAOD() const
Definition: AliAODHandler.h:87
void StoreMCParticles()
char * fname
Bool_t fNeedsDimuonsBranchReplication
Flag for Dimuons replication.
TFile * fFileA
! Output file
Long64_t fTreeBuffSize
allowed uncompressed buffer size per tree
virtual void SetAODExtensionMode()
Definition: AliAODHandler.h:70
Bool_t NeedsDimuonsBranchReplication() const
TObjArray * fFilters
List of filtered AOD's.
Support class for AOD extensions. This is created by the user analysis.