![]() |
ATLAS Offline Software
|
Set up plugin loading of TP converters. More...
#include "Gaudi/PluginService.h"Go to the source code of this file.
Classes | |
| struct | Athena::TPCnvVers |
| struct | Athena::TPCnvType |
Namespaces | |
| namespace | Athena |
| Some weak symbol referencing magic... These are declared in AthenaKernel/getMessageSvc.h and will be non-nullptr in case the GaudiSvc/AthenaKernel shared libraries have been loaded. | |
Macros | |
| #define | DO_ATHTPCNV_FACTORY_REGISTER_CNAME(name, serial) |
| #define | DO_ATHTPCNV_PLUGINSVC_FACTORY_WITH_ID(type, id, trans_type, pers_type, is_last_version, cnv_type, signature, serial) |
| #define | DO_ATHTPCNV_PLUGINSVC_FACTORY(type, trans_type, pers_type, is_last_version, cnv_type, signature, serial) |
| #define | ATHTPCNV_PLUGINSVC_FACTORY(type, trans_type, pers_type, is_last_version, signature) |
| #define | TRIGTPCNV_PLUGINSVC_FACTORY(type, trans_type, pers_type, is_last_version, signature) |
| #define | ATHTPCNV_PLUGINSVC_FACTORY_WITH_ID(type, id, trans_type, pers_type, is_last_version, signature) |
| #define | TRIGTPCNV_PLUGINSVC_FACTORY_WITH_ID(type, id, trans_type, pers_type, is_last_version, signature) |
| #define | DECLARE_TPCNV_FACTORY(x, trans_type, pers_type, is_last_version) |
| #define | DECLARE_TRIGTPCNV_FACTORY(x, trans_type, pers_type, is_last_version) |
| #define | DECLARE_NAMED_TPCNV_FACTORY(x, n, trans_type, pers_type, is_last_version) |
| #define | DECLARE_NAMED_TRIGTPCNV_FACTORY(x, n, trans_type, pers_type, is_last_version) |
Set up plugin loading of TP converters.
The definitions here are used to allow loading the TP converters directly via the Gaudi plugin mechanism.
In a TPCnv package, create a source file with the same name as the package, add add this to your requirements file:
That file should contain a declaration like this for each TP converter:
The first three arguments should be the converter class, the transient class, and the persistent class, respectively. The fourth argument should be Athena::TPCnvVers::Current if this is the most recent version of the converter. You should also declare previous versions of the converter, using Old:
There is a separate macro DECLARE_TRIGTPCNV_FACTORY to allow declaring separate converters to use for the trigger.
Finally, in some cases you may need to use a different name for the plugin than the C++ class name. This is generally the case if the converter class is actually a typedef. In that case, use DECLARE_NAMED_TPCNV_FACTORY:
The implementation is very simple. Let the converter, transient, and persistent types be C, T, and P, respectively. We always make plugin entries for C and _PERS_P. If the converter is current, we also make an entry for _TRANS_T. If the converter is for _TRIG, we add _TRIG to the front of the pers and trans names.
Thus, to find the correct converter for a transient class, we look up _TRANS_T; and for a persistent class we look up _PERS_P. For TRIG, we first try the look up with _TRIG in front of those names. To get the transient class name corresponding to a persistent class, we create an instance of the converter and use the transientTInfo interface. No registry is needed beyond the existing Gaudi plugin registry.
One limitation: if you have multiple transient classes that use the same persistent class, you'll get warnings from the plugin service.
Definition in file TPCnvFactory.h.
| #define ATHTPCNV_PLUGINSVC_FACTORY | ( | type, | |
| trans_type, | |||
| pers_type, | |||
| is_last_version, | |||
| signature ) |
Definition at line 149 of file TPCnvFactory.h.
| #define ATHTPCNV_PLUGINSVC_FACTORY_WITH_ID | ( | type, | |
| id, | |||
| trans_type, | |||
| pers_type, | |||
| is_last_version, | |||
| signature ) |
Definition at line 154 of file TPCnvFactory.h.
| #define DECLARE_NAMED_TPCNV_FACTORY | ( | x, | |
| n, | |||
| trans_type, | |||
| pers_type, | |||
| is_last_version ) |
Definition at line 171 of file TPCnvFactory.h.
| #define DECLARE_NAMED_TRIGTPCNV_FACTORY | ( | x, | |
| n, | |||
| trans_type, | |||
| pers_type, | |||
| is_last_version ) |
Definition at line 174 of file TPCnvFactory.h.
| #define DECLARE_TPCNV_FACTORY | ( | x, | |
| trans_type, | |||
| pers_type, | |||
| is_last_version ) |
Definition at line 165 of file TPCnvFactory.h.
| #define DECLARE_TRIGTPCNV_FACTORY | ( | x, | |
| trans_type, | |||
| pers_type, | |||
| is_last_version ) |
Definition at line 168 of file TPCnvFactory.h.
| #define DO_ATHTPCNV_FACTORY_REGISTER_CNAME | ( | name, | |
| serial ) |
Definition at line 117 of file TPCnvFactory.h.
| #define DO_ATHTPCNV_PLUGINSVC_FACTORY | ( | type, | |
| trans_type, | |||
| pers_type, | |||
| is_last_version, | |||
| cnv_type, | |||
| signature, | |||
| serial ) |
Definition at line 144 of file TPCnvFactory.h.
| #define DO_ATHTPCNV_PLUGINSVC_FACTORY_WITH_ID | ( | type, | |
| id, | |||
| trans_type, | |||
| pers_type, | |||
| is_last_version, | |||
| cnv_type, | |||
| signature, | |||
| serial ) |
Definition at line 126 of file TPCnvFactory.h.
| #define TRIGTPCNV_PLUGINSVC_FACTORY | ( | type, | |
| trans_type, | |||
| pers_type, | |||
| is_last_version, | |||
| signature ) |
Definition at line 151 of file TPCnvFactory.h.
| #define TRIGTPCNV_PLUGINSVC_FACTORY_WITH_ID | ( | type, | |
| id, | |||
| trans_type, | |||
| pers_type, | |||
| is_last_version, | |||
| signature ) |
Definition at line 156 of file TPCnvFactory.h.