Skip to content
Snippets Groups Projects
Commit 00a8aa62 authored by Atlas-Software Librarian's avatar Atlas-Software Librarian Committed by Graeme Stewart
Browse files

'CMakeLists.txt' (LumiBlockAthenaPool-00-01-00)

	* Update to use LB_IOVRange instead of IOVRange
	* tagged as LumiBlockAthenaPool-00-01-00
parent 6ac7dff0
No related branches found
No related tags found
Loading
################################################################################
# Package: LumiBlockAthenaPool
################################################################################
# Declare the package name:
atlas_subdir( LumiBlockAthenaPool )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PUBLIC
Database/AthenaPOOL/AthenaPoolUtilities
PRIVATE
Database/AthenaPOOL/AthenaPoolCnvSvc
LumiBlock/LumiBlockData
LumiBlock/LumiBlockPers/LumiBlockTPCnv )
# Component(s) in the package:
atlas_add_poolcnv_library( LumiBlockAthenaPoolPoolCnv
src/*.cxx
FILES LumiBlockData/LumiBlockCollection.h
LINK_LIBRARIES AthenaPoolUtilities AthenaPoolCnvSvcLib LumiBlockData LumiBlockTPCnv )
......@@ -8,6 +8,9 @@
/////////////////////////////////////////////////////////////////
#include "LumiBlockCollectionCnv.h"
#include "LumiBlockTPCnv/LumiBlockCollectionCnv_p1.h"
#include "LumiBlockTPCnv/LumiBlockCollectionCnv_p2.h"
LumiBlockCollection_PERS* LumiBlockCollectionCnv::createPersistent(LumiBlockCollection* transCont) {
MsgStream log(messageService(), "LumiBlockCollectionConverter" );
......@@ -20,10 +23,21 @@ LumiBlockCollection_PERS* LumiBlockCollectionCnv::createPersistent(LumiBlockColl
LumiBlockCollection* LumiBlockCollectionCnv::createTransient() {
MsgStream log(messageService(), "LumiBlockCollectionConverter" );
static pool::Guid p1_guid("CF1F40C9-6125-4C35-87FF-DDA2C319000C");
if( compareClassGuid(p1_guid) ) {
static pool::Guid p2_guid("DEF9282A-F174-4382-8248-B94567CD869F");
static LumiBlockCollectionCnv_p1 TPConverter_p1;
static LumiBlockCollectionCnv_p2 TPConverter_p2;
if( compareClassGuid(p2_guid) ) {
// using auto_ptr ensures deletion of the persistent object
std::auto_ptr< LumiBlockCollection_p2 > col_vect( poolReadObject< LumiBlockCollection_p2 >() );
return TPConverter_p2.createTransient( col_vect.get(), log );
}
else if( compareClassGuid(p1_guid) ) {
// using auto_ptr ensures deletion of the persistent object
std::auto_ptr< LumiBlockCollection_p1 > col_vect( poolReadObject< LumiBlockCollection_p1 >() );
return m_TPConverter.createTransient( col_vect.get(), log );
return TPConverter_p1.createTransient( col_vect.get(), log );
}
else {
throw std::runtime_error("Unsupported persistent version of LumiBlockCollection");
......
......@@ -12,12 +12,11 @@
#define LUMIBLOCKCOLLECTIONCNV__H
#include "AthenaPoolCnvSvc/T_AthenaPoolCustomCnv.h"
#include "LumiBlockTPCnv/LumiBlockCollection_p1.h"
#include "LumiBlockData/LumiBlockCollection.h"
#include "LumiBlockTPCnv/LumiBlockCollectionCnv_p1.h"
#include "LumiBlockTPCnv/LumiBlockCollectionCnv_p2.h"
// the latest persistent representation type of LumiBlockCollection
typedef LumiBlockCollection_p1 LumiBlockCollection_PERS;
typedef LumiBlockCollection_p2 LumiBlockCollection_PERS;
typedef T_AthenaPoolCustomCnv<LumiBlockCollection, LumiBlockCollection_PERS > LumiBlockCollectionCnvBase;
class LumiBlockCollectionCnv : public LumiBlockCollectionCnvBase
......@@ -31,7 +30,7 @@ class LumiBlockCollectionCnv : public LumiBlockCollectionCnvBase
// virtual AthenaPoolTopLevelTPCnvBase* getTopLevelTPCnv() { return &m_TPConverter; }
private:
LumiBlockCollectionCnv_p1 m_TPConverter;
LumiBlockCollectionCnv_p2 m_TPConverter;
};
#endif // LUMIBLOCKCOLLECTIONCNV__H
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment