]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ANALYSIS/AliFileMerger.h
Merge branch 'master' of https://git.cern.ch/reps/AliRoot
[u/mrichter/AliRoot.git] / ANALYSIS / AliFileMerger.h
index 32cba32f3aa1a932af580b4060d175c1d916a034..aecb2302b88c11275d394425e5b6fcb0685234c1 100644 (file)
@@ -24,25 +24,35 @@ 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);
   //
   Bool_t IsAccepted(TString name);
+  Bool_t IsRejected(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, Bool_t nameFiltering=kTRUE);
+  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