8 #ifndef KVPROOFSelector_h
9 #define KVPROOFSelector_h
11 #include <KVHashList.h>
12 #include <KVNameValueList.h>
17 #include <TSelector.h>
18 #include "TProofOutputFile.h"
83 Long64_t fEventsReadInterval;
93 Bool_t fDisableCreateTreeFile;
95 void FillTH1(TH1* h1, Double_t one, Double_t two);
96 void FillTProfile(TProfile* h1, Double_t one, Double_t two, Double_t three);
97 void FillTH2(TH2* h2, Double_t one, Double_t two, Double_t three);
98 void FillTProfile2D(TProfile2D* h2, Double_t one, Double_t two, Double_t three, Double_t four);
99 void FillTH3(TH3* h3, Double_t one, Double_t two, Double_t three, Double_t four);
110 fEventsRead(0), fEventsReadInterval(50000), fDisableCreateTreeFile(kFALSE)
126 fEventsReadInterval = N;
132 void Begin(TTree* tree)
override;
134 Bool_t
Process(Long64_t entry)
override;
146 void FillHisto(
const Char_t* sname, Double_t one, Double_t two = 1, Double_t three = 1, Double_t four = 1);
147 void FillTree(
const Char_t* sname =
"");
152 TH1*
GetHisto(
const Char_t* name)
const;
153 TTree*
GetTree(
const Char_t* name)
const;
155 virtual void SaveHistos(
const Char_t* filename =
"", Option_t* option =
"recreate", Bool_t onlyfilled = kFALSE);
157 virtual void SetOpt(
const Char_t* option,
const Char_t* value);
158 virtual Bool_t
IsOptGiven(
const Char_t* option);
159 virtual TString
GetOpt(
const Char_t* option)
const;
160 virtual void UnsetOpt(
const Char_t* opt);
171 fCombinedOutputFile = filename;
178 static void Make(
const Char_t* classname);
Extended version of ROOT THashList.
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
General purpose class for running parallel tasks with PROOF.
void FillTree(const Char_t *sname="")
virtual void InitAnalysis()=0
Int_t Version() const override
void AddHisto(TH1 *histo)
virtual void UnsetOpt(const Char_t *opt)
Removes the option 'opt' from the internal lists, as if it had never been set.
void AddTree(TTree *tree)
virtual void EndAnalysis()=0
void Begin(TTree *tree) override
virtual Bool_t Analysis()=0
KVHashList * GetHistoList() const
return the list of created trees
virtual TString GetOpt(const Char_t *option) const
void SetEventsReadInterval(Long64_t N)
void FillHisto(const Char_t *sname, Double_t one, Double_t two=1, Double_t three=1, Double_t four=1)
TTree * GetTree(const Char_t *name) const
return the tree named tree_name
virtual void SaveHistos(const Char_t *filename="", Option_t *option="recreate", Bool_t onlyfilled=kFALSE)
virtual void ParseOptions()
virtual void SetOpt(const Char_t *option, const Char_t *value)
Set a value for an option.
Long64_t GetCycleNumber() const
static void Make(const Char_t *classname)
Generate a new class derived from this one with given name.
TH1 * GetHisto(const Char_t *name) const
TProofOutputFile * mergeFile
for merging with PROOF
KVPROOFSelector(TTree *=0)
Bool_t Process(Long64_t entry) override
virtual ~KVPROOFSelector()
void SetCombinedOutputFile(const TString &filename)
Bool_t CreateTreeFile(const Char_t *filename="")
void SlaveTerminate() override
void SlaveBegin(TTree *tree) override
void Terminate() override
KVHashList * GetTreeList() const
return the list of created trees
virtual Bool_t IsOptGiven(const Char_t *option)
Returns kTRUE if the option 'opt' has been set.
void Clear(Option_t *option="") override
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....