22 cout <<
"--- Open CorrGui for input file: " << fin <<
" and type: " << dirName << endl;
29 extension.ReplaceAll(
"InputVariables",
"" );
32 TControlBar* cbar =
new TControlBar(
"vertical", title, 50, 50 );
35 const char* buttonType =
"button";
42 TDirectory* dir = (TDirectory*)file->
GetDirectory(dataset)->
Get(dirName );
44 cout <<
"Could not locate directory '" << dirName <<
"' in file: " << fin << endl;
45 cout <<
" Try again .. " <<endl;
50 cout <<
"Nope ..Could not locate directory '" << dirName <<
"' in file: " << fin << endl;
58 cout <<
"found number of variables='" << noVar<< endl;
59 std::vector<TString>
Var(noVar);
65 while ( (key = (TKey*)next()) ) {
70 TH1 *sig = (TH1*)key->
ReadObj();
82 cout <<
"found histos for "<< it <<
" variables='" << endl;
84 for (
Int_t ic=0;ic<it;ic++) {
85 cbar->
AddButton( (Var[ic].Contains(
"_target") ?
88 TString::Format(
"TMVA::correlationscatters(\"%s\",\"%s\",\"%s\",\"%s\",\"%s\",%i)",dataset.
Data(),fin.
Data(), Var[ic].Data(), dirName.
Data(), title.Data(), (
Int_t)isRegression ),
101 gROOT->SaveContext();
int Int_t
Signed integer 4 bytes (int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
Bool_t InheritsFrom(const char *cl) const override
Return kTRUE if this class inherits from a class with name "classname".
void Show()
Show control bar.
void AddButton(TControlBarButton *button)
Add button.
void SetTextColor(const char *colorName)
Sets text color for control bar buttons, e.g.:
TDirectory * GetDirectory(const char *apath, Bool_t printError=false, const char *funcname="GetDirectory") override
Find a directory using apath.
virtual TObject * Get(const char *namecycle)
Return pointer to object identified by namecycle.
virtual Bool_t cd()
Change current directory to "this" directory.
virtual TList * GetListOfKeys() const
virtual const char * GetClassName() const
virtual TObject * ReadObj()
To read a TObject* from the file.
const char * GetName() const override
Returns name of object.
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
double Var(const RVec< T > &v)
Get the variance of the elements of an RVec.
void Initialize(Bool_t useTMVAStyle=kTRUE)
Int_t GetNumberOfInputVariables(TDirectory *dir)
TFile * OpenFile(const TString &fin)
void CorrGui_DeleteTBar()
void CorrGui(TString dataset, TString fin="TMVA.root", TString dirName="InputVariables_Id", TString title="TMVA Input Variable", Bool_t isRegression=kFALSE)