ATLAS Offline Software
Loading...
Searching...
No Matches
T_AthenaPoolCoolMultChanCnv.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 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 <string>
21
22class DataObject;
23class StatusCode;
25
27template <class TYPE> class CnvFactory;
28
35template <class COLL_T, class ELEM_T, class ELEM_P = ELEM_T>
36class T_AthenaPoolCoolMultChanCnv : public T_AthenaPoolCustCnv<COLL_T, ELEM_T> {
37
38public:
40 T_AthenaPoolCoolMultChanCnv(ISvcLocator* svcloc);
41
42protected:
46 virtual StatusCode createObj(IOpaqueAddress* pAddr, DataObject*& pObj) override;
47
51 virtual StatusCode createRep(DataObject* pObj, IOpaqueAddress*& pAddr) override;
52
56 virtual StatusCode fillRepRefs(IOpaqueAddress* pAddr, DataObject* pObj) override;
57
63 StatusCode objectToAttrListColl ATLAS_NOT_THREAD_SAFE
64 (COLL_T* obj, IOpaqueAddress*& pAddr,
65 CondAttrListCollection*& attrListColl,
66 std::unique_ptr<Token>& token);
67
74 COLL_T*& obj);
75
80 StatusCode condMultChanCollImplToObject(const std::string& collImplToken,
81 COLL_T*& obj);
82
83 // the 2 following methods are allowed to throw std::runtime_error
84
91 virtual ELEM_P* createPersistent(ELEM_T* obj);
92
101 virtual ELEM_T* createTransient();
102
103 //-------------------------------------------------------------------
104 // Helper methods intended to by used when implementing createTransient()
105
107 virtual void setToken(const std::string& token) override final;
108
114 template <class P>
116
117 ELEM_T* poolReadObject();
118
120 virtual StatusCode transToPers(COLL_T* obj, ELEM_T*& persObj) override;
121 virtual StatusCode persToTrans(COLL_T*& transObj, ELEM_T* obj) override;
122
123protected:
124
126 int m_persCtx { 0 };
127
128};
129
131#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.
P * poolReadObject()
Read object of type P.
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,...
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...
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 void setToken(const std::string &token) override final
specialized version that adds persistency contextID to tokens (for reading)
virtual StatusCode createRep(DataObject *pObj, IOpaqueAddress *&pAddr) override
Create a POOL persistent representation for a transient object.
virtual ELEM_T * createTransient()
method to be implemented by the developer.
virtual StatusCode persToTrans(COLL_T *&transObj, ELEM_T *obj) override
T_AthenaPoolCustCnv(ISvcLocator *pSvcLocator, const char *name=nullptr)