ATLAS Offline Software
Loading...
Searching...
No Matches
T_AthenaPoolCustCnv.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef ATHENAPOOLCNVSVC_T_ATHENAPOOLCUSTCNV_H
6#define ATHENAPOOLCNVSVC_T_ATHENAPOOLCUSTCNV_H
7
12
14
17
18namespace pool {
19 typedef ::Guid Guid;
20}
21
22#include <string>
23#include <map>
24
25class DataObject;
26class StatusCode;
27
29template <class TYPE> class CnvFactory;
30
34template <class TRANS, class PERS>
36 friend class CnvFactory<T_AthenaPoolCustCnv<TRANS, PERS> >;
37
38protected:
40 T_AthenaPoolCustCnv(ISvcLocator* pSvcLocator,
41 const char* name = nullptr);
42
44 virtual StatusCode initialize();
45
47 template <class P>
48 Placement setPlacementForP(P& p, const std::string& key, const std::string& output);
49
53 virtual StatusCode DataObjectToPers(DataObject* pObj, IOpaqueAddress*& pAddr);
54
58 virtual StatusCode DataObjectToPool(IOpaqueAddress* pAddr, DataObject* pObj);
59
64 virtual StatusCode PoolToDataObject(DataObject*& pObj, const Token* token,
65 const std::string& key);
66
71 template <class P>
72 StatusCode objectToPool(P* pObj, std::unique_ptr<Token>& token, const std::string& key, const std::string& output);
73
77 template <class P>
78 StatusCode poolToObject(const Token*& token, P*& pObj);
79
80 virtual StatusCode transToPers(TRANS* obj, PERS*& persObj) = 0;
81 virtual StatusCode persToTrans(TRANS*& transObj, PERS* obj) = 0;
82
86 virtual bool compareClassGuid(const Guid &clid) const;
87
92 virtual void setToken(const std::string& token);
93
94 // the POOL class ID (GUID) of the object being read.
95 // Set by PoolToDataObject() available in createTransient()
97
98public:
100 static const CLID& classID();
101};
102
104#endif
uint32_t CLID
The Class ID type.
This file contains the class definition for the Guid class (migrated from POOL).
static Double_t P(Double_t *tt, Double_t *par)
RpcSectorLogicContainer_p1 PERS
his file contains the class definition for the templated T_AthenaPoolCnvBase class.
This file contains the class definition for the Token class (migrated from POOL).
Abstract factory to create the converter.
This class provides a encapsulation of a GUID/UUID/CLSID/IID data structure (128 bit number).
Definition Guid.h:25
This class holds all the necessary information to guide the writing of an object in a physical place.
Definition Placement.h:19
T_AthenaPoolCnvBase(ISvcLocator *svcloc, const char *name=nullptr)
virtual StatusCode persToTrans(TRANS *&transObj, PERS *obj)=0
StatusCode objectToPool(P *pObj, std::unique_ptr< Token > &token, const std::string &key, const std::string &output)
Write an object into POOL returning its token.
StatusCode poolToObject(const Token *&token, P *&pObj)
Read an object from POOL.
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.
virtual StatusCode DataObjectToPool(IOpaqueAddress *pAddr, DataObject *pObj)
Write an object into POOL.
static const CLID & classID()
virtual void setToken(const std::string &token)
Set the token (in std::string representation) and classID for the object that will be read next.
virtual StatusCode DataObjectToPers(DataObject *pObj, IOpaqueAddress *&pAddr)
Convert an object into Persistent.
Placement setPlacementForP(P &p, const std::string &key, const std::string &output)
Set POOL placement for type P.
virtual StatusCode initialize()
Gaudi Service Interface method implementations:
virtual StatusCode transToPers(TRANS *obj, PERS *&persObj)=0
T_AthenaPoolCustCnv(ISvcLocator *pSvcLocator, const char *name=nullptr)
Constructor.
virtual StatusCode PoolToDataObject(DataObject *&pObj, const Token *token, const std::string &key)
Read an object from POOL.
This class provides a token that identifies in a unique way objects on the persistent storage.
Definition Token.h:21
pool namespace
Definition libname.h:15