Registry for Root converters.
More...
#include <TConverterRegistry.h>
Registry for Root converters.
Definition at line 40 of file TConverterRegistry.h.
◆ CheckSumMap
◆ lock_t
◆ MapType
◆ Payload
◆ SMapType
◆ ~TConverterRegistry()
| TConverterRegistry::~TConverterRegistry |
( |
| ) |
|
|
private |
Destructor.
Destroy the registered converters.
Definition at line 156 of file TConverterRegistry.cxx.
158 for (
auto& [
name, checksum_map] :
fMap) {
159 for (
auto& [checksum,
payload] : checksum_map) {
◆ AddConverter() [1/3]
| bool TConverterRegistry::AddConverter |
( |
const char * |
convname | ) |
|
Add a new converter to the registry.
- Parameters
-
| convname | The name of the converter class to add. |
- Returns
- True if successful, false if the class couldn't be found.
This will also add a streamer for the class, to support conversion in non-split mode.
Definition at line 80 of file TConverterRegistry.cxx.
82 TClass*
cl = gROOT->GetClass (convname);
83 if (!
cl)
return false;
84 TClass* basecl = gROOT->GetClass (
"TVirtualConverter");
85 int offs =
cl->GetBaseClassOffset (basecl);
86 if (offs < 0)
return false;
87 char* cnv =
reinterpret_cast<char*
> (
cl->New());
◆ AddConverter() [2/3]
Add a new converter to the registry.
- Parameters
-
| conv | The converter to add. |
This will also add a streamer for the class, to support conversion in non-split mode.
The caller will retain ownership of the converter.
Definition at line 35 of file TConverterRegistry.cxx.
◆ AddConverter() [3/3]
Add a new converter to the registry.
- Parameters
-
| conv | The converter to add. |
| takeown | If true, the registry takes ownership of the converter. |
This will also add a streamer for the class, to support conversion in non-split mode.
Definition at line 49 of file TConverterRegistry.cxx.
59 TClass*
cls =
conv->GetTransClass();
68 cmap[
conv->GetCheckSum()] = std::make_pair (
conv, takeown);
◆ AddStreamerConverter()
| void TConverterRegistry::AddStreamerConverter |
( |
const std::string & |
from_type, |
|
|
const std::string & |
to_type, |
|
|
TMemberStreamer * |
streamer |
|
) |
| |
◆ GetConverter()
Look up a converter in the registry by name and checksum.
- Parameters
-
| name | The name of the (transient) class. |
| checksum | The checksum of the persistent class. |
- Returns
- The converter, or nullptr if none.
Definition at line 99 of file TConverterRegistry.cxx.
104 if (
i !=
fMap.end()) {
105 auto i2 =
i->second.find (checksum);
106 if (i2 !=
i->second.end())
107 return i2->second.first;
◆ GetStreamerConverter()
| TMemberStreamer * TConverterRegistry::GetStreamerConverter |
( |
const std::string & |
from_type, |
|
|
const std::string & |
to_type |
|
) |
| const |
◆ Instance()
◆ fMap
◆ fMutex
| std::mutex TConverterRegistry::fMutex |
|
mutableprivate |
◆ fSMap
The documentation for this class was generated from the following files: