]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ANALYSIS/AliFileMerger.h
Handle friend chain name in GetChainForTestMode
[u/mrichter/AliRoot.git] / ANALYSIS / AliFileMerger.h
1 #ifndef ALIFILEMERGER_H
2 #define ALIFILEMERGER_H
3  
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 /* $Id$ */
8
9 //////////////////////////////////////////////////////////////////////////
10 //
11 //  Utilities for file merging
12 //
13 //////////////////////////////////////////////////////////////////////////
14
15 class TObjString;
16
17 #include "TNamed.h"
18
19 class AliFileMerger : public TNamed
20 {
21
22  public:
23   AliFileMerger();
24   AliFileMerger(const char* name);
25   void Merge(TFile* fileIn, TObjArray * array);
26
27   void IterTXT( const char * fileList,  const char* outputFileName,Bool_t dontOverwrite=kFALSE);
28   void IterAlien(const char* outputDir, const char* outputFileName = "CalibObjects.root" , const char* pattern = "AliESDfriends_v1.root", Bool_t dontOverwrite=kFALSE);
29   //
30   void StoreResults(TObjArray * array, const char* outputFileName);
31   void StoreSeparateResults(TObjArray * array, const char* outputFileName);
32   //
33   Bool_t IsAccepted(TString name);
34   void AddReject(const char *reject);
35   void AddAccept(const char *accept);
36   void SetNoTrees(Bool_t v=kTRUE)        {fNoTrees = v;}
37   Bool_t IsNoTrees()               const {return fNoTrees;}
38
39 protected:
40   int AddFile(TList* sourcelist, std::string entry);
41   int MergeRootfile( TDirectory *target, TList *sourceNames);
42
43 protected:
44   TObjArray * fRejectMask;  // mask of the objects to be rejected
45   TObjArray * fAcceptMask;    // mask of the objects to be accepted
46   Bool_t      fNoTrees;       // do we merge trees
47
48 private:
49   AliFileMerger(const AliFileMerger&);
50   AliFileMerger& operator=(const AliFileMerger& other);
51   
52   ClassDef(AliFileMerger, 1); // File merger utilities for AliRoot
53 };
54
55 #endif