+//-------------------------------------------------------------------------
+// Support class for AOD extensions. This is created by the user analysis
+// that requires a separate file for some AOD branches. The name of the
+// AliAODExtension object is the file name where the AOD branches will be
+// stored.
+// Author: Andrei Gheata, CERN
+//-------------------------------------------------------------------------
+
+class AliAODExtension : public TNamed {
+
+ public:
+ AliAODExtension() : TNamed(), fAODEvent(0), fTreeE(0), fFileE(0) {;}
+ AliAODExtension(const char* name, const char* title) : TNamed(name,title), fAODEvent(0), fTreeE(0), fFileE(0) {;}
+ virtual ~AliAODExtension();
+ void AddBranch(const char* cname, void* addobj);
+ const char* GetOutputFileName() const {return TNamed::GetName();}
+ AliAODEvent* GetAOD() const {return fAODEvent;}
+ TTree* GetTree() const {return fTreeE;}
+ Bool_t Init(Option_t *option);
+ void SetOutputFileName(const char* fname) {TNamed::SetName(fname);}
+ Bool_t TerminateIO();
+ private:
+ AliAODExtension(const AliAODExtension&); // Not implemented
+ AliAODExtension& operator=(const AliAODExtension&); // Not implemented
+
+ private:
+ AliAODEvent *fAODEvent; //! Pointer to the AOD event
+ TTree *fTreeE; //! tree for AOD persistency
+ TFile *fFileE; //! Output file
+ ClassDef(AliAODExtension, 1) // Support for extra AOD branches in a separate AOD file
+};