Commit fd2f95d7 authored by Marcin Jerzy Nowak's avatar Marcin Jerzy Nowak Committed by Graeme Stewart
Browse files

Reflex->ROOT6 migration (AthenaDBTestRec-00-07-02)

	* src\app\TestCoolRecWriter.cxx: Reflex->ROOT6 migration
	* tagging AthenaDBTestRec-00-07-02

2014-09-05 David Quarrie <David.Quarrie@cern.ch>
	* cmt/requirements
		Tweak the cmake-specific access to the private headers
	* Tagged as AthenaDBTestRec-00-07-01
parent c52491f6
......@@ -25,8 +25,8 @@ use PersistentDataModel PersistentDataModel-* Database
apply_tag NEEDS_COOL_FACTORY
# Apply the cmake-specific command to install the none-standard headers
apply_pattern cmake_add_command command="athena_install_nonstandard_headers(src/*.h)"
# Apply the cmake-specific command to access the private headers
apply_pattern cmake_add_command command="include_directories(src)"
# this builds a dualuse library for Athena from the files in the src/lib dir
# and a standalone application TestCoolRecWriter from the files in src/app
......
......@@ -13,10 +13,7 @@
#include <fstream>
#include <sstream>
#include "Reflex/SharedLibrary.h"
//POOL includes for POOL object write
#include "Reflex/Type.h"
#include "PersistentDataModel/Token.h"
#include "PersistencySvc/ISession.h"
#include "PersistencySvc/IPersistencySvcFactory.h"
......@@ -25,6 +22,7 @@
#include "PersistencySvc/Placement.h"
#include "PersistencySvc/ITransaction.h"
#include "StorageSvc/DbType.h"
#include "StorageSvc/DbReflex.h"
#include "FileCatalog/IFileCatalog.h"
#include "CoralBase/Blob.h"
......@@ -574,6 +572,8 @@ bool TestCoolRecWriter::setupPool() {
<< std::endl;
}
m_poolcat->start();
/* MN: commenting it out, need to test if the dict get loaded automaticalle
// now load dictionary library
std::string library="libAthenaDBTestRecDataDict.so";
std::cout << "Load library " << library << std::endl;
......@@ -581,6 +581,7 @@ bool TestCoolRecWriter::setupPool() {
if (!libloader.Load()) {
std::cout << "Cannot load dictionary libaray " << library << std::endl;
}
*/
pool::IPersistencySvcFactory* psfactory = pool::IPersistencySvcFactory::get();
m_persistencySvc = psfactory? (psfactory->create("PersistencySvc", *m_poolcat)) : 0;
......@@ -617,7 +618,7 @@ void TestCoolRecWriter::setPoolPayload(const FolderInfo* folderi,
for( std::vector<float>::iterator it = data->dbegin(); it != data->dend(); ++it) {
*it=rand()/(float(RAND_MAX)+1);
}
Token *tok = m_persistencySvc->registerForWrite(*(folderi->poolplace()), data, ROOT::Reflex::Type::ByTypeInfo(typeid(TestCoolRecPoolData)) );
Token *tok = m_persistencySvc->registerForWrite(*(folderi->poolplace()), data, pool::DbReflex::forTypeInfo(typeid(TestCoolRecPoolData)) );
// set payload data for COOL to Pool object reference
payload["PoolRef"].setValue<std::string>( tok->toString() );
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment