ATLAS Offline Software
Loading...
Searching...
No Matches
T_AthenaPoolCoolMultChanCnv.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef ATHENAPOOLCNVSVC_T_ATHENAPOOLCOOLMULTCHANCNV_H
6#define ATHENAPOOLCNVSVC_T_ATHENAPOOLCOOLMULTCHANCNV_H
7
16
19
20#include <memory>
21#include <string>
22
23class DataObject;
24class StatusCode;
26
28template <class TYPE> class CnvFactory;
29
36template <class COLL_T, class ELEM_T, class ELEM_P = ELEM_T>
37class T_AthenaPoolCoolMultChanCnv : public T_AthenaPoolCustCnv<COLL_T, ELEM_T> {
38
39public:
41 T_AthenaPoolCoolMultChanCnv(ISvcLocator* svcloc);
42
43protected:
47 virtual StatusCode createObj(IOpaqueAddress* pAddr, DataObject*& pObj) override;
48
52 virtual StatusCode createRep(DataObject* pObj, IOpaqueAddress*& pAddr) override;
53
57 virtual StatusCode fillRepRefs(IOpaqueAddress* pAddr, DataObject* pObj) override;
58
64 StatusCode objectToAttrListColl ATLAS_NOT_THREAD_SAFE
65 (COLL_T* obj, IOpaqueAddress*& pAddr,
66 CondAttrListCollection*& attrListColl,
67 std::unique_ptr<Token>& token);
68
75 COLL_T*& obj);
76
81 StatusCode condMultChanCollImplToObject(const std::string& collImplToken,
82 COLL_T*& obj);
83
84 // the 2 following methods are allowed to throw std::runtime_error
85
92 virtual ELEM_P* createPersistent(ELEM_T* obj);
93
102 virtual ELEM_T* createTransient(const Token* token);
103
104 //-------------------------------------------------------------------
105 // Helper methods intended to by used when implementing createTransient()
106
112 template <class P>
113 P* poolReadObject(const Token* token);
114
115 ELEM_T* poolReadObject(const Token* token);
116
118 virtual StatusCode transToPers(COLL_T* obj, ELEM_T*& persObj) override;
119 virtual StatusCode persToTrans(COLL_T*& transObj, ELEM_T* obj) override;
120
121protected:
122
124 int m_persCtx { 0 };
125
126};
127
129#endif
static Double_t P(Double_t *tt, Double_t *par)
his file contains the class definition for the templated T_AthenaPoolCustCnv class.
This file contains the class definition for the Token class (migrated from POOL).
Abstract factory to create the converter.
This class is a collection of AttributeLists where each one is associated with a channel number.
T_AthenaPoolCoolMultChanCnv(ISvcLocator *svcloc)
Constructor.
virtual StatusCode transToPers(COLL_T *obj, ELEM_T *&persObj) override
Dummy methods not needed here.
StatusCode condMultChanCollImplToObject(const std::string &collImplToken, COLL_T *&obj)
Read in CondAttrListCollImpl and the objects for its tokens, saving them in the output collection.
StatusCode objectToAttrListColl ATLAS_NOT_THREAD_SAFE(COLL_T *obj, IOpaqueAddress *&pAddr, CondAttrListCollection *&attrListColl, std::unique_ptr< Token > &token)
Write out objects stored in "obj" into POOL and save the tokens in a CondAttrListCollection,...
ELEM_T * poolReadObject(const Token *token)
virtual ELEM_P * createPersistent(ELEM_T *obj)
method to be implemented by the developer.
StatusCode attrListCollToObject(CondAttrListCollection *attrListColl, COLL_T *&obj)
Read in objects from POOL for the tokens stored CondAttrListCollection and save the objects in the ou...
P * poolReadObject(const Token *token)
Read object of type P.
virtual StatusCode fillRepRefs(IOpaqueAddress *pAddr, DataObject *pObj) override
Create a POOL persistent representation for a transient object.
virtual StatusCode createObj(IOpaqueAddress *pAddr, DataObject *&pObj) override
Create a transient object from a POOL persistent representation.
virtual ELEM_T * createTransient(const Token *token)
method to be implemented by the developer.
virtual StatusCode createRep(DataObject *pObj, IOpaqueAddress *&pAddr) override
Create a POOL persistent representation for a transient object.
virtual StatusCode persToTrans(COLL_T *&transObj, ELEM_T *obj) override
T_AthenaPoolCustCnv(ISvcLocator *pSvcLocator, const char *name=nullptr)
This class provides a token that identifies in a unique way objects on the persistent storage.
Definition Token.h:21
::StatusCode StatusCode
StatusCode definition for legacy code.