30 if (IsOptGiven(
"CombinedOutputFile")) {
31 fCombinedOutputFile = GetOpt(
"CombinedOutputFile");
38 fDisableCreateTreeFile =
kTRUE;
40 fDisableCreateTreeFile =
kFALSE;
109 if (!strcmp(filename,
""))
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");
358 Warning(
"FillHisto",
"%s introuvable", histo_name);
383 h1->
Fill(one, two, three);
395 h2->
Fill(one, two, three);
407 h2->
Fill(one, two, three, four);
418 h3->
Fill(one, two, three, four);
456 if (!strcmp(filename,
""))
457 histo_file_name.
Form(
"HistoFileFrom%s.root",
GetName());
459 histo_file_name = filename;
475 while ((obj = next())) {
478 if (((
TH1*)obj)->GetEntries() > 0) {
536 if (!strcmp(tree_name,
"")) {
545 Warning(
"FillTree",
"%s introuvable", tree_name);
622 while (!option.
End()) {
648 KVClassFactory cf(classname,
"User class for PROOF",
"KVPROOFSelector");
652 cf.
AddMethodBody(
"Analysis",
" // Write your code here\n return kTRUE;");
ClassImp(KVPartitionList) void KVPartitionList
Initialisation.
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()
T * get_object(const TString &name) const
virtual TObject * At(Int_t idx) const
virtual void Execute(const char *method, const char *params, Int_t *error=0)
virtual void Add(TObject *obj)
virtual TObject * FindObject(const char *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
const char * AsString() const
Bool_t cd(const char *path=nullptr) override
virtual Bool_t cd(const char *path=nullptr)
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)
virtual Int_t Fill(const char *namex, const char *namey, const char *namez, Double_t w)
TObject * FindObject(const char *name) const
virtual void Add(TObject *obj)
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
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 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.)
TFile * OpenFile(const char *opt)
void SetOutputFileName(const char *name)
void Print(Option_t *option="") const
virtual TList * GetOutputList() const
virtual const char * GetOption() 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)