]>
Commit | Line | Data |
---|---|---|
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 | |
15 | class AliAODEvent; | |
16 | class TFile; | |
17 | class TTree; | |
18 | ||
19 | ||
20 | ||
f3214a54 | 21 | class AliAODHandler : public AliVEventHandler { |
ec4af4c1 | 22 | |
23 | public: | |
24 | AliAODHandler(); | |
25 | AliAODHandler(const char* name, const char* title); | |
26 | virtual ~AliAODHandler(); | |
7970f4ac | 27 | virtual void SetOutputFileName(const char* fname); |
28 | virtual const char* GetOutputFileName(); | |
300d5701 | 29 | virtual Bool_t Init(Option_t* option); |
30 | virtual Bool_t Init(TTree* /*tree*/, Option_t* /*option*/) {return kTRUE;} | |
31 | virtual Bool_t BeginEvent(Long64_t /*entry*/) {return kTRUE;} | |
276be602 | 32 | virtual Bool_t Notify() { return AliVEventHandler::Notify(); }; |
890126ab | 33 | virtual Bool_t Notify(const char * /* path */) {return kTRUE;} |
5f380da9 | 34 | virtual Bool_t FinishEvent(); |
ec4af4c1 | 35 | virtual Bool_t Terminate(); |
36 | virtual Bool_t TerminateIO(); | |
ec4af4c1 | 37 | // |
7c3a9fbf | 38 | virtual void SetCreateNonStandardAOD() {fIsStandard = kFALSE;} |
39 | virtual void SetNeedsHeaderReplication() {fNeedsHeaderReplication = kTRUE;} | |
78f7f935 | 40 | // |
ec4af4c1 | 41 | AliAODEvent* GetAOD() {return fAODEvent;} |
11326411 | 42 | virtual TTree* GetTree() const {return fTreeA;} |
954526ed | 43 | void CreateTree(Int_t flag); |
ec4af4c1 | 44 | void FillTree(); |
45 | void AddAODtoTreeUserInfo(); | |
0134949d | 46 | void AddBranch(const char* cname, void* addobj); |
78f7f935 | 47 | Bool_t IsStandard() {return fIsStandard;} |
7c3a9fbf | 48 | Bool_t NeedsHeaderReplication() {return fNeedsHeaderReplication;} |
933fd60f | 49 | // |
50 | void SetInputTree(TTree* /*tree*/) {;} | |
ec4af4c1 | 51 | private: |
52 | AliAODHandler(const AliAODHandler&); // Not implemented | |
53 | AliAODHandler& operator=(const AliAODHandler&); // Not implemented | |
54 | private: | |
7c3a9fbf | 55 | Bool_t fIsStandard; // Flag for standard aod creation |
56 | Bool_t fNeedsHeaderReplication; // Flag for header replication | |
57 | AliAODEvent *fAODEvent; //! Pointer to the AOD event | |
58 | TTree *fTreeA; //! tree for AOD persistency | |
59 | TFile *fFileA; //! Output file | |
60 | TString fFileName; // Output file name | |
7970f4ac | 61 | ClassDef(AliAODHandler, 2); |
ec4af4c1 | 62 | }; |
63 | ||
64 | #endif |