diff --git a/Database/PersistentDataModelTPCnv/PersistentDataModelTPCnv/DataHeader_p6.h b/Database/PersistentDataModelTPCnv/PersistentDataModelTPCnv/DataHeader_p6.h index f2b8cb80b2ed81b0e6ea7e541aafeab44fc3a116..126dc5a44a80b9a736070ac47244510e2b9bf12b 100755 --- a/Database/PersistentDataModelTPCnv/PersistentDataModelTPCnv/DataHeader_p6.h +++ b/Database/PersistentDataModelTPCnv/PersistentDataModelTPCnv/DataHeader_p6.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef PERSISTENTDATAMODELTPCNV_DATAHEADER_P6_H @@ -34,12 +34,14 @@ public: bool operator==(const DbRecord& rhs) const { return fid==rhs.fid && tech==rhs.tech; } }; struct ObjRecord { - Guid guid; std::string key; unsigned clid; long long oid1; + Guid guid; + std::string cont, key; + unsigned clid; long long oid1; ObjRecord() {} - ObjRecord( const Guid& g, const std::string& k, unsigned id, long long o) - : guid(g), key(k), clid(id), oid1(o) {} + ObjRecord( const Guid& g, const std::string& c, const std::string& k, unsigned id, long long o) + : guid(g), cont(c), key(k), clid(id), oid1(o) {} bool operator==(const ObjRecord& rhs) const - { return clid == rhs.clid && key == rhs.key && oid1 == rhs.oid1; } + { return clid == rhs.clid && cont == rhs.cont && key == rhs.key && oid1 == rhs.oid1; } }; public: // Constructor and Destructor @@ -58,6 +60,7 @@ public: // Constructor and Destructor const std::set<unsigned int>& symLinks = std::set<unsigned int>(), const std::vector<unsigned int>& hashes = std::vector<unsigned int>()); std::size_t sizeObj() const; + std::string getObjContainer(unsigned int index) const; std::string getObjKey(unsigned int index) const; unsigned int getObjType(unsigned int index) const; Guid getObjClassId(unsigned int index) const; diff --git a/Database/PersistentDataModelTPCnv/src/DataHeaderCnv_p6.cxx b/Database/PersistentDataModelTPCnv/src/DataHeaderCnv_p6.cxx index fa718e1b7fd42d37ed82c7730b3d90bd9fb41b3f..79ae3ddd7d2da464d269ecade18454460da1a0ca 100755 --- a/Database/PersistentDataModelTPCnv/src/DataHeaderCnv_p6.cxx +++ b/Database/PersistentDataModelTPCnv/src/DataHeaderCnv_p6.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /** @file DataHeaderCnv_p6.cxx @@ -36,8 +36,9 @@ void DataHeaderCnv_p6::persToElem( const DataHeader_p6* pers, unsigned p_idx, oid2 = full_el.oid2; } // Append DbGuid - token->setDb( form.getDbGuid(db_idx ) ); - token->setTechnology( form.getDbTech(db_idx ) ); + token->setDb( form.getDbGuid( db_idx ) ); + token->setCont( form.getObjContainer( obj_idx ) ); + token->setTechnology( form.getDbTech( db_idx ) ); // Append ClassId token->setClassID( form.getObjClassId(obj_idx) ); token->setOid( Token::OID_t( form.getObjOid1(obj_idx), oid2) ); @@ -85,7 +86,8 @@ void DataHeaderCnv_p6::elemToPers(const DataHeaderElement* trans, DataHeaderForm_p6::DbRecord db_rec( token->dbID(), token->technology() ); unsigned db_idx = form.insertDb( db_rec ); // StoreGate Type/Key & persistent Class GUID - DataHeaderForm_p6::ObjRecord transObj( token->classID(), trans->m_key, trans->m_pClid, token->oid().first ); + DataHeaderForm_p6::ObjRecord transObj( token->classID(), token->contID(), trans->m_key, + trans->m_pClid, token->oid().first ); unsigned obj_idx = form.insertObj(transObj, trans->m_alias, trans->m_clids, trans->m_hashes); unsigned long long oid2 = token->oid().second; diff --git a/Database/PersistentDataModelTPCnv/src/DataHeader_p6.cxx b/Database/PersistentDataModelTPCnv/src/DataHeader_p6.cxx index 01637ea4149854d101bf25733e1ce252e1d023c2..1d4324892a65008071d4af89667dfa12d8a6a1e2 100755 --- a/Database/PersistentDataModelTPCnv/src/DataHeader_p6.cxx +++ b/Database/PersistentDataModelTPCnv/src/DataHeader_p6.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "PersistentDataModelTPCnv/DataHeader_p6.h" @@ -103,6 +103,10 @@ std::size_t DataHeaderForm_p6::sizeObj() const { return(m_objRecords.size()); } +std::string DataHeaderForm_p6::getObjContainer(unsigned int index) const { + return m_objRecords[index].cont; +} + std::string DataHeaderForm_p6::getObjKey(unsigned int index) const { return m_objRecords[index].key; }