![]() |
ATLAS Offline Software
|
Registry for Root converters. More...
#include <TConverterRegistry.h>
Public Member Functions | |
| void | AddConverter (TVirtualConverter *conv) |
| Add a new converter to the registry. | |
| void | AddConverter (TVirtualConverter *conv, bool takeown) |
| Add a new converter to the registry. | |
| bool | AddConverter (const char *convname) |
| Add a new converter to the registry. | |
| TVirtualConverter * | GetConverter (const char *name, int checksum) const |
| Look up a converter in the registry by name and checksum. | |
| void | AddStreamerConverter (const std::string &from_type, const std::string &to_type, TMemberStreamer *streamer) |
| TMemberStreamer * | GetStreamerConverter (const std::string &from_type, const std::string &to_type) const |
Static Public Member Functions | |
| static TConverterRegistry * | Instance () |
| Return a pointer to the global registry instance. | |
Private Types | |
| using | Payload = std::pair<TVirtualConverter*, bool> |
| using | CheckSumMap = std::map<UInt_t, Payload> |
| using | MapType = std::map<std::string, CheckSumMap, std::less<>> |
| using | lock_t = std::lock_guard<std::mutex> |
| using | SMapType = std::map<std::string, TMemberStreamer*> |
| Streamer converters. | |
Private Member Functions | |
| ~TConverterRegistry () | |
| Destructor. | |
Private Attributes | |
| MapType | fMap |
| Map of registered converters. | |
| std::mutex | fMutex |
| Protect access to the map. | |
| SMapType | fSMap |
Registry for Root converters.
Definition at line 40 of file TConverterRegistry.h.
|
private |
Definition at line 112 of file TConverterRegistry.h.
|
private |
Definition at line 120 of file TConverterRegistry.h.
|
private |
Definition at line 113 of file TConverterRegistry.h.
|
private |
Definition at line 111 of file TConverterRegistry.h.
|
private |
Streamer converters.
Definition at line 124 of file TConverterRegistry.h.
|
private |
Destructor.
Destroy the registered converters.
Definition at line 156 of file TConverterRegistry.cxx.
| bool TConverterRegistry::AddConverter | ( | const char * | convname | ) |
Add a new converter to the registry.
| convname | The name of the converter class to add. |
This will also add a streamer for the class, to support conversion in non-split mode.
Definition at line 80 of file TConverterRegistry.cxx.
| void TConverterRegistry::AddConverter | ( | TVirtualConverter * | conv | ) |
Add a new converter to the registry.
| 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.
| void TConverterRegistry::AddConverter | ( | TVirtualConverter * | conv, |
| bool | takeown ) |
Add a new converter to the registry.
| 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.
| void TConverterRegistry::AddStreamerConverter | ( | const std::string & | from_type, |
| const std::string & | to_type, | ||
| TMemberStreamer * | streamer ) |
Definition at line 113 of file TConverterRegistry.cxx.
| TVirtualConverter * TConverterRegistry::GetConverter | ( | const char * | name, |
| int | checksum ) const |
Look up a converter in the registry by name and checksum.
| name | The name of the (transient) class. |
| checksum | The checksum of the persistent class. |
Definition at line 99 of file TConverterRegistry.cxx.
|
static |
Return a pointer to the global registry instance.
Definition at line 142 of file TConverterRegistry.cxx.
|
private |
Map of registered converters.
Definition at line 116 of file TConverterRegistry.h.
|
mutableprivate |
Protect access to the map.
Definition at line 119 of file TConverterRegistry.h.
|
private |
Definition at line 125 of file TConverterRegistry.h.