]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ANALYSIS/AliFileMerger.h
Add particle rejection reasons, remove default MaxTrackPt in jet voor EmcalTagger...
[u/mrichter/AliRoot.git] / ANALYSIS / AliFileMerger.h
CommitLineData
623bb90b 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
15class TObjString;
16
17#include "TNamed.h"
18
19class AliFileMerger : public TNamed
20{
21
22 public:
23 AliFileMerger();
24 AliFileMerger(const char* name);
bbdd449b 25 virtual ~AliFileMerger();
623bb90b 26 void Merge(TFile* fileIn, TObjArray * array);
27
39f7cda2 28 void IterTXT( const char * fileList, const char* outputFileName,Bool_t dontOverwrite=kFALSE);
29 void IterAlien(const char* outputDir, const char* outputFileName = "CalibObjects.root" , const char* pattern = "AliESDfriends_v1.root", Bool_t dontOverwrite=kFALSE);
3e486dd5 30 void IterList(const TList* namesList, const char* outputFileName, Bool_t dontOverwrite=kFALSE);
623bb90b 31 //
32 void StoreResults(TObjArray * array, const char* outputFileName);
33 void StoreSeparateResults(TObjArray * array, const char* outputFileName);
34 //
35 Bool_t IsAccepted(TString name);
f059e38e 36 Bool_t IsRejected(TString name);
623bb90b 37 void AddReject(const char *reject);
38 void AddAccept(const char *accept);
39f7cda2 39 void SetNoTrees(Bool_t v=kTRUE) {fNoTrees = v;}
40 Bool_t IsNoTrees() const {return fNoTrees;}
3e486dd5 41 void SetMaxFilesOpen(Int_t n) {fMaxFilesOpen = n<3 ? 3 : n;}
42 Int_t GetMaxFilesOpen() const {return fMaxFilesOpen;}
39f7cda2 43protected:
44 int AddFile(TList* sourcelist, std::string entry);
f796afad 45 int MergeRootfile( TDirectory *target, TList *sourceNames, Bool_t nameFiltering=kTRUE);
3e486dd5 46 int OpenNextChunks(const TList* namesList, TList* filesList, Int_t from, Int_t to);
623bb90b 47protected:
48 TObjArray * fRejectMask; // mask of the objects to be rejected
49 TObjArray * fAcceptMask; // mask of the objects to be accepted
3e486dd5 50 Int_t fMaxFilesOpen; // max number of open files
39f7cda2 51 Bool_t fNoTrees; // do we merge trees
623bb90b 52private:
53 AliFileMerger(const AliFileMerger&);
54 AliFileMerger& operator=(const AliFileMerger& other);
55
3e486dd5 56 ClassDef(AliFileMerger, 2); // File merger utilities for AliRoot
623bb90b 57};
58
59#endif