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 ...@@ -25,8 +25,8 @@ use PersistentDataModel PersistentDataModel-* Database
apply_tag NEEDS_COOL_FACTORY apply_tag NEEDS_COOL_FACTORY
# Apply the cmake-specific command to install the none-standard headers # Apply the cmake-specific command to access the private headers
apply_pattern cmake_add_command command="athena_install_nonstandard_headers(src/*.h)" apply_pattern cmake_add_command command="include_directories(src)"
# this builds a dualuse library for Athena from the files in the src/lib dir # 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 # and a standalone application TestCoolRecWriter from the files in src/app
......
...@@ -13,10 +13,7 @@ ...@@ -13,10 +13,7 @@
#include <fstream> #include <fstream>
#include <sstream> #include <sstream>
#include "Reflex/SharedLibrary.h"
//POOL includes for POOL object write //POOL includes for POOL object write
#include "Reflex/Type.h"
#include "PersistentDataModel/Token.h" #include "PersistentDataModel/Token.h"
#include "PersistencySvc/ISession.h" #include "PersistencySvc/ISession.h"
#include "PersistencySvc/IPersistencySvcFactory.h" #include "PersistencySvc/IPersistencySvcFactory.h"
...@@ -25,6 +22,7 @@ ...@@ -25,6 +22,7 @@
#include "PersistencySvc/Placement.h" #include "PersistencySvc/Placement.h"
#include "PersistencySvc/ITransaction.h" #include "PersistencySvc/ITransaction.h"
#include "StorageSvc/DbType.h" #include "StorageSvc/DbType.h"
#include "StorageSvc/DbReflex.h"
#include "FileCatalog/IFileCatalog.h" #include "FileCatalog/IFileCatalog.h"
#include "CoralBase/Blob.h" #include "CoralBase/Blob.h"
...@@ -574,6 +572,8 @@ bool TestCoolRecWriter::setupPool() { ...@@ -574,6 +572,8 @@ bool TestCoolRecWriter::setupPool() {
<< std::endl; << std::endl;
} }
m_poolcat->start(); m_poolcat->start();
/* MN: commenting it out, need to test if the dict get loaded automaticalle
// now load dictionary library // now load dictionary library
std::string library="libAthenaDBTestRecDataDict.so"; std::string library="libAthenaDBTestRecDataDict.so";
std::cout << "Load library " << library << std::endl; std::cout << "Load library " << library << std::endl;
...@@ -581,7 +581,8 @@ bool TestCoolRecWriter::setupPool() { ...@@ -581,7 +581,8 @@ bool TestCoolRecWriter::setupPool() {
if (!libloader.Load()) { if (!libloader.Load()) {
std::cout << "Cannot load dictionary libaray " << library << std::endl; std::cout << "Cannot load dictionary libaray " << library << std::endl;
} }
*/
pool::IPersistencySvcFactory* psfactory = pool::IPersistencySvcFactory::get(); pool::IPersistencySvcFactory* psfactory = pool::IPersistencySvcFactory::get();
m_persistencySvc = psfactory? (psfactory->create("PersistencySvc", *m_poolcat)) : 0; m_persistencySvc = psfactory? (psfactory->create("PersistencySvc", *m_poolcat)) : 0;
if( m_persistencySvc ) { if( m_persistencySvc ) {
...@@ -617,7 +618,7 @@ void TestCoolRecWriter::setPoolPayload(const FolderInfo* folderi, ...@@ -617,7 +618,7 @@ void TestCoolRecWriter::setPoolPayload(const FolderInfo* folderi,
for( std::vector<float>::iterator it = data->dbegin(); it != data->dend(); ++it) { for( std::vector<float>::iterator it = data->dbegin(); it != data->dend(); ++it) {
*it=rand()/(float(RAND_MAX)+1); *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 // set payload data for COOL to Pool object reference
payload["PoolRef"].setValue<std::string>( tok->toString() ); 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