12#include "GaudiKernel/IIoComponentMgr.h"
13#include "GaudiKernel/ConcurrencyFlags.h"
17#include "CoralKernel/Context.h"
34#include "RelationalAccess/ConnectionService.h"
35#include "RelationalAccess/IConnectionServiceConfiguration.h"
36#include "RelationalAccess/IWebCacheControl.h"
37#include "RelationalAccess/IWebCacheInfo.h"
38#include "RelationalAccess/ILookupService.h"
39#include "RelationalAccess/IDatabaseServiceSet.h"
40#include "RelationalAccess/IDatabaseServiceDescription.h"
52 return !s.empty() && (std::isdigit(s[0]) || s[0] ==
'+' || s[0] ==
'-');
66 if (
catalog.starts_with(
"xmlcatalog_file:")) {
67 const std::string fileName =
catalog.substr(16);
68 if (!iomgr->io_register(
this, IIoComponentMgr::IoMode::READ, fileName, fileName).isSuccess()) {
78 if (!iomgr->io_register(
this, IIoComponentMgr::IoMode::WRITE, fileName, fileName).isSuccess()) {
86 return(StatusCode::FAILURE);
91 return(StatusCode::FAILURE);
93 coral::ConnectionService conSvcH;
94 coral::IConnectionServiceConfiguration& csConfig = conSvcH.configuration();
98 csConfig.enablePoolAutomaticCleanUp();
101 csConfig.disablePoolAutomaticCleanUp();
102 csConfig.setConnectionTimeOut(0);
104 ATH_MSG_INFO(
"Set connectionsvc retry/timeout/IDLE timeout to "
110 <<
" seconds with connection cleanup "
111 << (csConfig.isPoolAutomaticCleanUpEnabled() ?
"enabled" :
"disabled"));
113 coral::IWebCacheControl& webCache = conSvcH.webCacheControl();
115 ATH_MSG_INFO(
"Frontier compression level set to " << webCache.compressionLevel());
119 if (replicasvc.retrieve().isSuccess()) {
120 csConfig.setReplicaSortingAlgorithm(*replicasvc);
121 ATH_MSG_INFO(
"Successfully setup replica sorting algorithm");
126 MSG::Level athLvl =
msg().level();
136 if (!iomgr.retrieve().isSuccess()) {
138 return(StatusCode::FAILURE);
140 if (!iomgr->io_hasitem(
this)) {
141 ATH_MSG_FATAL(
"IoComponentMgr does not know about myself !");
142 return(StatusCode::FAILURE);
145 for (std::size_t icat = 0,
imax = readcat.size(); icat <
imax; icat++) {
146 if (readcat[icat].compare(0, 16,
"xmlcatalog_file:") == 0) {
147 std::string fileName = readcat[icat].substr(16);
148 if (iomgr->io_contains(
this, fileName)) {
149 if (!iomgr->io_retrieve(
this, fileName).isSuccess()) {
150 ATH_MSG_FATAL(
"Could not retrieve new value for [" << fileName <<
"] !");
151 return(StatusCode::FAILURE);
153 readcat[icat] =
"xmlcatalog_file:" + fileName;
159 if (
m_writeCatalog.value().compare(0, 16,
"xmlcatalog_file:") == 0) {
161 if (iomgr->io_contains(
this, fileName)) {
162 if (!iomgr->io_retrieve(
this, fileName).isSuccess()) {
163 ATH_MSG_FATAL(
"Could not retrieve new value for [" << fileName <<
"] !");
164 return(StatusCode::FAILURE);
182 return(StatusCode::FAILURE);
188 ATH_MSG_FATAL(
"Failed to enable thread safety in ROOT via PersistencySvc.");
189 return(StatusCode::FAILURE);
194 return(StatusCode::FAILURE);
199 return(StatusCode::SUCCESS);
204 if (
m_useROOTIMT && Gaudi::Concurrency::ConcurrencyFlags::numThreads() > 1) {
206 ATH_MSG_FATAL(
"Failed to enable implicit multithreading in ROOT via PersistencySvc.");
207 return(StatusCode::FAILURE);
209 ATH_MSG_INFO(
"Enabled implicit multithreading in ROOT via PersistencySvc to: " << Gaudi::Concurrency::ConcurrencyFlags::numThreads() - 1);
211 return(StatusCode::SUCCESS);
216 bool retError =
false;
223 return(retError ? StatusCode::FAILURE : StatusCode::SUCCESS);
234 for (
const auto& persistencyMutex :
m_pers_mut) {
235 delete persistencyMutex;
249 return(::AthService::finalize());
261 return(StatusCode::SUCCESS);
268 const std::string& auxString = placement->
auxString();
269 if (!auxString.empty()) {
270 if (auxString.compare(0, 6,
"[CTXT=") == 0) {
271 ::sscanf(auxString.c_str(),
"[CTXT=%08X]", &contextId);
272 }
else if (auxString.compare(0, 8,
"[CLABEL=") == 0) {
276 ATH_MSG_WARNING(
"registerForWrite: Using default output Stream instead of id = " << contextId);
282 if (token ==
nullptr) {
290 const std::string& auxString = token->
auxString();
291 if (!auxString.empty()) {
292 if (auxString.compare(0, 6,
"[CTXT=") == 0) {
293 ::sscanf(auxString.c_str(),
"[CTXT=%08X]", &contextId);
294 }
else if (auxString.compare(0, 8,
"[CLABEL=") == 0) {
298 ATH_MSG_WARNING(
"setObjPtr: Using default input Stream instead of id = " << contextId);
302 ATH_MSG_VERBOSE(
"setObjPtr: token=" << token->
toString() <<
", auxString=" << auxString <<
", contextID=" << contextId);
306 std::map<unsigned int, unsigned int>::const_iterator maxFileIter =
m_contextMaxFile.find(contextId);
308 m_guidLists[contextId].remove(token->
dbID());
309 m_guidLists[contextId].push_back(token->
dbID());
310 while (m_guidLists[contextId].
size() > maxFileIter->second) {
311 this->
disconnectDb(
"FID:" + m_guidLists[contextId].begin()->toString(), contextId).ignore();
327 return(contextIter->second);
338 if (!
label.empty()) {
344 return(contextIter->second);
350 if (!
connect(Io::READ,
id).isSuccess()) {
354 if (!
label.empty()) {
389 if (token.compare(0, 4,
"PFN:") == 0) {
391 }
else if (token.compare(0, 4,
"LFN:") == 0) {
392 m_catalog->lookupFileByLFN(token.substr(4), dbID);
393 }
else if (token.compare(0, 4,
"FID:") == 0) {
394 dbID = token.substr(4);
406 std::string dbID,
type;
421 const std::string& collectionName,
423 unsigned int contextId)
const {
425 <<
", name=" << collectionName <<
", contextID=" << contextId);
427 ATH_MSG_WARNING(
"createCollection: Using default input Stream instead of id = " << contextId);
432 bool insertFile =
false;
433 if (connection.compare(0, 4,
"PFN:") == 0) {
434 std::string fid, fileType;
435 m_catalog->lookupFileByPFN(connection.substr(4), fid, fileType);
438 ATH_MSG_INFO(
"File is not in Catalog! Attempt to open it anyway.");
443 std::unique_ptr<pool::IDatabase> dbH =
getDbHandle(contextId, connection);
444 if (dbH ==
nullptr) {
445 ATH_MSG_INFO(
"Failed to get Session/DatabaseHandle to create POOL collection.");
449 if (dbH->openMode() == Io::INVALID) {
450 dbH->connectForRead();
452 std::map<unsigned int, unsigned int>::const_iterator maxFileIter =
m_contextMaxFile.find(contextId);
453 if (maxFileIter !=
m_contextMaxFile.end() && maxFileIter->second > 0 && !dbH->fid().empty()) {
454 const Guid guid(dbH->fid());
455 m_guidLists[contextId].remove(guid);
456 m_guidLists[contextId].push_back(guid);
457 while (m_guidLists[contextId].
size() > maxFileIter->second + 1) {
458 this->
disconnectDb(
"FID:" + m_guidLists[contextId].begin()->toString(), contextId).ignore();
461 }
catch (std::exception& e) {
462 ATH_MSG_INFO(
"Failed to open container to check POOL collection - trying.");
472 std::string error_text;
474 collPtr = collSvc.open(collectionName, collectionType, connection,
m_dbSessionVec[contextId]);
475 }
catch (std::exception &e) {
477 error_text = e.what();
480 std::unique_ptr<pool::IDatabase> dbH =
getDbHandle(contextId, connection);
481 if (dbH !=
nullptr && !dbH->fid().empty()) {
484 throw std::runtime_error(
"Failed to open Collection: " + error_text +
", PoolSvc::createCollection");
487 std::unique_ptr<pool::IDatabase> dbH =
getDbHandle(contextId, connection);
488 if (dbH ==
nullptr) {
490 }
else if (dbH->fid().empty()) {
491 ATH_MSG_INFO(
"Cannot retrieve the FID of an existing POOL database: '"
492 << connection <<
"' - FileCatalog will NOT be updated.");
499 if (
m_useROOTMaxTree && Gaudi::Concurrency::ConcurrencyFlags::numConcurrentEvents() > 1) {
511 std::string fid = dbH.
fid();
513 catalog_locked->registerPFN(pfn,
"ROOT_All", fid);
517 const std::string& collection,
518 const unsigned long ientry)
const {
521 if (dbH ==
nullptr) {
524 if (dbH->openMode() == Io::INVALID) {
525 dbH->connectForRead();
528 if (contH ==
nullptr) {
531 auto tokenIter = std::unique_ptr<pool::ITokenIterator>(contH->tokens());
533 return tokenIter->seek(ientry)? tokenIter->next() :
nullptr;
537 if (
type != Io::READ) {
539 ATH_MSG_WARNING(
"connect: Using default output Stream instead of id = " << contextId);
544 ATH_MSG_WARNING(
"connect: Using default input Stream instead of id = " << contextId);
547 ATH_MSG_INFO(
"Connecting to InputStream for: " << contextId);
552 return(StatusCode::FAILURE);
557 if (session->transaction().isActive()) {
558 return(StatusCode::SUCCESS);
560 if (!session->start(
type)) {
562 return(StatusCode::FAILURE);
565 return(StatusCode::SUCCESS);
570 return(StatusCode::FAILURE);
574 if (session !=
nullptr && session->transaction().isActive()) {
575 if (!session->commit()) {
577 return(StatusCode::FAILURE);
579 if (session->transaction().type() == Io::READ) {
580 session->disconnectAll();
583 return(StatusCode::SUCCESS);
588 return(StatusCode::FAILURE);
595 return(StatusCode::FAILURE);
598 return(StatusCode::SUCCESS);
602 ATH_MSG_DEBUG(
"Disconnect request for contextId=" << contextId);
604 return(StatusCode::SUCCESS);
609 if (!
commit(contextId).isSuccess()) {
611 return(StatusCode::FAILURE);
616 ATH_MSG_ERROR(
"disconnect failed to diconnect PersistencySvc");
617 return(StatusCode::FAILURE);
620 return(StatusCode::SUCCESS);
625 return(StatusCode::SUCCESS);
628 std::unique_ptr<pool::IDatabase> dbH =
getDbHandle(contextId, connection);
629 if (dbH ==
nullptr) {
631 return(StatusCode::FAILURE);
633 std::map<unsigned int, unsigned int>::const_iterator maxFileIter =
m_contextMaxFile.find(contextId);
635 m_guidLists[contextId].remove(
Guid(dbH->fid()));
638 return(StatusCode::SUCCESS);
644 unsigned int contextId)
const {
646 ATH_MSG_WARNING(
"getAttribute: Using default input Stream instead of id = " << contextId);
651 std::ostringstream oss;
652 if (data ==
"DbLonglong") {
654 }
else if (data ==
"double") {
660 ATH_MSG_INFO(
"Domain attribute [" << optName <<
"]" <<
": " << data);
661 return(StatusCode::SUCCESS);
667 const std::string& dbName,
668 const std::string& contName,
669 unsigned int contextId)
const {
671 std::unique_ptr<pool::IDatabase> dbH =
getDbHandle(contextId, dbName);
672 if (dbH ==
nullptr) {
673 ATH_MSG_DEBUG(
"getAttribute: Failed to get Session/DatabaseHandle to get POOL property.");
674 return(StatusCode::FAILURE);
676 if (dbH->openMode() == Io::INVALID) {
678 dbH->setTechnology(tech);
679 dbH->connectForWrite();
681 dbH->connectForRead();
684 std::ostringstream oss;
685 if (contName.empty()) {
686 if (data ==
"DbLonglong") {
687 oss << std::dec << dbH->technologySpecificAttributes().attribute<
long long int>(optName);
688 }
else if (data ==
"double") {
689 oss << std::dec << dbH->technologySpecificAttributes().attribute<
double>(optName);
690 }
else if (data ==
"string") {
691 oss << dbH->technologySpecificAttributes().attribute<
char*>(optName);
693 oss << std::dec << dbH->technologySpecificAttributes().attribute<
int>(optName);
695 ATH_MSG_INFO(
"Database (" << dbH->pfn() <<
") attribute [" << optName <<
"]" <<
": " << oss.str());
698 if (contH ==
nullptr) {
699 ATH_MSG_DEBUG(
"Failed to get ContainerHandle to get POOL property.");
700 return(StatusCode::FAILURE);
702 if (data ==
"DbLonglong") {
703 oss << std::dec << contH->technologySpecificAttributes().attribute<
long long int>(optName);
704 }
else if (data ==
"double") {
705 oss << std::dec << contH->technologySpecificAttributes().attribute<
double>(optName);
707 oss << std::dec << contH->technologySpecificAttributes().attribute<
int>(optName);
709 ATH_MSG_INFO(
"Container attribute [" << contName <<
"." << optName <<
"]: " << oss.str());
712 return(StatusCode::SUCCESS);
716 const std::string& data,
718 unsigned int contextId)
const {
720 ATH_MSG_WARNING(
"setAttribute: Using default output Stream instead of id = " << contextId);
725 if (data[data.size() - 1] ==
'L') {
727 ATH_MSG_DEBUG(
"Failed to set POOL property, " << optName <<
" to " << data);
728 return(StatusCode::FAILURE);
732 ATH_MSG_DEBUG(
"Failed to set POOL property, " << optName <<
" to " << data);
733 return(StatusCode::FAILURE);
736 return(StatusCode::SUCCESS);
740 const std::string& data,
742 const std::string& dbName,
743 const std::string& contName,
744 unsigned int contextId)
const {
746 ATH_MSG_WARNING(
"setAttribute: Using default output Stream instead of id = " << contextId);
750 std::unique_ptr<pool::IDatabase> dbH =
getDbHandle(contextId, dbName);
751 if (dbH ==
nullptr) {
752 ATH_MSG_DEBUG(
"Failed to get Session/DatabaseHandle to set POOL property.");
753 return(StatusCode::FAILURE);
755 if (dbH->openMode() == Io::INVALID) {
757 dbH->setTechnology(tech);
758 dbH->connectForWrite();
760 dbH->connectForRead();
763 bool retError =
false;
765 bool hasTTreeName = (contName.length() > 6 && contName.compare(0, 6,
"TTree=") == 0);
766 if (contName.empty() || hasTTreeName ||
m_dbSessionVec[contextId]->transaction().type() == Io::READ) {
767 objName = hasTTreeName ? contName.substr(6) : contName;
769 retError = dbH->technologySpecificAttributes().setAttribute(optName, data.c_str(), objName);
770 }
else if( data[data.size() - 1] ==
'L' ) {
771 retError = dbH->technologySpecificAttributes().setAttribute<
long long int>(optName, atoll(data.c_str()), objName);
773 retError = dbH->technologySpecificAttributes().setAttribute<
int>(optName, atoi(data.c_str()), objName);
776 ATH_MSG_DEBUG(
"Failed to set POOL property, " << optName <<
" to " << data);
777 return(StatusCode::FAILURE);
781 if (contH ==
nullptr) {
782 ATH_MSG_DEBUG(
"Failed to get ContainerHandle to set POOL property.");
783 return(StatusCode::FAILURE);
785 if (
auto p = contName.find(
'('); p != std::string::npos) {
786 objName = contName.substr(p + 1);
787 objName.erase(objName.find(
')'));
788 }
else if (
auto p = contName.find(
"::"); p != std::string::npos) {
789 objName = contName.substr(p + 2);
790 }
else if (
auto p = contName.find(
'_'); p != std::string::npos) {
791 objName = contName.substr(p + 1);
792 objName.erase(objName.find(
'/'));
794 std::string::size_type off = 0;
795 while ((off = objName.find_first_of(
"<>/")) != std::string::npos) {
798 if (data[data.size() - 1] ==
'L') {
799 retError = contH->technologySpecificAttributes().setAttribute<
long long int>(optName, atoll(data.c_str()), objName);
801 retError = contH->technologySpecificAttributes().setAttribute<
int>(optName, atoi(data.c_str()), objName);
804 ATH_MSG_DEBUG(
"Failed to set POOL container property, " << optName <<
" for " << contName <<
" : " << objName <<
" to " << data);
805 return(StatusCode::FAILURE);
808 return(StatusCode::SUCCESS);
816 std::vector<std::string> physcons;
817 if (conn.find(
':') == std::string::npos) {
820 const std::string lookSvcStr(
"CORAL/Services/XMLLookupService");
821 coral::IHandle<coral::ILookupService> lookSvcH =
m_context->query<coral::ILookupService>();
822 if (!lookSvcH.isValid()) {
824 lookSvcH =
m_context->query<coral::ILookupService>();
826 if (!lookSvcH.isValid()) {
828 return(StatusCode::FAILURE);
830 coral::IDatabaseServiceSet* dbset = lookSvcH->lookup(conn, coral::ReadOnly);
831 if (dbset !=
nullptr) {
832 for (
int irep = 0, nrep = dbset->numberOfReplicas(); irep < nrep; ++irep) {
833 const std::string pcon = dbset->replica(irep).connectionString();
834 if (pcon.compare(0, 9,
"frontier:") == 0) {
835 physcons.push_back(std::move(pcon));
838 delete dbset; dbset =
nullptr;
840 ATH_MSG_DEBUG(
"setFrontierCache: Could not find any replicas for " << conn);
842 }
else if (conn.compare(0, 9,
"frontier:") == 0) {
843 physcons.push_back(conn);
846 if (physcons.size() == 0) {
847 return(StatusCode::SUCCESS);
849 coral::ConnectionService conSvcH;
853 coral::IWebCacheControl& webCache = conSvcH.webCacheControl();
854 for (
const auto& physcon : physcons) {
856 if (std::find(refreshList.begin(), refreshList.end(), physcon) == refreshList.end()
857 && std::find(refreshList.begin(), refreshList.end(), conn) == refreshList.end()) {
860 webCache.refreshTable(physcon,
"DUMMYTABLE");
863 webCache.refreshSchemaInfo(physcon);
865 ATH_MSG_DEBUG(
"Cache flag for connection " << physcon <<
" set to " << webCache.webCacheInfo(physcon).isSchemaInfoCached());
867 return(StatusCode::SUCCESS);
875 if (
catalog.compare(0, 8,
"apcfile:") == 0 ||
catalog.compare(0, 7,
"prfile:") == 0) {
876 std::string::size_type cpos =
catalog.find(
':');
891 <<
" in $ATLAS_POOLCOND_PATH and $DATAPATH");
901 }
catch(std::exception& e) {
902 ATH_MSG_ERROR(
"setWriteCatalog - caught exception: " << e.what());
912std::unique_ptr<pool::IDatabase>
PoolSvc::getDbHandle(
unsigned int contextId,
const std::string& dbName)
const {
914 ATH_MSG_WARNING(
"getDbHandle: Using default input Stream instead of id = " << contextId);
919 Io::IoFlag transMode = Io::READ;
926 if (dbName.compare(0, 4,
"PFN:") == 0) {
928 }
else if (dbName.compare(0, 4,
"LFN:") == 0) {
930 }
else if (dbName.compare(0, 4,
"FID:") == 0) {
938 if (dbH ==
nullptr) {
942 if (contName.find(
"DataHeader") != std::string::npos) {
947 return(std::unique_ptr<pool::IContainer>(contH));
953 const char* cpath = std::getenv(
"ATLAS_POOLCOND_PATH");
954 if (cpath && strcmp(cpath,
"") != 0) {
955 const std::string testpath = std::string(cpath) +
"/" + leaf;
959 if (FILE* fp = std::fopen(testpath.c_str(),
"r")) {
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
virtual void lock()=0
Interface to allow an object to lock itself when made const in SG.
This file contains the class definition for the Placement class (migrated from POOL).
bool isNumber(const std::string &s)
This file contains the class definition for the PoolSvc class.
size_t size() const
Number of registered mappings.
This file contains the class definition for the Token class (migrated from POOL).
This class provides a encapsulation of a GUID/UUID/CLSID/IID data structure (128 bit number).
constexpr void toString(std::span< char, StrLen > buf, bool uppercase=true) const noexcept
Automatic conversion to string representation.
static constexpr int stringSize()
static std::string find_file(const std::string &logical_file_name, const std::string &search_path)
This class holds all the necessary information to guide the writing of an object in a physical place.
const std::string & auxString() const
Access auxiliary string.
const std::string & containerName() const
Access container name.
virtual StatusCode io_reinit() override
pool::IFileCatalog * createCatalog()
virtual Token * registerForWrite(const Placement *placement, const void *obj, const RootType &classDesc) override
virtual ~PoolSvc()
Destructor.
Gaudi::Property< int > m_retrialTimeOut
ConnectionRetrialTimeOut, the retrial time out for CORAL Connection Service: default = 300 seconds.
Gaudi::Property< int > m_timeOut
ConnectionTimeOut, the time out for CORAL Connection Service: default = 5 seconds.
virtual void renamePfn(const std::string &pf, const std::string &newpf) override
Gaudi::Property< int > m_retrialPeriod
ConnectionRetrialPeriod, retry period for CORAL Connection Service: default = 30 seconds.
virtual const coral::Context * context() const override
pool::IFileCatalog * m_catalog
Gaudi::Property< std::vector< std::string > > m_frontierRefresh
virtual StatusCode connect(Io::IoFlag type, unsigned int contextId=IPoolSvc::kInputStream) override
Connect to a logical database unit; PersistencySvc is chosen according to transaction type (accessmod...
std::string poolCondPath(const std::string &leaf)
Resolve a file using ATLAS_POOLCOND_PATH.
virtual unsigned int getInputContextMapSize() const override
void patchCatalog(const std::string &pfn, pool::IDatabase &dbH) const
virtual unsigned int getInputContext(const std::string &label, unsigned int maxFile=0) override
Gaudi::Property< bool > m_sortReplicas
Use DBReplicaSvc to sort database connections, default = true.
std::recursive_mutex CallMutex
virtual void lookupBestPfn(const std::string &token, std::string &pfn, std::string &type) const override
virtual StatusCode setAttribute(const std::string &optName, const std::string &data, long tech, unsigned int contextId=IPoolSvc::kOutputStream) const override
Set POOL attributes - domain.
std::vector< pool::ISession * > m_dbSessionVec
Gaudi::Property< bool > m_connClean
ConnectionCleanUp - whether to use CORAL connection management thread: default = false.
Gaudi::Property< bool > m_useROOTIMT
Use ROOT Implicit MultiThreading, default = true.
virtual StatusCode commit(unsigned int contextId=IPoolSvc::kInputStream) const override
Commit data for a given contextId and flush buffer.
std::unique_ptr< pool::IContainer > getContainerHandle(pool::IDatabase *dbH, const std::string &contName) const
Get Container handle.
virtual Token * getToken(const std::string &connection, const std::string &collection, const unsigned long ientry) const override
virtual StatusCode start() override
Required of all Gaudi services:
Gaudi::Property< int > m_frontierComp
Frontier proprties, compression level and list of schemas to be refreshed: default = 5.
StatusCode setupPersistencySvc()
virtual StatusCode io_finalize() override
Gaudi::Property< int > m_dbAgeLimit
MaxFilesOpen, option to have PoolSvc limit the number of open Input Files: default = 0 (No files are ...
Gaudi::Property< bool > m_useROOTMaxTree
Increase virtual TTree size to avoid backreads in multithreading, default = false.
std::map< std::string, unsigned int > m_outputContextLabel
virtual StatusCode disconnectDb(const std::string &connection, unsigned int contextId=IPoolSvc::kInputStream) const override
Disconnect single Database.
std::vector< CallMutex * > m_pers_mut
std::map< std::string, unsigned int > m_inputContextLabel
virtual void setObjPtr(void *&obj, const Token *token) override
virtual void loadComponent(const std::string &compName) override
Gaudi::Property< std::vector< std::string > > m_readCatalog
ReadCatalog, the list of additional POOL input file catalogs to consult: default = empty vector.
std::string m_mainOutputLabel
virtual pool::ICollection * createCollection(const std::string &connection, const std::string &collectionName, const pool::DbType &collectionType=pool::POOL_StorageType.type(), unsigned int contextId=IPoolSvc::kInputStream) const override
virtual const pool::IFileCatalog * catalog() const override
std::map< unsigned int, unsigned int > m_contextMaxFile
virtual void setShareMode(bool shareCat) override
std::unique_ptr< pool::IDatabase > getDbHandle(unsigned int contextId, const std::string &dbName) const
Get Database handle.
coral::Context * m_context
virtual StatusCode commitAndHold(unsigned int contextId=IPoolSvc::kInputStream) const override
Commit data for a given contextId and hold buffer.
virtual StatusCode disconnect(unsigned int contextId=IPoolSvc::kInputStream) const override
Disconnect PersistencySvc associated with a contextId.
virtual StatusCode finalize() override
Required of all Gaudi services:
virtual StatusCode initialize() override
Required of all Gaudi services:
virtual StatusCode setFrontierCache(const std::string &conn) override
Setup Frontier cache for given logical or physical connection name.
virtual std::map< std::string, unsigned int > getInputContextMap() const override
virtual unsigned int getOutputContext(const std::string &label) override
Gaudi::Property< std::string > m_writeCatalog
WriteCatalog, the file catalog to be used to register output files (also default input catalog): defa...
virtual StatusCode stop() override
Gaudi::Property< bool > m_attemptCatalogPatch
AttemptCatalogPatch, option to create catalog: default = false.
std::map< unsigned int, std::list< Guid > > m_guidLists ATLAS_THREAD_SAFE
virtual StatusCode getAttribute(const std::string &optName, std::string &data, long tech, unsigned int contextId=IPoolSvc::kInputStream) const override
Get POOL attributes - domain.
This class provides a token that identifies in a unique way objects on the persistent storage.
const std::string & auxString() const
Access auxiliary string.
virtual const std::string toString() const
Retrieve the string representation of the token.
Token & fromString(const std::string_view from)
Build from the string representation of a token.
const Guid & dbID() const
Access database identifier.
A service for creating, accessing and managing an ensemble of collections of event references.
const std::string storageName() const
Human readable storage type.
int majorType() const
Access to major type.
An interface to a storage technology specific collection of event references and attributes.
IContainer is the base class for container objects.
IDatabase is the base class for database objects.
virtual bool setTechnology(long technology)=0
Sets the technology identifier for this database.
virtual const std::string & fid()=0
Returns the file identifier of this database.
virtual IContainer * containerHandle(const std::string &name)=0
Returns a pointer to a container object. The user acquires ownership of that object.
void addReadCatalog(const std::string &connect)
Add new catalog, identified by name, to the existing ones.
void removeCatalog(const std::string &connect)
Remove catalog identified by name from the existing ones. * or '' removes all.
void setWriteCatalog(const std::string &connect)
Establish the writable catalog, identified by name.
ISession is the interface class for user (macroscopic) sessions Every transaction and connection to a...
virtual std::unique_ptr< IDatabase > databaseHandle(const std::string &dbName, DatabaseSpecification::NameType dbNameType)=0
Returns a pointer to a database object. The user acquires ownership of that object.
virtual ITransaction & transaction()=0
Returns the transaction interface.
virtual const ITechnologySpecificAttributes & technologySpecificAttributes(long technology) const =0
Returns the object holding the technology specific attributes for a given technology domain.
virtual bool disconnectAll()=0
Explicitly disconnects all the databases.
T attribute(const std::string &attributeName, const std::string &option="")
Templated method to retrieve an attribute.
bool setAttribute(const std::string &attributeName, const T &atttibuteValue, const std::string &option="")
Templated method to set an attribute.
virtual bool commitAndHold()=0
Commits the holds transaction.
virtual bool start(Io::IoFlag type=Io::READ)=0
Starts a new transaction. Returns the success of the operation.
virtual bool isActive() const =0
Checks if the transaction is active.
static std::string release
std::string label(const std::string &format, int i)
std::unique_ptr< ISession > createSession(IFileCatalog &catalog, int ageLimit=-1)
static const DbType ROOT_StorageType
static const DbType POOL_StorageType
static void setLevel(MSG::Level l)