|
ATLAS Offline Software
|
Go to the documentation of this file.
19 #include "GaudiKernel/DataObject.h"
20 #include "GaudiKernel/GenericAddress.h"
32 base_class(
name, pSvcLocator, ROOT_StorageType),
33 m_dictSvc(
"AthDictLoaderSvc",
name),
34 m_tpCnvSvc(
"AthTPCnvSvc",
name),
35 m_rootSvc(
"Athena::RootSvc/AthenaRootSvc",
name),
36 m_treeName(
"CollectionTree") {
43 return StatusCode::FAILURE;
51 return StatusCode::SUCCESS;
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;
89 const std::string*
par,
90 const unsigned long*
ip,
91 IOpaqueAddress*& refpAddress) {
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;
103 ATH_MSG_VERBOSE(
"::convertAddress(pAddr = " << pAddress <<
", refPaddr = " << refAddress <<
")");
104 return StatusCode::FAILURE;
109 const std::string& refAddress,
110 IOpaqueAddress*& refpAddress) {
112 <<
"svc_type=" << svc_type <<
", "
113 <<
"clid=" << clid <<
", "
114 <<
"refaddr=" << refAddress <<
", "
115 <<
"refpaddr=" << refpAddress <<
")");
117 return StatusCode::FAILURE;
121 ATH_MSG_VERBOSE(
"RootCnvSvc::updateServiceState(paddr = " << pAddress <<
")");
122 return StatusCode::FAILURE;
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;
162 ATH_MSG_VERBOSE(
"createConverter typ = " << typ <<
", clid = " << clid);
163 if (typ == ROOT_StorageType) {
166 return ::AthCnvSvc::createConverter(typ, clid, fac);
ServiceHandle< ::IRootSvc > m_rootSvc
ServiceHandle to the root service.
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
This class holds all the necessary information to guide the writing of an object in a physical place.
ServiceHandle< ::IDictLoaderSvc > m_dictSvc
ServiceHandle to the dictionary service.
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.
StatusCode connectOutput(const std::string &file)
Connect the output file to the service.
RootType getType(const CLID &clid) const
This file contains the class definition for the Athena::RootCnv class.
RootCnvSvc()
Default constructor:
#define ATH_MSG_VERBOSE(x)
ITPCnvBase * getTPConverter(const CLID &clid) const
Get T/P converter for a transient class.
Placement & setContainerName(const std::string &containerName)
Set container name.
StatusCode updateServiceState(IOpaqueAddress *pAddress)
Update state of the service.
This class provides a token that identifies in a unique way objects on the persistent storage.
virtual void transToPersUntyped(const void *trans, void *pers, MsgStream &msg)=0
Convert transient object representation to persistent.
StatusCode commitOutput(const std::string &output, bool do_commit)
Commit pending output.
Some weak symbol referencing magic...
::StatusCode StatusCode
StatusCode definition for legacy code.
StatusCode convertAddress(const IOpaqueAddress *pAddress, std::string &refAddress)
Convert an address to string form.
const Token * writeObject(const std::string &key, const RootType &typeDesc, const void *pObj, ITPCnvBase *tpConverter=0)
Write object of a given class to Root, using optional T/P converter.
This file contains the class definition for the RootSvc class.
uint32_t CLID
The Class ID type.
IConverter * createConverter(long typ, const CLID &clid, const ICnvFactory *fac)
Create new converter using factory.
StatusCode initialize()
Gaudi Service Interface method implementations:
This file contains the class definition for the IRootSvc interface class.
Placement & setTechnology(int technology)
Set technology type.
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
std::string m_treeName
ROOT TTree name.
This class provides the abstract converter to translate an object to/from its persistent ROOT represe...
This file contains the class definition for the Placement class (migrated from POOL).
virtual StatusCode initialize() override
Gaudi Service Implementation.
ServiceHandle< ::ITPCnvSvc > m_tpCnvSvc
ServiceHandle to the T/P conversion service.