42#if __cplusplus > 199711L
46#if __cplusplus > 199711L
48static std::mutex gTypesMutex;
72#if __cplusplus > 199711L
76 if(!fgTypesPtr.compare_exchange_strong(expected,tmp)) {
83 return fgTypesPtr ? *fgTypesPtr : *(fgTypesPtr =
new Types());
92#if __cplusplus > 199711L
93 if (fgTypesPtr != 0) {
delete fgTypesPtr.load(); fgTypesPtr = 0; }
95 if (fgTypesPtr != 0) {
delete fgTypesPtr; fgTypesPtr = 0; }
103#if __cplusplus > 199711L
104 std::lock_guard<std::mutex> guard(gTypesMutex);
106 std::map<TString, EMVA>::const_iterator it = fStr2type.find( methodname );
107 if (it != fStr2type.end()) {
109 <<
"Cannot add method " << methodname
110 <<
" to the name->type map because it exists already" <<
Endl;
114 fStr2type[methodname] = method;
123#if __cplusplus > 199711L
124 std::lock_guard<std::mutex> guard(gTypesMutex);
126 std::map<TString, EMVA>::const_iterator it = fStr2type.find( method );
127 if (it == fStr2type.end()) {
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;
ostringstream derivative to redirect and format output
Singleton class for Global types used by TMVA.
static void DestroyInstance()
"destructor" of the single instance
TString GetMethodName(Types::EMVA method) const
static Types & Instance()
the the single instance of "Types" if existing already, or create it (Singleton)
Bool_t AddTypeMapping(Types::EMVA method, const TString &methodname)
Types::EMVA GetMethodType(const TString &method) const
returns the method type (enum) for a given method (string)
static Types * fgTypesPtr
MsgLogger & Endl(MsgLogger &ml)