53 : fTreeType(
Types::kTraining),
55 fStorage( new
TList() ),
63: fTreeType(
Types::kTraining),
65fStorage( new
TList() ),
90 while (
auto p =
l()) {
92 *fLogger << kFATAL <<
"Histogram pointer " << (
void *)
p <<
" already exists in results storage" <<
Endl;
97 if (fHistAlias->find(as) != fHistAlias->end()) {
99 *fLogger << kFATAL <<
"Alias " << as <<
" already exists in results storage" <<
Endl;
102 ((
TH1*)obj)->SetDirectory(
nullptr);
104 fStorage->Add( obj );
105 fHistAlias->insert(std::pair<TString, TObject*>(as,obj));
114 std::map<TString, TObject*>::iterator it = fHistAlias->find(alias);
116 if (it != fHistAlias->end())
return it->second;
129 TObject* test = GetObject(alias);
131 return (test !=
nullptr);
138 TH1* out=
dynamic_cast<TH1*
>(GetObject(alias));
139 if (!out) Log() <<kWARNING <<
"You have asked for histogram " << alias <<
" which does not seem to exist in *Results* .. better don't use it " <<
Endl;
147 TH2* out=
dynamic_cast<TH2*
>(GetObject(alias));
148 if (!out) Log() <<kWARNING <<
"You have asked for 2D histogram " << alias <<
" which does not seem to exist in *Results* .. better don't use it " <<
Endl;
155 return (
TGraph*)GetObject(alias);
winID h TVirtualViewer3D TVirtualGLPainter p
static char * Format(const char *format, va_list ap)
Format a string in a circular formatting buffer (using a printf style format descriptor).
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
A TGraph is an object made of two arrays X and Y with npoints each.
TH1 is the base class of all histogram classes in ROOT.
Service class for 2-D histogram classes.
Class that contains all the data information.
ostringstream derivative to redirect and format output
TGraph * GetGraph(const TString &alias) const
TList * fStorage
-> stores all the result-histograms
Bool_t DoesExist(const TString &alias) const
Returns true if there is an object stored in the result for a given alias, false otherwise.
void Store(TObject *obj, const char *alias=nullptr)
TH2 * GetHist2D(const TString &alias) const
TObject * GetObject(const TString &alias) const
Returns a stored object if it exists.
TH1 * GetHist(const TString &alias) const
virtual ~Results()
destructor
void Delete(Option_t *option="") override
delete all stored histograms
Singleton class for Global types used by TMVA.
Mother of all ROOT objects.
virtual const char * GetName() const
Returns name of object.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
create variable transformations
MsgLogger & Endl(MsgLogger &ml)