11 #ifndef ROOT_TMVA_OptionMap 12 #define ROOT_TMVA_OptionMap 22 #ifndef ROOT_TMVA_MsgLogger 26 #ifndef ROOT_TObjString 30 #ifndef ROOT_TObjArray 55 Binding(std::map<TString,TString> &fmap,
TString key):fInternalMap(fmap),fInternalKey(key){}
72 ParseValue(fInternalMap[fInternalKey],*const_cast<T*>(&value));
76 template<
class T>
operator T()
89 std::stringstream fStringStream;
93 str=fStringStream.str();
95 fStringStream<<str.
Data();
128 return fOptMap.count( key )==1;
146 for(
auto &item:fOptMap)
148 Log<<
kINFO<<item.first.Data()<<
": "<<item.second.Data()<<
Endl;
163 std::stringstream oss;
164 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)
std::vector< std::vector< double > > Data
void ParseValue(TString &str, T &value, Bool_t input=kTRUE)
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)
TString GetString() const
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)
Abstract ClassifierFactory template that handles arbitrary types.
T GetValue(const TString &key) const
OptionMap(const OptionMap &obj)
const char * Data() const