1#include "KVPROOFSelector.h"
2#include <KVClassFactory.h>
30 if (IsOptGiven(
"CombinedOutputFile")) {
31 fCombinedOutputFile = GetOpt(
"CombinedOutputFile");
38 fDisableCreateTreeFile =
kTRUE;
40 fDisableCreateTreeFile =
kFALSE;
124 Info(
"CreateTreeFile",
"could not create '%s': instance is invalid!",
filename);
155 std::cout <<
" ------------- Process infos -------------" << std::endl;
156 printf(
" CpuSys = %f s. CpuUser = %f s. ResMem = %f MB VirtMem = %f MB\n",
234 Info(
"Terminate",
"Analysis ends at %s",
now.AsString());
244 Info(
"Terminate",
"both");
250 Info(
"Terminate",
"histo");
256 Info(
"Terminate",
"tree");
259 else Info(
"Terminate",
"none");
475 while ((obj = next())) {
478 if (((
TH1*)obj)->GetEntries() > 0) {
648 KVClassFactory cf(classname,
"User class for PROOF",
"KVPROOFSelector");
652 cf.
AddMethodBody(
"Analysis",
" // Write your code here\n return kTRUE;");
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
R__EXTERN TProof * gProof
R__EXTERN TSystem * gSystem
static void CombineFiles(const Char_t *file1, const Char_t *file2, const Char_t *newfilename, Bool_t keep=kTRUE)
Factory class for generating skeleton files for new classes.
void GenerateCode()
Generate header and implementation file for currently-defined class.
void SetInheritAllConstructors(Bool_t yes=kTRUE)
void AddMethodBody(const Char_t *method_name, const KVString &body)
KVClassMethod * AddMethod(const Char_t *name, const Char_t *return_type, const Char_t *access="public", Bool_t isVirtual=kFALSE, Bool_t isConst=kFALSE)
Extended version of ROOT THashList.
virtual void Print(Option_t *opt="") const
void SetValue(const Char_t *name, value_type value)
void RemoveParameter(const Char_t *name)
virtual void Clear(Option_t *opt="")
Bool_t HasParameter(const Char_t *name) const
TString GetTStringValue(const Char_t *name) const
General purpose class for running parallel tasks with PROOF.
void FillTree(const Char_t *sname="")
void FillTH1(TH1 *h1, Double_t one, Double_t two)
virtual void InitAnalysis()=0
void AddHisto(TH1 *histo)
void FillTProfile2D(TProfile2D *h2, Double_t one, Double_t two, Double_t three, Double_t four)
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
Bool_t fDisableCreateTreeFile
used with PROOF
virtual Bool_t Analysis()=0
void FillTProfile(TProfile *h1, Double_t one, Double_t two, Double_t three)
KVHashList * GetHistoList() const
return the list of created trees
virtual TString GetOpt(const Char_t *option) const
KVString fCombinedOutputFile
optional name for single results file with trees and histos
void FillHisto(const Char_t *sname, Double_t one, Double_t two=1, Double_t three=1, Double_t four=1)
void FillTH2(TH2 *h2, Double_t one, Double_t two, Double_t three)
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 SlaveBegin(TTree *tree)
virtual void SetOpt(const Char_t *option, const Char_t *value)
Set a value for an option.
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
Long64_t fEventsReadInterval
interval at which to print number of events read
KVNameValueList fOptionList
parsed list of options given to TTree::Process
void FillTH3(TH3 *h3, Double_t one, Double_t two, Double_t three, Double_t four)
Bool_t CreateTreeFile(const Char_t *filename="")
Long64_t fEventsRead
cycle number (argument 'entry' passed to Process(Long64_t))
virtual Bool_t Process(Long64_t entry)
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.
virtual void SlaveTerminate()
virtual TObject * FindObject(const char *name) const
virtual void Execute(const char *method, const char *params, Int_t *error=0)
virtual TObject * At(Int_t idx) const
virtual void Add(TObject *obj)
T * get_object(const TString &name) const
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
void Begin(TString delim) const
KVString Next(Bool_t strip_whitespace=kFALSE) const
virtual Int_t GetEntries() const
void Close(Option_t *option="") override
virtual Int_t Fill(const char *name, Double_t w)
virtual Int_t Fill(const char *namex, const char *namey, Double_t w)
TObject * FindObject(const char *name) const override
void Add(TObject *obj) override
virtual const char * GetName() const
virtual const char * ClassName() const
virtual void Warning(const char *method, const char *msgfmt,...) const
virtual TObject * FindObject(const char *name) const
R__ALWAYS_INLINE Bool_t IsZombie() const
virtual Int_t Write(const char *name=nullptr, Int_t option=0, Int_t bufsize=0)
virtual Bool_t InheritsFrom(const char *classname) const
virtual void Info(const char *method, const char *msgfmt,...) const
virtual Int_t Fill(const char *namex, const char *namey, Double_t z, Double_t w=1.)
void Print(Option_t *option="") const override
TFile * OpenFile(const char *opt)
void SetOutputFileName(const char *name)
const char * GetOption() const override
virtual TList * GetOutputList() const
const char * Data() const
void Form(const char *fmt,...)
virtual int GetProcInfo(ProcInfo_t *info) const
virtual int Rename(const char *from, const char *to)