14 Int_t FillStyle__S = 1001;
16 Int_t LineWidth__S = 2;
21 Int_t FillStyle__B = 3554;
23 Int_t LineWidth__B = 2;
64 Int_t FillColors[10] = {38,2,3,6,7,8,9,11};
65 Int_t LineColors[10] = {4,2,3,6,7,8,9,11};
66 Int_t FillStyles[5] = {1001,3554,3003,3545,0};
91 gPad->SetLeftMargin ( 0.108*scale );
92 gPad->SetRightMargin ( 0.050*scale );
93 gPad->SetBottomMargin( 0.120*scale );
100 gROOT->SetStyle(
"TMVA");
106 TMVAStyle->
SetTitle(
"TMVA style based on \"Plain\" with modifications defined in tmvaglob.C");
107 gROOT->GetListOfStyles()->Add(TMVAStyle);
108 gROOT->SetStyle(
"TMVA");
135 if (!
gConfig().fVariablePlotting.fUsePaperStyle) {
172 while ((o = itc()))
delete o;
183 gROOT->SetStyle(
"Plain");
195 if (file==0 || fin != file->
GetName()) {
200 cout <<
"--- Opening root file " << fin <<
" in read mode" << endl;
216 cout <<
"*** Error in TMVAGlob::imgconv: canvas is NULL" << endl;
224 TString pngName = fname +
".png";
225 TString gifName = fname +
".gif";
226 TString epsName = fname +
".eps";
230 if (
gConfig().fVariablePlotting.fUsePaperStyle) {
234 cout <<
"--- --------------------------------------------------------------------" << endl;
235 cout <<
"--- If you want to save the image as eps, gif or png, please comment out " << endl;
236 cout <<
"--- the corresponding lines (line no. 239-241) in tmvaglob.C" << endl;
237 cout <<
"--- --------------------------------------------------------------------" << endl;
249 TString tutorialPath = getenv (
"ROOTSYS");
250 tutorialPath+=
"/tutorials/tmva";
258 cout <<
"+++ Could not open image: " << fullName << endl;
268 cout <<
"+++ Could not open image tmva_logo.gif" << endl;
287 Float_t y1T = y1B + d*v_scale*skew;
288 if (y1T>0.99) y1T = 0.99;
290 TPad *
p1 =
new TPad(
"imgpad",
"imgpad", x1L, y1B, x1R, y1T );
299 if (xSizeInPixel<=25 || ySizeInPixel<=25) {
369 if (key==0) loop =
kFALSE;
385 while ((mkey = (
TKey*)mnext())) {
387 TClass *cl =
gROOT->GetClass(mkey->GetClassName());
399 cout <<
"tmvaglob::GetNumberOfTargets is called with *dir==NULL :( " << endl;
406 while ((key = (
TKey*)next())) {
407 if (key->GetCycle() != 1)
continue;
408 if (
TString(key->GetName()).Contains(
"__Regression_target")) noTrgts++;
419 while ((key = (
TKey*)next())) {
420 if (key->GetCycle() != 1)
continue;
423 if (
TString(key->GetName()).Contains(
"__Signal") || (
TString(key->GetName()).Contains(
"__Regression") && !(
TString(key->GetName()).Contains(
"__Regression_target")))) noVars++;
434 std::vector<TString> names;
436 while ((key = (
TKey*)next())) {
437 if (key->GetCycle() != 1)
continue;
444 std::vector<TString>::const_iterator iter = names.begin();
445 while(iter != names.end()){
446 if(
name.CompareTo(*iter)==0)
451 names.push_back(
name);
458 return names.end() - names.begin();
467 std::vector<TString> names;
469 while ((key = (
TKey*)next())) {
470 if (key->GetCycle() != 1)
continue;
474 name.ReplaceAll(
"_Deco",
"");
475 name.ReplaceAll(
"_Gauss",
"");
476 name.ReplaceAll(
"_PCA",
"");
477 name.ReplaceAll(
"_Id",
"");
478 name.ReplaceAll(
"_vs_",
"");
481 name.Remove(0,pos+1);
497 std::vector<TString>::const_iterator iter = names.begin();
498 while(iter != names.end()){
499 if(
name.CompareTo(*iter)==0)
504 names.push_back(
name);
519 mkey = (
TKey*)mnext();
524 TString clname = mkey->GetClassName();
527 TString mname = mkey->GetName();
547 mkey = (
TKey*)mnext();
552 TString clname = mkey->GetClassName();
553 TString keyname = mkey->GetName();
559 cout <<
"HUUUGE TROUBLES IN TMVAGlob::ExistMethodName() --> contact authors" << endl;
565 while ((mkey_ = (
TKey*)mnext_())) {
566 TString clname_ = mkey_->GetClassName();
569 TString mname = mkey_->GetName();
591 while ((mkey = (
TKey*)mnext())) {
602 cout <<
"--- Found " << ni <<
" classifier types" << endl;
612 while ((key = (
TKey*)next())) {
615 if (
gROOT->GetClass(key->GetClassName())->InheritsFrom(
"TDirectory")) {
621 while ((jobkey = (
TKey*)keyIt())) {
622 if (!
gROOT->GetClass(jobkey->GetClassName())->InheritsFrom(
"TDirectory"))
continue;
625 cout <<
"jobdir name " << jobDir->
GetName() << endl;
638 if (rfdir==0)
return 0;
641 cout <<
"+++ Directory '" << rfdir->
GetName() <<
"' contains no keys" << endl;
649 while ((rfkey = (
TKey*)rfnext())) {
651 TClass *cl =
gROOT->GetClass(rfkey->GetClassName());
657 cout <<
"--- Found " << ni <<
" instance(s) of the method " << rfdir->
GetName() << endl;
670 cout <<
"+++ Could not locate directory '" << methodName << endl;
678 cout <<
"+++ Directory '" << methodName <<
"' contains no keys" << endl;
686 while ((rfkey = (
TKey*)rfnext())) {
688 TClass *cl =
gROOT->GetClass(rfkey->GetClassName());
694 cout <<
"--- Found " << ni <<
" instance(s) of the method " << methodName << endl;
702 "InputVariables_Deco",
703 "InputVariables_PCA",
704 "InputVariables_Gauss_Deco" };
710 cout <<
"+++ Could not locate input variable directory '" << directories[
type] << endl;
720 if (dir==0)
return 0;
724 cout <<
"+++ Could not find CorrelationPlots directory 'CorrelationPlots'" << endl;
virtual Bool_t cd(const char *path=0)
Change current directory to "this" directory.
virtual void SetTitleOffset(Float_t offset=1)
Set distance between the axis and the axis title Offset is a correction factor with respect to the "s...
virtual const char * GetName() const
Returns name of object.
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
virtual void Scale(Double_t c1=1, Option_t *option="")
Multiply this histogram by a constant c1.
void imgconv(TCanvas *c, const TString &fname)
virtual TList * GetListOfKeys() const
void SetPadLeftMargin(Float_t margin=0.1)
Int_t UtoAbsPixel(Double_t u) const
std::vector< TString > GetInputVariableNames(TDirectory *dir)
virtual UInt_t GetHeight() const
void SetFrameBorderMode(Int_t mode=1)
Int_t GetNumberOfInputVariables(TDirectory *dir)
virtual TObject * Get(const char *namecycle)
Return pointer to object identified by namecycle.
virtual UInt_t GetWidth() const
TString & ReplaceAll(const TString &s1, const TString &s2)
R__EXTERN TStyle * gStyle
void SetHistLineWidth(Width_t width=1)
TFile * OpenFile(const TString &fin)
void NormalizeHists(TH1 *sig, TH1 *bkg=0)
virtual const char * GetClassName() const
virtual void SetName(const char *name)
Set the name of the TNamed.
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
virtual void SetConstRatio(Bool_t constRatio=kTRUE)
Set (constRatio = kTRUE) or unset (constRadio = kFALSE) the ratio flag.
std::vector< TString > GetClassNames(TDirectory *dir)
virtual Double_t GetSumOfWeights() const
Return the sum of weights excluding under/overflows.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
TVirtualPad * cd(Int_t subpadnumber=0)
Set current canvas & pad.
void NormalizeHist(TH1 *h)
void SetSignalAndBackgroundStyle(TH1 *sig, TH1 *bkg, TH1 *all=0)
void SetFrameStyle(TH1 *frame, Float_t scale=1.0)
Bool_t ExistMethodName(TString name, TDirectory *dir=0)
UInt_t GetListOfKeys(TList &keys, TString inherits, TDirectory *dir=0)
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
An abstract interface to image processing library.
TKey * NextKey(TIter &keyIter, TString className)
TDirectory * GetCorrelationPlotsDir(TMVAGlob::TypeOfPlot type, TDirectory *dir=0)
void SetPadBottomMargin(Float_t margin=0.1)
void SetLineStyleString(Int_t i, const char *text)
Set line style string using the PostScript convention.
virtual void SetTopMargin(Float_t topmargin)
Set Pad top margin in fraction of the pad height.
virtual int mkdir(const char *name, Bool_t recursive=kFALSE)
Make a file system directory.
void SetCanvasColor(Color_t color=19)
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=1, Int_t netopt=0)
Create / open a file.
void SetTitleBorderSize(Width_t size=2)
void SetLegendBorderSize(Width_t size=4)
TVirtualPad * cd(Int_t subpadnumber=0)
Set Current pad.
void SetFrameFillColor(Color_t color=1)
Int_t getBackgroundLine()
Int_t GetNumberOfTargets(TDirectory *dir)
Int_t getBackgroundFill()
void SetPadTickX(Int_t tickx)
void GetMethodTitle(TString &name, TKey *ikey)
void SetTitleTextColor(Color_t color=1)
void GetMethodName(TString &name, TKey *mkey)
Book space in a file, create I/O buffers, to fill them, (un)compress them.
void SetMultiClassStyle(TObjArray *hists)
virtual void Draw(Option_t *option="")
Draw Pad in Current pad (re-parent pad if necessary).
Int_t VtoAbsPixel(Double_t v) const
TStyle objects may be created to define special styles.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
TDirectory * GetInputVariablesDir(TMVAGlob::TypeOfPlot type, TDirectory *dir=0)
void SetPadBorderMode(Int_t mode=1)
void SetCanvasBorderMode(Int_t mode=1)
virtual void SetBottomMargin(Float_t bottommargin)
Set Pad bottom margin in fraction of the pad height.
void Initialize(Bool_t useTMVAStyle=kTRUE)
R__EXTERN TSystem * gSystem
void SetPadColor(Color_t color=19)
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
Float_t GetPadRightMargin() const
UInt_t GetListOfJobs(TFile *file, TList &jobdirs)
void SetOptFit(Int_t fit=1)
The type of information about fit parameters printed in the histogram statistics box can be selected ...
The most important graphics class in the ROOT system.
Int_t GetEntriesFast() const
char * Form(const char *fmt,...)
The ROOT global object gROOT contains a list of all defined classes.
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
static double p1(double t, double a, double b)
void plot_logo(Float_t v_scale=1.0, Float_t skew=1.0)
Int_t GetNumberOfInputVariablesMultiClass(TDirectory *dir)
Bool_t InheritsFrom(const char *cl) const
Return kTRUE if this class inherits from a class with name "classname".
virtual void Print(const char *filename="") const
Save Pad contents in a file in one of various formats.
void SetTitleH(Float_t h=0)
virtual void SetLabelSize(Float_t size=0.04)
Set size of axis labels The size is expressed in per cent of the pad width.
virtual void SetMarkerSize(Size_t msize=1)
Set the marker size.
virtual void SetTitleSize(Float_t size=0.04)
Set size of axis title The size is expressed in per cent of the pad width.
TString & Remove(Ssiz_t pos)
virtual Int_t GetSumw2N() const
UInt_t GetListOfMethods(TList &methods, TDirectory *dir=0)
Ssiz_t Last(char c) const
Find last occurrence of a character c.
Describe directory structure in memory.
Float_t GetPadTopMargin() const
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
virtual void Clear(Option_t *option="")
Remove all objects from the list.
void SetPadTopMargin(Float_t margin=0.1)
void SetPaperSize(EPaperSize size)
Set paper size for PostScript output.
virtual void SetRightMargin(Float_t rightmargin)
Set Pad right margin in fraction of the pad width.
Mother of all ROOT objects.
virtual void Add(TObject *obj)
void SetTitleFillColor(Color_t color=1)
virtual TList * GetListOfKeys() const
virtual void Sumw2(Bool_t flag=kTRUE)
Create structure to store sum of squares of weights.
void SetOptStat(Int_t stat=1)
The type of information printed in the histogram statistics box can be selected via the parameter mod...
void SetOptTitle(Int_t tit=1)
static TImage * Open(const char *file, EImageFileTypes type=kUnknown)
Open a specified image file.
void SetPadTickY(Int_t ticky)
TKey * FindMethod(TString name, TDirectory *dir=0)
virtual Int_t GetNbinsX() const
virtual Int_t GetSize() const
void SetPadRightMargin(Float_t margin=0.1)
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
void SetPalette(Int_t ncolors=kBird, Int_t *colors=0, Float_t alpha=1.)
See TColor::SetPalette.
virtual void Close(Option_t *option="")
Close a file.
TImage * findImage(const char *imageName)
virtual void SetLeftMargin(Float_t leftmargin)
Set Pad left margin in fraction of the pad width.
virtual void SetLabelOffset(Float_t offset=0.005, Option_t *axis="X")
Set offset between axis and axis' labels.
const char * Data() const
UInt_t GetListOfTitles(TDirectory *rfdir, TList &titles)