This class provides the interface between Athena and RootSvc.
More...
#include <RootCnvSvc.h>
|
| RootCnvSvc (const std::string &name, ISvcLocator *pSvcLocator) |
| Standard Service Constructor. More...
|
|
StatusCode | initialize () |
| Gaudi Service Interface method implementations: More...
|
|
StatusCode | finalize () |
|
StatusCode | connectOutput (const std::string &file) |
| Connect the output file to the service. More...
|
|
StatusCode | connectOutput (const std::string &file, const std::string &mode) |
| Connect the output file to the service with open mode. More...
|
|
StatusCode | commitOutput (const std::string &output, bool do_commit) |
| Commit pending output. More...
|
|
StatusCode | createAddress (long svc_type, const CLID &clid, const std::string *par, const unsigned long *ip, IOpaqueAddress *&refpAddress) |
| Create a Generic address using explicit arguments to identify a single object. More...
|
|
StatusCode | convertAddress (const IOpaqueAddress *pAddress, std::string &refAddress) |
| Convert an address to string form. More...
|
|
StatusCode | createAddress (long svc_type, const CLID &clid, const std::string &refAddress, IOpaqueAddress *&refpAddress) |
| Convert an address in string form to object form. More...
|
|
StatusCode | updateServiceState (IOpaqueAddress *pAddress) |
| Update state of the service. More...
|
|
This class provides the interface between Athena and RootSvc.
Definition at line 35 of file RootCnvSvc.h.
◆ RootCnvSvc() [1/3]
Athena::RootCnvSvc::RootCnvSvc |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
Standard Service Constructor.
Definition at line 31 of file RootCnvSvc.cxx.
32 base_class(
name, pSvcLocator, ROOT_StorageType),
◆ RootCnvSvc() [2/3]
Athena::RootCnvSvc::RootCnvSvc |
( |
| ) |
|
|
private |
◆ RootCnvSvc() [3/3]
◆ commitOutput()
StatusCode Athena::RootCnvSvc::commitOutput |
( |
const std::string & |
output, |
|
|
bool |
do_commit |
|
) |
| |
◆ connectOutput() [1/2]
StatusCode Athena::RootCnvSvc::connectOutput |
( |
const std::string & |
file | ) |
|
Connect the output file to the service.
Definition at line 78 of file RootCnvSvc.cxx.
◆ connectOutput() [2/2]
StatusCode Athena::RootCnvSvc::connectOutput |
( |
const std::string & |
file, |
|
|
const std::string & |
mode |
|
) |
| |
Connect the output file to the service with open mode.
Definition at line 59 of file RootCnvSvc.cxx.
61 std::string::size_type inx1 =
file.find(
'(');
62 if (inx1 != std::string::npos) {
63 std::string::size_type inx2 =
file.find(
')');
64 if (inx2 == std::string::npos || inx2 !=
file.size() - 1) {
65 return StatusCode::FAILURE;
72 return StatusCode::FAILURE;
◆ convertAddress()
StatusCode Athena::RootCnvSvc::convertAddress |
( |
const IOpaqueAddress * |
pAddress, |
|
|
std::string & |
refAddress |
|
) |
| |
Convert an address to string form.
Definition at line 102 of file RootCnvSvc.cxx.
103 ATH_MSG_VERBOSE(
"::convertAddress(pAddr = " << pAddress <<
", refPaddr = " << refAddress <<
")");
104 return StatusCode::FAILURE;
◆ createAddress() [1/2]
StatusCode Athena::RootCnvSvc::createAddress |
( |
long |
svc_type, |
|
|
const CLID & |
clid, |
|
|
const std::string & |
refAddress, |
|
|
IOpaqueAddress *& |
refpAddress |
|
) |
| |
Convert an address in string form to object form.
Definition at line 107 of file RootCnvSvc.cxx.
112 <<
"svc_type=" << svc_type <<
", "
113 <<
"clid=" << clid <<
", "
114 <<
"refaddr=" << refAddress <<
", "
115 <<
"refpaddr=" << refpAddress <<
")");
117 return StatusCode::FAILURE;
◆ createAddress() [2/2]
StatusCode Athena::RootCnvSvc::createAddress |
( |
long |
svc_type, |
|
|
const CLID & |
clid, |
|
|
const std::string * |
par, |
|
|
const unsigned long * |
ip, |
|
|
IOpaqueAddress *& |
refpAddress |
|
) |
| |
Create a Generic address using explicit arguments to identify a single object.
Definition at line 87 of file RootCnvSvc.cxx.
93 <<
"svc_type=" << svc_type <<
", "
94 <<
"clid=" << clid <<
", "
95 <<
"par=" <<
par[0] <<
", " <<
par[1] <<
" "
96 <<
"ip=" <<
ip[0] <<
", " <<
ip[1] <<
" "
97 <<
"refpaddr=" << refpAddress <<
")");
98 refpAddress =
new GenericAddress(ROOT_StorageType, clid,
par[0],
par[1],
ip[0],
ip[1]);
99 return StatusCode::SUCCESS;
◆ createConverter()
IConverter * Athena::RootCnvSvc::createConverter |
( |
long |
typ, |
|
|
const CLID & |
clid, |
|
|
const ICnvFactory * |
fac |
|
) |
| |
|
protected |
Create new converter using factory.
Definition at line 161 of file RootCnvSvc.cxx.
162 ATH_MSG_VERBOSE(
"createConverter typ = " << typ <<
", clid = " << clid);
163 if (typ == ROOT_StorageType) {
166 return ::AthCnvSvc::createConverter(typ, clid, fac);
◆ finalize()
StatusCode Athena::RootCnvSvc::finalize |
( |
| ) |
|
◆ getTPConverter()
Get T/P converter for a transient class.
Definition at line 155 of file RootCnvSvc.cxx.
◆ getType() [1/2]
◆ getType() [2/2]
RootType Athena::RootCnvSvc::getType |
( |
const std::type_info & |
type | ) |
const |
|
protected |
◆ initialize()
StatusCode Athena::RootCnvSvc::initialize |
( |
| ) |
|
Gaudi Service Interface method implementations:
Definition at line 39 of file RootCnvSvc.cxx.
43 return StatusCode::FAILURE;
51 return StatusCode::SUCCESS;
◆ operator=()
◆ updateServiceState()
StatusCode Athena::RootCnvSvc::updateServiceState |
( |
IOpaqueAddress * |
pAddress | ) |
|
Update state of the service.
Definition at line 120 of file RootCnvSvc.cxx.
121 ATH_MSG_VERBOSE(
"RootCnvSvc::updateServiceState(paddr = " << pAddress <<
")");
122 return StatusCode::FAILURE;
◆ writeObject()
Write object of a given class to Root, using optional T/P converter.
Definition at line 136 of file RootCnvSvc.cxx.
140 const Token* token = 0;
144 if (tpConverter == 0) {
145 token =
m_rootSvc->writeObject(placement, typeDesc, pObj);
147 void* pers =
m_rootSvc->createObject(typeDesc);
149 token =
m_rootSvc->writeObject(placement, typeDesc, pers);
150 m_rootSvc->destructObject(typeDesc, pers); pers = 0;
◆ m_dictSvc
◆ m_rootSvc
◆ m_tpCnvSvc
◆ m_treeName
std::string Athena::RootCnvSvc::m_treeName |
|
private |
The documentation for this class was generated from the following files:
virtual void transToPersUntyped(const void *trans, void *pers, MsgStream &msg)=0
Convert transient object representation to persistent.