#include <NtupleCnvSvc.h>
|
| NtupleCnvSvc (const std::string &name, ISvcLocator *pSvcLocator) |
| Constructor with parameters: More...
|
|
virtual | ~NtupleCnvSvc () |
| Destructor: More...
|
|
virtual StatusCode | initialize () |
| Gaudi Service Implementation. More...
|
|
virtual StatusCode | finalize () |
|
virtual StatusCode | updateServiceState (IOpaqueAddress *pAddress) |
| IConversionSvc and IConverter interfaces More...
|
|
virtual StatusCode | createObj (IOpaqueAddress *pAddress, DataObject *&refpObject) |
| Implementation of IConverter: Create the transient representation of an object from persistent state. More...
|
|
virtual StatusCode | createRep (DataObject *pObject, IOpaqueAddress *&refpAddress) |
| Implementation of IConverter: Convert the transient object to the requested representation. More...
|
|
virtual StatusCode | fillRepRefs (IOpaqueAddress *pAddress, DataObject *pObject) |
| Implementation of IConverter: Resolve the references of the converted object. More...
|
|
virtual StatusCode | connectOutput (const std::string &outputConnectionSpec, const std::string &openMode) |
| Connect the output connection specification to the service with open mode. More...
|
|
virtual StatusCode | connectOutput (const std::string &outputConnectionSpec) |
| Connect the output connection specification to the service with open mode. More...
|
|
virtual StatusCode | commitOutput (const std::string &outputConnectionSpec, bool doCommit) |
| Commit pending output. More...
|
|
virtual StatusCode | createAddress (long svcType, const CLID &clid, const std::string *par, const unsigned long *ip, IOpaqueAddress *&refpAddress) |
| IAddressCreator interfaces More...
|
|
virtual StatusCode | convertAddress (const IOpaqueAddress *pAddress, std::string &refAddress) |
| Convert address to string form. More...
|
|
virtual StatusCode | createAddress (long svcType, const CLID &clid, const std::string &refAddress, IOpaqueAddress *&refpAddress) |
| Create address from string form. More...
|
|
Definition at line 29 of file NtupleCnvSvc.h.
◆ NtupleCnvSvc() [1/2]
Athena::NtupleCnvSvc::NtupleCnvSvc |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
Constructor with parameters:
Definition at line 35 of file NtupleCnvSvc.cxx.
37 base_class(
name, pSvcLocator, ROOT_StorageType )
◆ ~NtupleCnvSvc()
Athena::NtupleCnvSvc::~NtupleCnvSvc |
( |
| ) |
|
|
virtual |
◆ NtupleCnvSvc() [2/2]
Athena::NtupleCnvSvc::NtupleCnvSvc |
( |
| ) |
|
|
private |
◆ commitOutput()
StatusCode Athena::NtupleCnvSvc::commitOutput |
( |
const std::string & |
outputConnectionSpec, |
|
|
bool |
doCommit |
|
) |
| |
|
virtual |
Commit pending output.
Definition at line 172 of file NtupleCnvSvc.cxx.
176 <<
", " << doCommit <<
")...");
177 return StatusCode::SUCCESS;
◆ connectOutput() [1/2]
StatusCode Athena::NtupleCnvSvc::connectOutput |
( |
const std::string & |
outputConnectionSpec | ) |
|
|
virtual |
Connect the output connection specification to the service with open mode.
- Parameters
-
outputConnectionSpec | [IN] the name of the output connection specification as string. |
Definition at line 158 of file NtupleCnvSvc.cxx.
161 << outputConnectionSpec <<
")");
163 TFile *
f = TFile::Open(outputConnectionSpec.c_str(),
"recreate");
165 return StatusCode::FAILURE;
167 return StatusCode::SUCCESS;
◆ connectOutput() [2/2]
StatusCode Athena::NtupleCnvSvc::connectOutput |
( |
const std::string & |
outputConnectionSpec, |
|
|
const std::string & |
openMode |
|
) |
| |
|
virtual |
Connect the output connection specification to the service with open mode.
- Parameters
-
outputConnectionSpec | [IN] the name of the output connection specification as string. |
openMode | [IN] the open mode of the file as string. |
Definition at line 138 of file NtupleCnvSvc.cxx.
142 << outputConnectionSpec <<
", "
146 TFile *
f = TFile::Open(outputConnectionSpec.c_str(),
"recreate");
148 return StatusCode::FAILURE;
151 return StatusCode::SUCCESS;
◆ convertAddress()
StatusCode Athena::NtupleCnvSvc::convertAddress |
( |
const IOpaqueAddress * |
pAddress, |
|
|
std::string & |
refAddress |
|
) |
| |
|
virtual |
Convert address to string form.
- Parameters
-
pAddress | [IN] address to be converted. |
refAddress | [OUT] converted string form. |
Definition at line 209 of file NtupleCnvSvc.cxx.
213 << refAddress <<
")...");
215 refAddress = *pAddress->par();
216 return StatusCode::SUCCESS;
218 ATH_MSG_ERROR(
"::convertAddress: null pointer to IOpaqueAddress !");
219 return StatusCode::FAILURE;
◆ createAddress() [1/2]
StatusCode Athena::NtupleCnvSvc::createAddress |
( |
long |
svcType, |
|
|
const CLID & |
clid, |
|
|
const std::string & |
refAddress, |
|
|
IOpaqueAddress *& |
refpAddress |
|
) |
| |
|
virtual |
Create address from string form.
- Parameters
-
svcType | [IN] service type of the address. |
clid | [IN] class id for the address. |
refAddress | [IN] string form to be converted. |
refpAddress | [OUT] converted address. |
Definition at line 228 of file NtupleCnvSvc.cxx.
234 <<
", " << refAddress <<
", " << refpAddress
236 if (svcType != ROOT_StorageType) {
240 return StatusCode::FAILURE;
242 refpAddress =
new GenericAddress(ROOT_StorageType, clid, refAddress);
243 return StatusCode::SUCCESS;
◆ createAddress() [2/2]
StatusCode Athena::NtupleCnvSvc::createAddress |
( |
long |
svcType, |
|
|
const CLID & |
clid, |
|
|
const std::string * |
par, |
|
|
const unsigned long * |
ip, |
|
|
IOpaqueAddress *& |
refpAddress |
|
) |
| |
|
virtual |
IAddressCreator
interfaces
Create a Generic address using explicit arguments to identify a single object.
- Parameters
-
svcType | [IN] service type of the address. |
clid | [IN] class id for the address. |
par | [IN] string containing the database name. |
ip | [IN] object identifier. |
refpAddress | [OUT] converted address. |
Definition at line 193 of file NtupleCnvSvc.cxx.
200 <<
", " <<
par <<
", " <<
ip <<
", " << refpAddress
202 return ::AthCnvSvc::createAddress(svcType, clid,
par,
ip, refpAddress);
◆ createConverter()
IConverter * Athena::NtupleCnvSvc::createConverter |
( |
long |
typ, |
|
|
const CLID & |
clid, |
|
|
const ICnvFactory * |
fac |
|
) |
| |
|
protectedvirtual |
◆ createObj()
StatusCode Athena::NtupleCnvSvc::createObj |
( |
IOpaqueAddress * |
pAddress, |
|
|
DataObject *& |
refpObject |
|
) |
| |
|
virtual |
Implementation of IConverter: Create the transient representation of an object from persistent state.
- Parameters
-
pAddress | [IN] pointer to IOpaqueAddress of the representation. |
refpObject | [OUT] pointer to DataObject to be created. |
Definition at line 83 of file NtupleCnvSvc.cxx.
85 ATH_MSG_DEBUG(
"-->createObj(" << pAddress->par()[0] <<
"/" << pAddress->par()[1]
86 <<
", " << refpObject <<
")...");
87 GenericAddress *addr =
dynamic_cast<GenericAddress*
>(pAddress);
90 <<
" is NOT a GenericAddress!");
91 return StatusCode::FAILURE;
93 ATH_MSG_DEBUG(
" par: " << pAddress->par()[0] <<
"/" << pAddress->par()[1]
95 " ipar: " << *pAddress->ipar());
◆ createRep()
StatusCode Athena::NtupleCnvSvc::createRep |
( |
DataObject * |
pObject, |
|
|
IOpaqueAddress *& |
refpAddress |
|
) |
| |
|
virtual |
Implementation of IConverter: Convert the transient object to the requested representation.
- Parameters
-
pObject | [IN] pointer to DataObject. |
refpAddress | [OUT] pointer to IOpaqueAddress of the representation to be created. |
Definition at line 105 of file NtupleCnvSvc.cxx.
107 ATH_MSG_DEBUG(
"::createRep(" << refpAddress <<
", " << pObject <<
")...");
110 ATH_MSG_ERROR(
"::createRep: received null ptr to DataObject");
111 return StatusCode::FAILURE;
113 return ::AthCnvSvc::createRep(pObject, refpAddress);
◆ fillRepRefs()
StatusCode Athena::NtupleCnvSvc::fillRepRefs |
( |
IOpaqueAddress * |
pAddress, |
|
|
DataObject * |
pObject |
|
) |
| |
|
virtual |
Implementation of IConverter: Resolve the references of the converted object.
- Parameters
-
pAddress | [IN] pointer to IOpaqueAddress of the representation to be resolved. |
pObject | [IN] pointer to DataObject to be created. |
Definition at line 122 of file NtupleCnvSvc.cxx.
124 ATH_MSG_DEBUG(
"::fillRepRefs(" << pAddress <<
", " << pObject <<
")...");
125 if (0==pAddress || 0==pObject) {
126 ATH_MSG_ERROR(
"::fillRepRefs: null ptr received! (paddr=" << pAddress
127 <<
", pobj=" << pObject <<
")");
128 return StatusCode::FAILURE;
130 return ::AthCnvSvc::fillRepRefs(pAddress, pObject);
◆ finalize()
StatusCode Athena::NtupleCnvSvc::finalize |
( |
| ) |
|
|
virtual |
◆ initialize()
StatusCode Athena::NtupleCnvSvc::initialize |
( |
| ) |
|
|
virtual |
◆ updateServiceState()
StatusCode Athena::NtupleCnvSvc::updateServiceState |
( |
IOpaqueAddress * |
pAddress | ) |
|
|
virtual |
IConversionSvc
and IConverter
interfaces
update the service state (well, just check the IOpaqueAddress
is in fact a GenericAddress
)
Definition at line 67 of file NtupleCnvSvc.cxx.
71 return dynamic_cast<GenericAddress*
>(pAddress)
73 : StatusCode::FAILURE;
75 return StatusCode::FAILURE;
The documentation for this class was generated from the following files: