36 #if __cplusplus > 199711L 40 #if __cplusplus > 199711L 42 static std::mutex gTypesMutex;
66 #if __cplusplus > 199711L 70 if(!
fgTypesPtr.compare_exchange_strong(expected,tmp)) {
85 #if __cplusplus > 199711L 97 #if __cplusplus > 199711L 98 std::lock_guard<std::mutex> guard(gTypesMutex);
100 std::map<TString, EMVA>::const_iterator it =
fStr2type.find( methodname );
103 <<
"Cannot add method " << methodname
104 <<
" to the name->type map because it exists already" <<
Endl;
116 #if __cplusplus > 199711L 117 std::lock_guard<std::mutex> guard(gTypesMutex);
120 std::map<TString, EMVA>::const_iterator it =
fStr2type.find( method );
122 Log() <<
kFATAL <<
"Unknown method in map: " << method <<
Endl;
125 else return it->second;
132 #if __cplusplus > 199711L 133 std::lock_guard<std::mutex> guard(gTypesMutex);
135 std::map<TString, EMVA>::const_iterator it =
fStr2type.begin();
136 for (; it!=
fStr2type.end(); it++)
if (it->second == method)
return it->first;
137 Log() <<
kFATAL <<
"Unknown method index in map: " << method <<
Endl;
MsgLogger & Endl(MsgLogger &ml)
TString GetMethodName(Types::EMVA method) const
static Types & Instance()
the the single instance of "Types" if existin already, or create it (Signleton)
std::map< TString, TMVA::Types::EMVA > fStr2type
Types::EMVA GetMethodType(const TString &method) const
Bool_t AddTypeMapping(Types::EMVA method, const TString &methodname)
static void DestroyInstance()
"destructor" of the single instance
static Types * fgTypesPtr