#include <AthTPCnvSvc.h>
Definition at line 30 of file AthTPCnvSvc.h.
◆ TpCnvs_t
◆ AthTPCnvSvc() [1/2]
AthTPCnvSvc::AthTPCnvSvc |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
Constructor with parameters:
Definition at line 37 of file AthTPCnvSvc.cxx.
39 base_class (
name, pSvcLocator ),
◆ ~AthTPCnvSvc()
AthTPCnvSvc::~AthTPCnvSvc |
( |
| ) |
|
|
overridevirtual |
◆ AthTPCnvSvc() [2/2]
AthTPCnvSvc::AthTPCnvSvc |
( |
| ) |
|
|
private |
◆ load_tpcnv()
load the T/P converter class named cls
return NULL on failure.
the converter is OWNED by the T/P converter service
Definition at line 56 of file AthTPCnvSvc.cxx.
58 ITPCnvBase* cnv = ITPCnvBase::Factory::create (
cls).release();
61 <<
"] via Reflex::PluginService");
64 std::scoped_lock lock (
m_mutex);
◆ p2t_cnv()
return the T/P converter for a persistent class (NULL if failure) ITPCnvSvc
owns the ITPCnvBase
pointer
Definition at line 132 of file AthTPCnvSvc.cxx.
135 ITPCnvBase* cnv = ITPCnvBase::Factory::create (
prefix(
type) +
"_PERS_" + persClassName).release();
137 return p2t_cnv (persClassName);
138 if (cnv ==
nullptr) {
140 << persClassName <<
"]");
143 std::scoped_lock lock (
m_mutex);
144 m_cnvs.emplace_back (cnv);
◆ t2p_cnv() [1/2]
return the T/P converter for a transient class (NULL if failure) ITPCnvSvc
owns the ITPCnvBase
pointer
Definition at line 96 of file AthTPCnvSvc.cxx.
99 std::string trans_type;
100 if (!
m_clidSvc->getTypeNameOfID(transClid, trans_type).isSuccess()) {
101 ATH_MSG_INFO(
"could not get a type-name for clid [" << transClid <<
"]");
105 ITPCnvBase* cnv = ITPCnvBase::Factory::create (
prefix(
type) +
"_TRANS_" + trans_type).release();
106 if (cnv ==
nullptr) {
108 if (!
m_clidSvc->getTypeInfoNameOfID(transClid, trans_type).isSuccess()) {
110 << transClid <<
"]");
113 cnv = ITPCnvBase::Factory::create (
prefix(
type) +
"_TRANS_" + trans_type).release();
117 if (cnv ==
nullptr) {
119 << transClid <<
"] (" << trans_type <<
")");
122 std::scoped_lock lock (
m_mutex);
123 m_cnvs.emplace_back (cnv);
◆ t2p_cnv() [2/2]
return the T/P converter for a transient class (NULL if failure) ITPCnvSvc
owns the ITPCnvBase
pointer
Definition at line 74 of file AthTPCnvSvc.cxx.
78 ITPCnvBase* cnv = ITPCnvBase::Factory::create (
prefix(
type) +
"_TRANS_" + transClassName).release();
80 return t2p_cnv (transClassName);
83 << transClassName <<
"]");
86 std::scoped_lock lock (
m_mutex);
◆ t2p_cnv_unique() [1/2]
Return the T/P converter for a transient class.
Returns null on failure (with no warning printed). Ownership is returned to the caller.
Definition at line 165 of file AthTPCnvSvc.cxx.
167 std::string trans_type;
168 if (!
m_clidSvc->getTypeNameOfID(transClid, trans_type).isSuccess()) {
172 std::unique_ptr<ITPCnvBase> cnv = ITPCnvBase::Factory::create (
"_TRANS_" + trans_type);
173 if (cnv ==
nullptr) {
175 if (!
m_clidSvc->getTypeInfoNameOfID(transClid, trans_type).isSuccess()) {
178 cnv = ITPCnvBase::Factory::create (
"_TRANS_" + trans_type);
◆ t2p_cnv_unique() [2/2]
std::unique_ptr< ITPCnvBase > AthTPCnvSvc::t2p_cnv_unique |
( |
const std::string & |
transClassName | ) |
const |
|
overridevirtual |
return the T/P converter for a transient class (NULL if failure) Ownership is returned to the caller.
Return the T/P converter for a transient class.
Ownership is returned to the caller.
Definition at line 154 of file AthTPCnvSvc.cxx.
156 return ITPCnvBase::Factory::create (
"_TRANS_" + transClassName);
◆ m_clidSvc
handle to a IClassIDSvc
to handle loading of types by CLID
Definition at line 106 of file AthTPCnvSvc.h.
◆ m_cnvs
a registry of ITPCnvBase* instances
Definition at line 111 of file AthTPCnvSvc.h.
◆ m_mutex
std::mutex AthTPCnvSvc::m_mutex |
|
mutableprivate |
The documentation for this class was generated from the following files:
virtual ITPCnvBase * t2p_cnv(const std::string &transClassName, Athena::TPCnvType::Value type=Athena::TPCnvType::Athena) override
return the T/P converter for a transient class (NULL if failure) ITPCnvSvc owns the ITPCnvBase pointe...
virtual ITPCnvBase * p2t_cnv(const std::string &persClassName, Athena::TPCnvType::Value type=Athena::TPCnvType::Athena) override
return the T/P converter for a persistent class (NULL if failure) ITPCnvSvc owns the ITPCnvBase point...