42 #if __cplusplus > 199711L 46 #if __cplusplus > 199711L 48 static std::mutex gTypesMutex;
72 #if __cplusplus > 199711L 76 if(!
fgTypesPtr.compare_exchange_strong(expected,tmp)) {
92 #if __cplusplus > 199711L 103 #if __cplusplus > 199711L 104 std::lock_guard<std::mutex> guard(gTypesMutex);
106 std::map<TString, EMVA>::const_iterator it =
fStr2type.find( methodname );
109 <<
"Cannot add method " << methodname
110 <<
" to the name->type map because it exists already" <<
Endl;
123 #if __cplusplus > 199711L 124 std::lock_guard<std::mutex> guard(gTypesMutex);
126 std::map<TString, EMVA>::const_iterator it =
fStr2type.find( method );
128 Log() << kFATAL <<
"Unknown method in map: " << method <<
Endl;
131 else return it->second;
138 #if __cplusplus > 199711L 139 std::lock_guard<std::mutex> guard(gTypesMutex);
141 std::map<TString, EMVA>::const_iterator it =
fStr2type.begin();
142 for (; it!=
fStr2type.end(); ++it)
if (it->second == method)
return it->first;
143 Log() << kFATAL <<
"Unknown method index in map: " << method <<
Endl;
MsgLogger & Endl(MsgLogger &ml)
Singleton class for Global types used by TMVA.
TString GetMethodName(Types::EMVA method) const
static Types & Instance()
the the single instance of "Types" if existing already, or create it (Singleton)
std::map< TString, TMVA::Types::EMVA > fStr2type
Types::EMVA GetMethodType(const TString &method) const
returns the method type (enum) for a given method (string)
Bool_t AddTypeMapping(Types::EMVA method, const TString &methodname)
static void DestroyInstance()
"destructor" of the single instance
static Types * fgTypesPtr
ostringstream derivative to redirect and format output