11 #ifndef ROOT_TMVA_OptionMap 12 #define ROOT_TMVA_OptionMap 47 Binding(std::map<TString,TString> &fmap,
TString key):fInternalMap(fmap),fInternalKey(key){}
64 ParseValue(fInternalMap[fInternalKey],*const_cast<T*>(&value));
68 template<
class T>
operator T()
81 std::stringstream fStringStream;
85 str=fStringStream.str();
87 fStringStream<<str.
Data();
121 return fOptMap.count( key )==1;
139 for(
auto &item:fOptMap)
141 Log<<kINFO<<item.first.Data()<<
": "<<item.second.Data()<<
Endl;
156 std::stringstream oss;
157 oss<<fOptMap.at(key);
std::map< TString, TString > & fInternalMap
MsgLogger & Endl(MsgLogger &ml)
Collectable string class.
Binding & operator=(const Binding &obj)
OptionMap(const TString options="", const TString name="Option")
T GetValue(const TString &key)
TString & ReplaceAll(const TString &s1, const TString &s2)
class to storage options for the differents methods
Binding & operator=(const T &value)
OptionMap(const Char_t *options, const TString name="Option")
Binding & operator[](TString key)
#define ClassDef(name, id)
void ParseValue(TString &str, T &value, Bool_t input=kTRUE)
const TString & GetString() const
std::map< TString, TString > fOptMap
Binding(std::map< TString, TString > &fmap, TString key)
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
void ParseOption(TString options)
Bool_t HasKey(TString key)
OptionMap & operator=(TString options)
TObjArray * Tokenize(const TString &delim) const
This function is used to isolate sequential tokens in a TString.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Binding(const Binding &obj)
ostringstream derivative to redirect and format output
Abstract ClassifierFactory template that handles arbitrary types.
T GetValue(const TString &key) const
OptionMap(const OptionMap &obj)
const char * Data() const