Warning, file /include/root/RooNameReg.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef ROO_NAME_REG
0017 #define ROO_NAME_REG
0018
0019 #include "TNamed.h"
0020
0021 #include <memory>
0022 #include <unordered_map>
0023 #include <string>
0024
0025
0026 class RooNameReg : public TNamed {
0027 public:
0028
0029 RooNameReg(const RooNameReg& other) = delete;
0030
0031 static RooNameReg& instance() ;
0032 const TNamed* constPtr(const char* stringPtr) ;
0033
0034 inline static const char* constStr(const TNamed* ptr) {
0035 return ptr ? ptr->GetName() : nullptr;
0036 }
0037 static const TNamed* ptr(const char* stringPtr) ;
0038
0039 inline static const char* str(const TNamed* ptr) {
0040 return ptr ? ptr->GetName() : nullptr;
0041 }
0042 static const TNamed* known(const char* stringPtr) ;
0043 static const std::size_t& renameCounter() ;
0044
0045 enum {
0046 kRenamedArg = BIT(19)
0047 };
0048
0049 protected:
0050 RooNameReg();
0051
0052 friend class RooAbsArg;
0053 friend class RooAbsData;
0054 static void incrementRenameCounter() ;
0055
0056 std::unordered_map<std::string,std::unique_ptr<TNamed>> _map;
0057 std::size_t _renameCounter = 0;
0058 };
0059
0060 #endif
0061
0062