]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ANALYSIS/AliFileMerger.h
Fix to ignore ZN background check in MC
[u/mrichter/AliRoot.git] / ANALYSIS / AliFileMerger.h
index 32cba32f3aa1a932af580b4060d175c1d916a034..e1554d00c0f285c542452cdd926aabca011c21f1 100644 (file)
@@ -24,8 +24,9 @@ class AliFileMerger : public TNamed
   AliFileMerger(const char* name);
   void Merge(TFile* fileIn, TObjArray * array);
 
-  void IterTXT( const char * fileList,  const char* outputFileName,Bool_t separate=kFALSE);
-  void IterAlien(const char* outputDir, const char* outputFileName = "CalibObjects.root" , const char* pattern = "AliESDfriends_v1.root");
+  void IterTXT( const char * fileList,  const char* outputFileName,Bool_t dontOverwrite=kFALSE);
+  void IterAlien(const char* outputDir, const char* outputFileName = "CalibObjects.root" , const char* pattern = "AliESDfriends_v1.root", Bool_t dontOverwrite=kFALSE);
+  void IterList(const TList* namesList, const char* outputFileName, Bool_t dontOverwrite=kFALSE);
   //
   void StoreResults(TObjArray * array, const char* outputFileName);
   void StoreSeparateResults(TObjArray * array, const char* outputFileName);
@@ -33,16 +34,24 @@ class AliFileMerger : public TNamed
   Bool_t IsAccepted(TString name);
   void AddReject(const char *reject);
   void AddAccept(const char *accept);
-
+  void SetNoTrees(Bool_t v=kTRUE)        {fNoTrees = v;}
+  Bool_t IsNoTrees()               const {return fNoTrees;}
+  void SetMaxFilesOpen(Int_t n)          {fMaxFilesOpen = n<3 ? 3 : n;}
+  Int_t GetMaxFilesOpen()          const {return fMaxFilesOpen;}
+protected:
+  int AddFile(TList* sourcelist, std::string entry);
+  int MergeRootfile( TDirectory *target, TList *sourceNames);
+  int OpenNextChunks(const TList* namesList, TList* filesList, Int_t from, Int_t to);
 protected:
   TObjArray * fRejectMask;  // mask of the objects to be rejected
   TObjArray * fAcceptMask;    // mask of the objects to be accepted
-
+  Int_t       fMaxFilesOpen;  // max number of open files
+  Bool_t      fNoTrees;       // do we merge trees
 private:
   AliFileMerger(const AliFileMerger&);
   AliFileMerger& operator=(const AliFileMerger& other);
   
-  ClassDef(AliFileMerger, 1); // File merger utilities for AliRoot
+  ClassDef(AliFileMerger, 2); // File merger utilities for AliRoot
 };
 
 #endif