/// /// \file runProof.C /// \brief /// /// <+DETAILED+> /// /// \author Chinmay Borwankar (), /// /// \internal /// Created: 06/18/2019 /// Revision: none /// Compiler: gcc /// Organization: Astrophysical Sciences Division, Bhabha Atomic Research Centre /// Copyright: /// /// This source code is released for free distribution under the terms of the /// GNU General Public License as published by the Free Software Foundation. /// #include "TString.h" #include "TProof.h" #include "TProofLite.h" Int_t SplitData(const Char_t *dataset, const Char_t *splitname, Double_t splitfraction, const Char_t *foutname, const Char_t *additionalCuts = 0 ) { TProof *fProof = TProof :: Open("lite://") ; void *pdir ; TString splitfile, splitname_sub1, splitname_sub2 ; TString packagepath ; if(!packagepath.EndsWith("/")) packagepath += "/" ; packagepath += "SelSplitData.C" ; //AccessPathName has reverse return convention if(gSystem -> AccessPathName(packagepath.Data())) { Error("SplitData","SplitData selector not accessible\n") ; return -1 ; } packagepath += "+" ; TString fCurrentSplit = splitname ; fProof -> ClearInput() ; TNamed *nmfile = new TNamed("RUN_TempFileName",foutname) ; fProof -> AddInput(nmfile) ; TNamed *nmsplit = new TNamed("RUN_SplitName",splitname) ; fProof -> AddInput(nmsplit) ; TParameter *splitfrac = new TParameter ("RUN_SplitFrac",splitfraction) ; fProof -> AddInput(splitfrac) ; TNamed *splittitle = new TNamed("RUN_SplitTitle", dataset) ; fProof -> AddInput(splittitle) ; if(additionalCuts){ TNamed *nmaddcuts = new TNamed("RUN_Cuts",additionalCuts) ; fProof -> AddInput(nmaddcuts) ; } Int_t proof_status ; proof_status = fProof -> Process(dataset,packagepath.Data()) ; return proof_status ; }