Commit dad763a0 authored by amete's avatar amete
Browse files

AthenaPoolCnvSvc: Re-initialize AthenaPoolCnvSvc and extract the Pool Attributes

parent 4031f139
......@@ -12,6 +12,7 @@
#include "GaudiKernel/ClassID.h"
#include "GaudiKernel/FileIncident.h"
#include "GaudiKernel/IChronoStatSvc.h"
#include "GaudiKernel/IIoComponentMgr.h"
#include "GaudiKernel/IOpaqueAddress.h"
#include "GaudiKernel/IJobOptionsSvc.h"
#include "GaudiKernel/IIncidentSvc.h"
......@@ -84,6 +85,14 @@ StatusCode AthenaPoolCnvSvc::initialize() {
return(StatusCode::FAILURE);
}
}
// Register this service for 'I/O' events
ServiceHandle<IIoComponentMgr> iomgr("IoComponentMgr", name());
ATH_CHECK(iomgr.retrieve());
if (!iomgr->io_register(this).isSuccess()) {
ATH_MSG_FATAL("Could not register myself with the IoComponentMgr !");
return(StatusCode::FAILURE);
}
// Extracting MaxFileSizes for global default and map by Database name.
for (std::vector<std::string>::const_iterator iter = m_maxFileSizes.value().begin(),
last = m_maxFileSizes.value().end(); iter != last; iter++) {
......@@ -127,6 +136,13 @@ StatusCode AthenaPoolCnvSvc::initialize() {
return(StatusCode::SUCCESS);
}
//______________________________________________________________________________
StatusCode AthenaPoolCnvSvc::io_reinit() {
ATH_MSG_DEBUG("I/O reinitialization...");
// Extracting OUTPUT POOL ItechnologySpecificAttributes for Domain, Database and Container.
extractPoolAttributes(m_poolAttr, &m_containerAttr, &m_databaseAttr, &m_domainAttr);
return(StatusCode::SUCCESS);
}
//______________________________________________________________________________
StatusCode AthenaPoolCnvSvc::finalize() {
// Release AthenaSerializeSvc
if (!m_serializeSvc.empty()) {
......@@ -163,6 +179,11 @@ StatusCode AthenaPoolCnvSvc::finalize() {
m_cnvs.shrink_to_fit();
return(::AthCnvSvc::finalize());
}
//______________________________________________________________________________
StatusCode AthenaPoolCnvSvc::io_finalize() {
ATH_MSG_DEBUG("I/O finalization...");
return(StatusCode::SUCCESS);
}
//_______________________________________________________________________
StatusCode AthenaPoolCnvSvc::queryInterface(const InterfaceID& riid, void** ppvInterface) {
if (IAthenaPoolCnvSvc::interfaceID().versionMatch(riid)) {
......@@ -1138,6 +1159,10 @@ void AthenaPoolCnvSvc::extractPoolAttributes(const StringArrayProperty& property
valueString = val;
}
}
std::cout << "SERHAN Attr Name: " << attributeName <<
" ContName: " << containerName <<
" DBName: " << databaseName <<
" Value: " << valueString << std::endl;
if (!attributeName.empty() && !valueString.empty()) {
opt.push_back(attributeName);
opt.push_back(valueString);
......
......@@ -13,6 +13,7 @@
#include "AthenaPoolCnvSvc/IAthenaPoolCnvSvc.h"
#include "GaudiKernel/IIncidentListener.h"
#include "GaudiKernel/IIoComponent.h"
#include "GaudiKernel/ServiceHandle.h"
#include "GaudiKernel/ToolHandle.h"
#include "StorageSvc/DbType.h"
......@@ -36,15 +37,18 @@ template <class TYPE> class SvcFactory;
**/
class AthenaPoolCnvSvc : public ::AthCnvSvc,
public virtual IAthenaPoolCnvSvc,
public virtual IIncidentListener {
public virtual IIncidentListener,
public virtual IIoComponent {
// Allow the factory class access to the constructor
friend class SvcFactory<AthenaPoolCnvSvc>;
public:
/// Required of all Gaudi Services
StatusCode initialize();
StatusCode io_reinit();
/// Required of all Gaudi Services
StatusCode finalize();
StatusCode io_finalize();
/// Required of all Gaudi services: see Gaudi documentation for details
StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface);
......
Markdown is supported
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