21 cout <<
"Problems with input file, tried to open " << fin <<
" but somehow did not succeed .." << endl;
27 TString methodName =
"Method_BDT";
30 cout <<
"Could not locate directory 'Method_BDT' in file " << fin << endl;
34 TIter keyIter(&titles);
38 bdtdir = (TDirectory *)key->
ReadObj();
45 const Int_t nPlots = 6;
52 const TString titName = bdtdir->
GetName();
61 TString hname[nPlots]={
"BoostMonitor",
"BoostWeight",
"BoostWeightVsTree",
"ErrFractHist",
"NodesBeforePruning",titName+
"_FOMvsIterFrame"};
65 for (
Int_t i=0; i<nPlots; i++){
68 TH1 *
h = (TH1*) bdtdir->
Get(hname[i]);
71 h->SetMaximum(
h->GetMaximum()*1.3);
73 h->SetMarkerColor(color);
74 h->SetMarkerSize( 0.7 );
75 h->SetMarkerStyle( 24 );
77 h->SetLineColor(color);
78 if(hname[i]==
"NodesBeforePruning")
h->SetTitle(
"Nodes before/after pruning");
80 if(hname[i]==
"NodesBeforePruning"){
81 TH1 *h2 = (TH1*) bdtdir->
Get(
"NodesAfterPruning");
86 if(hname[i]==
"BoostMonitor"){
87 TGraph *
g = (TGraph*) bdtdir->
Get(
"BoostMonitorGraph");
89 BoostMonitorIsDone =
kTRUE;
91 if(hname[i]==titName+
"_FOMvsIterFrame"){
92 TGraph *
g = (TGraph*) bdtdir->
Get(titName+
"_FOMvsIter");
101 if (BoostMonitorIsDone){
111 while ( (key = (TKey*)keys.Next()) && ipad < 26) {
114 TH1F *hx = (TH1F*)obj;
116 if (hhname_.
Contains(
"BoostWeightsInTreeB")){
143 if (BoostMonitorIsDone){
153 while ( (key = (TKey*)keys.Next()) && ipad < 26) {
156 TH1F *hx = (TH1F*)obj;
158 if (hname_.
Contains(
"SigVar0AtTree")){
int Int_t
Signed integer 4 bytes (int).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
Bool_t InheritsFrom(const char *cl) const override
Return kTRUE if this class inherits from a class with name "classname".
TDirectory * GetDirectory(const char *apath, Bool_t printError=false, const char *funcname="GetDirectory") override
Find a directory using apath.
Describe directory structure in memory.
virtual TObject * Get(const char *namecycle)
Return pointer to object identified by namecycle.
virtual TList * GetListOfKeys() const
void GetObject(const char *namecycle, T *&ptr)
Get an object with proper type checking.
void Draw(Option_t *option="") override
Draw this histogram with options.
virtual TObject * ReadObj()
To read a TObject* from the file.
const char * GetName() const override
Returns name of object.
virtual const char * GetTitle() const
Returns title of object.
virtual TClass * IsA() const
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
const char * Data() const
TString & ReplaceAll(const TString &s1, const TString &s2)
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
constexpr std::size_t bufferSize
UInt_t GetListOfTitles(TDirectory *rfdir, TList &titles)
void Initialize(Bool_t useTMVAStyle=kTRUE)
TKey * NextKey(TIter &keyIter, TString className)
TFile * OpenFile(const TString &fin)
void imgconv(TCanvas *c, const TString &fname)
void bdtcontrolplots(TString dataset, TDirectory *)
void BDTControlPlots(TString dataset, TString fin="TMVA.root", Bool_t useTMVAStyle=kTRUE)