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

'CMakeLists.txt' (IOVDbAthenaPool-00-00-04)

parent fc2d07d0
No related branches found
No related tags found
No related merge requests found
################################################################################
# Package: IOVDbAthenaPool
################################################################################
# Declare the package name:
atlas_subdir( IOVDbAthenaPool )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PUBLIC
Database/AthenaPOOL/AthenaPoolUtilities
PRIVATE
Database/AthenaPOOL/AthenaPoolCnvSvc
Database/IOVDbDataModel
Database/IOVDbTPCnv )
# Component(s) in the package:
atlas_add_poolcnv_library( IOVDbAthenaPoolPoolCnv
src/*.cxx
FILES IOVDbDataModel/IOVMetaDataContainer.h
LINK_LIBRARIES AthenaPoolUtilities AthenaPoolCnvSvcLib IOVDbDataModel IOVDbTPCnv )
package IOVDbAthenaPool
author RD Schaffer <R.D.Schaffer@cern.ch>
author Antoine Perus <perus@lal.in2p3.fr>
use AtlasPolicy AtlasPolicy-*
use AthenaPoolUtilities AthenaPoolUtilities-* Database/AthenaPOOL
apply_pattern poolcnv files="-s=${IOVDbDataModel_root}/IOVDbDataModel IOVMetaDataContainer.h"
private
use AthenaPoolCnvSvc AthenaPoolCnvSvc-* Database/AthenaPOOL
use IOVDbTPCnv IOVDbTPCnv-* Database
use IOVDbDataModel IOVDbDataModel-* Database
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
/**
* @file IOVMetaDataContainerCnv.cxx
* @brief Implementation file for AthenaPool converter for IOVMetaDataContainer
* @author R.D.Schaffer@cern.ch
*/
#include "IOVMetaDataContainerCnv.h"
#include "IOVDbTPCnv/IOVMetaDataContainer_p1.h"
#include "IOVDbTPCnv/IOVMetaDataContainerCnv_p1.h"
#include "IOVDbDataModel/IOVPayloadContainer.h"
static IOVMetaDataContainerCnv_p1 TPconverter;
IOVMetaDataContainer_PERS* IOVMetaDataContainerCnv::createPersistent(IOVMetaDataContainer* transObj) {
// // set the placement for first write
// static bool first = true;
// if (first) {
// first = false;
// const std::string containerName = m_athenaPoolCnvSvc->getOutputContainer(tname, key);
// const std::pair<std::string, std::string> entry(key, containerName);
// m_placementHints.insert(entry);
MsgStream log(messageService(), "IOVMetaDataContainerConverter" );
IOVMetaDataContainer_PERS *persObj = TPconverter.createPersistent( transObj, log );
log << MSG::DEBUG << "Success" << endreq;
return persObj;
}
IOVMetaDataContainer* IOVMetaDataContainerCnv::createTransient() {
static pool::Guid p1_guid("6C2DE6DF-6D52-43F6-B435-9F29812F40C0");
if( compareClassGuid(p1_guid) ) {
// using auto_ptr ensures deletion of the persistent object
std::auto_ptr< IOVMetaDataContainer_p1 > col_vect( poolReadObject< IOVMetaDataContainer_p1 >() );
MsgStream log(messageService(), "IOVMetaDataContainerCnv" );
log << MSG::DEBUG << "Reading IOVMetaDataContainer_p1" << endreq;
return TPconverter.createTransient( col_vect.get(), log );
}
throw std::runtime_error("Unsupported persistent version of IOVMetaDataContainer");
}
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
/**
* @file IOVMetaDataContainerCnv.h
* @brief AthenaPool converter for IOVMetaDataContainer
* @author R.D.Schaffer@cern.ch
*/
#ifndef IOVDBATHENAPOOL_IOVMETADATACONTAINERCNV_H
#define IOVDBATHENAPOOL_IOVMETADATACONTAINERCNV_H
#include "AthenaPoolCnvSvc/T_AthenaPoolCustomCnv.h"
#include "IOVDbDataModel/IOVMetaDataContainer.h"
#include "IOVDbTPCnv/IOVMetaDataContainer_p1.h"
// the latest persistent representation type of IOVMetaDataContainer
typedef IOVMetaDataContainer_p1 IOVMetaDataContainer_PERS;
typedef T_AthenaPoolCustomCnv<IOVMetaDataContainer, IOVMetaDataContainer_PERS > IOVMetaDataContainerCnvBase;
class IOVMetaDataContainerCnv : public IOVMetaDataContainerCnvBase {
friend class CnvFactory<IOVMetaDataContainerCnv >;
protected:
IOVMetaDataContainerCnv (ISvcLocator* svcloc) : IOVMetaDataContainerCnvBase(svcloc) {}
virtual IOVMetaDataContainer_PERS* createPersistent (IOVMetaDataContainer* transObj);
virtual IOVMetaDataContainer* createTransient ();
};
#endif // IOVDBATHENAPOOL_IOVMETADATACONTAINERCNV_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