ATLAS Offline Software
Loading...
Searching...
No Matches
PoolSvc Class Reference

This class provides the interface to the LCG POOL persistency software. More...

#include <PoolSvc.h>

Inheritance diagram for PoolSvc:
Collaboration diagram for PoolSvc:

Classes

class  ContextLock

Public Member Functions

virtual StatusCode initialize () override
 Required of all Gaudi services:
virtual StatusCode io_reinit () override
virtual StatusCode start () override
 Required of all Gaudi services:
virtual StatusCode stop () override
virtual StatusCode finalize () override
 Required of all Gaudi services:
virtual StatusCode io_finalize () override
virtual TokenregisterForWrite (const Placement *placement, const void *obj, const RootType &classDesc) override
virtual void setObjPtr (void *&obj, const Token *token) override
virtual unsigned int getOutputContext (const std::string &label) override
virtual unsigned int getInputContext (const std::string &label, unsigned int maxFile=0) override
virtual std::map< std::string, unsigned int > getInputContextMap () const override
virtual unsigned int getInputContextMapSize () const override
virtual const coral::Context * context () const override
virtual void loadComponent (const std::string &compName) override
virtual void setShareMode (bool shareCat) override
virtual const pool::IFileCatalogcatalog () const override
virtual void lookupBestPfn (const std::string &token, std::string &pfn, std::string &type) const override
virtual void renamePfn (const std::string &pf, const std::string &newpf) override
virtual pool::ICollectioncreateCollection (const std::string &collectionType, const std::string &connection, const std::string &collectionName, unsigned int contextId=IPoolSvc::kInputStream) const override
virtual TokengetToken (const std::string &connection, const std::string &collection, const unsigned long ientry) const override
virtual StatusCode connect (pool::ITransaction::Type type, unsigned int contextId=IPoolSvc::kInputStream) override
 Connect to a logical database unit; PersistencySvc is chosen according to transaction type (accessmode).
virtual StatusCode commit (unsigned int contextId=IPoolSvc::kInputStream) const override
 Commit data for a given contextId and flush buffer.
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 disconnectDb (const std::string &connection, unsigned int contextId=IPoolSvc::kInputStream) const override
 Disconnect single Database.
virtual long long int getFileSize (const std::string &dbName, long tech, unsigned int contextId) const override
 Get POOL FileSize attribute for database without logging a message.
virtual StatusCode getAttribute (const std::string &optName, std::string &data, long tech, unsigned int contextId=IPoolSvc::kInputStream) const override
 Get POOL attributes - domain.
virtual StatusCode getAttribute (const std::string &optName, std::string &data, long tech, const std::string &dbName, const std::string &contName="", unsigned int contextId=IPoolSvc::kInputStream) const override
 Get POOL attributes - db/file, container/collection.
virtual StatusCode setAttribute (const std::string &optName, const std::string &data, long tech, unsigned int contextId=IPoolSvc::kOutputStream) const override
 Set POOL attributes - domain.
virtual StatusCode setAttribute (const std::string &optName, const std::string &data, long tech, const std::string &dbName, const std::string &contName="", unsigned int contextId=IPoolSvc::kOutputStream) const override
 Set POOL attributes - db/file, container/collection.
virtual StatusCode setFrontierCache (const std::string &conn) override
 Setup Frontier cache for given logical or physical connection name.
virtual ~PoolSvc ()
 Destructor.

Private Types

typedef std::recursive_mutex CallMutex

Private Member Functions

void clearState ()
pool::IFileCatalogcreateCatalog ()
void patchCatalog (const std::string &pfn, pool::IDatabase &dbH) const
StatusCode setupPersistencySvc ()
std::unique_ptr< pool::IDatabasegetDbHandle (unsigned int contextId, const std::string &dbName) const
 Get Database handle.
std::unique_ptr< pool::IContainergetContainerHandle (pool::IDatabase *dbH, const std::string &contName) const
 Get Container handle.
std::string poolCondPath (const std::string &leaf)
 Resolve a file using ATLAS_POOLCOND_PATH.

Private Attributes

CallMutex m_pool_mut
coral::Context * m_context {nullptr}
bool m_shareCat {false}
pool::IFileCatalogm_catalog {nullptr}
std::vector< pool::IPersistencySvc * > m_persistencySvcVec
std::vector< CallMutex * > m_pers_mut
std::map< std::string, unsigned int > m_inputContextLabel
std::map< std::string, unsigned int > m_outputContextLabel
std::string m_mainOutputLabel {}
std::map< unsigned int, unsigned int > m_contextMaxFile
std::map< unsigned int, std::list< Guid > > m_guidLists ATLAS_THREAD_SAFE
Gaudi::Property< std::string > m_fileOpen {this,"FileOpen","overwrite"}
 FileOpen, the open mode for the file ("append" or "overwrite").
Gaudi::Property< int > m_dbAgeLimit {this,"MaxFilesOpen",0}
 MaxFilesOpen, option to have PoolSvc limit the number of open Input Files: default = 0 (No files are closed automatically)
Gaudi::Property< std::string > m_writeCatalog {this,"WriteCatalog","xmlcatalog_file:PoolFileCatalog.xml"}
 WriteCatalog, the file catalog to be used to register output files (also default input catalog): default = "" (use POOL default).
Gaudi::Property< std::vector< std::string > > m_readCatalog {this,"ReadCatalog",{},"List of catalog files to read from","OrderedSet<std::string>"}
 ReadCatalog, the list of additional POOL input file catalogs to consult: default = empty vector.
Gaudi::Property< bool > m_useROOTIMT {this,"UseROOTImplicitMT",true}
 Use ROOT Implicit MultiThreading, default = true.
Gaudi::Property< bool > m_useROOTMaxTree {this,"UseROOTIncreaseVMaxTree",false}
 Increase virtual TTree size to avoid backreads in multithreading, default = false.
Gaudi::Property< bool > m_attemptCatalogPatch {this,"AttemptCatalogPatch",true}
 AttemptCatalogPatch, option to create catalog: default = false.
Gaudi::Property< int > m_retrialPeriod {this,"ConnectionRetrialPeriod",300}
 ConnectionRetrialPeriod, retry period for CORAL Connection Service: default = 30 seconds.
Gaudi::Property< int > m_retrialTimeOut {this,"ConnectionRetrialTimeOut",3600}
 ConnectionRetrialTimeOut, the retrial time out for CORAL Connection Service: default = 300 seconds.
Gaudi::Property< int > m_timeOut {this,"ConnectionTimeOut",5}
 ConnectionTimeOut, the time out for CORAL Connection Service: default = 5 seconds.
Gaudi::Property< bool > m_connClean {this,"ConnectionCleanUp",false}
 ConnectionCleanUp - whether to use CORAL connection management thread: default = false.
Gaudi::Property< int > m_frontierComp {this,"FrontierCompression",5}
 Frontier proprties, compression level and list of schemas to be refreshed: default = 5.
Gaudi::Property< std::vector< std::string > > m_frontierRefresh {this,"FrontierRefreshSchema",{}}
Gaudi::Property< bool > m_sortReplicas {this,"SortReplicas",true}
 Use DBReplicaSvc to sort database connections, default = true.
Gaudi::Property< std::string > m_defaultROOTContainerType {this, "DefaultContainerType", "ROOTTREEINDEX"}
 Default ROOT container type.

Detailed Description

This class provides the interface to the LCG POOL persistency software.

Definition at line 36 of file PoolSvc.h.

Member Typedef Documentation

◆ CallMutex

typedef std::recursive_mutex PoolSvc::CallMutex
private

Definition at line 209 of file PoolSvc.h.

Constructor & Destructor Documentation

◆ ~PoolSvc()

PoolSvc::~PoolSvc ( )
virtual

Destructor.

Definition at line 985 of file PoolSvc.cxx.

985 {
986}

Member Function Documentation

◆ catalog()

const pool::IFileCatalog * PoolSvc::catalog ( ) const
overridevirtual
Returns
the file catalog.

Definition at line 406 of file PoolSvc.cxx.

406 {
407 return(m_catalog);
408}
pool::IFileCatalog * m_catalog
Definition PoolSvc.h:226

◆ clearState()

void PoolSvc::clearState ( )
private

Definition at line 239 of file PoolSvc.cxx.

239 {
240 std::lock_guard<CallMutex> lock(m_pool_mut);
241 // Cleanup persistency service
242 for (const auto& persistencySvc : m_persistencySvcVec) {
243 delete persistencySvc;
244 }
245 m_persistencySvcVec.clear();
246 for (const auto& persistencyMutex : m_pers_mut) {
247 delete persistencyMutex;
248 }
249 m_mainOutputLabel.clear();
250 m_inputContextLabel.clear();
251 m_outputContextLabel.clear();
252 m_pers_mut.clear();
253 if (m_catalog != nullptr) {
254 m_catalog->commit();
255 delete m_catalog; m_catalog = nullptr;
256 }
257}
CallMutex m_pool_mut
Definition PoolSvc.h:223
std::map< std::string, unsigned int > m_outputContextLabel
Definition PoolSvc.h:230
std::vector< pool::IPersistencySvc * > m_persistencySvcVec
Definition PoolSvc.h:227
std::vector< CallMutex * > m_pers_mut
Definition PoolSvc.h:228
std::map< std::string, unsigned int > m_inputContextLabel
Definition PoolSvc.h:229
std::string m_mainOutputLabel
Definition PoolSvc.h:231

◆ commit()

StatusCode PoolSvc::commit ( unsigned int contextId = IPoolSvc::kInputStream) const
overridevirtual

Commit data for a given contextId and flush buffer.

Parameters
contextId[IN] poolStream to be commited.

Definition at line 625 of file PoolSvc.cxx.

625 {
626 if (contextId >= m_persistencySvcVec.size()) {
627 return(StatusCode::FAILURE);
628 }
629 ContextLock lock(contextId, m_pool_mut, m_pers_mut);
630 pool::IPersistencySvc* persSvc = m_persistencySvcVec[contextId];
631 if (persSvc != nullptr && persSvc->session().transaction().isActive()) {
632 if (!persSvc->session().transaction().commit()) {
633 ATH_MSG_ERROR("POOL commit failed " << persSvc);
634 return(StatusCode::FAILURE);
635 }
636 if (persSvc->session().transaction().type() == pool::ITransaction::READ) {
637 persSvc->session().disconnectAll();
638 }
639 }
640 return(StatusCode::SUCCESS);
641}
#define ATH_MSG_ERROR(x)
virtual ISession & session()=0
Returns the underlying global session.
virtual ITransaction & transaction()=0
Returns the transaction object.
virtual bool disconnectAll()=0
Explicitly disconnects all the databases.
virtual bool commit()=0
Commits the transaction.
virtual Type type() const =0
Returns the transaction type.
virtual bool isActive() const =0
Checks if the transaction is active.

◆ commitAndHold()

StatusCode PoolSvc::commitAndHold ( unsigned int contextId = IPoolSvc::kInputStream) const
overridevirtual

Commit data for a given contextId and hold buffer.

Parameters
contextId[IN] poolStream to be commited.

Definition at line 643 of file PoolSvc.cxx.

643 {
644 if (contextId >= m_persistencySvcVec.size()) {
645 return(StatusCode::FAILURE);
646 }
647 ContextLock lock(contextId, m_pool_mut, m_pers_mut);
648 pool::IPersistencySvc* persSvc = m_persistencySvcVec[contextId];
649 if (persSvc != nullptr && persSvc->session().transaction().isActive()) {
650 if (!persSvc->session().transaction().commitAndHold()) {
651 ATH_MSG_ERROR("POOL commitAndHold failed " << persSvc);
652 return(StatusCode::FAILURE);
653 }
654 }
655 return(StatusCode::SUCCESS);
656}
virtual bool commitAndHold()=0
Commits the holds transaction.

◆ connect()

StatusCode PoolSvc::connect ( pool::ITransaction::Type type,
unsigned int contextId = IPoolSvc::kInputStream )
overridevirtual

Connect to a logical database unit; PersistencySvc is chosen according to transaction type (accessmode).

Definition at line 593 of file PoolSvc.cxx.

593 {
594 if (type != pool::ITransaction::READ) {
595 if (contextId >= m_persistencySvcVec.size()) {
596 ATH_MSG_WARNING("connect: Using default output Stream instead of id = " << contextId);
597 contextId = IPoolSvc::kOutputStream;
598 }
599 } else {
600 if (contextId > m_persistencySvcVec.size()) {
601 ATH_MSG_WARNING("connect: Using default input Stream instead of id = " << contextId);
602 contextId = IPoolSvc::kInputStream;
603 } else if (contextId == m_persistencySvcVec.size()) {
604 ATH_MSG_INFO("Connecting to InputStream for: " << contextId);
605 contextId = this->getInputContext("");
606 }
607 }
608 if (contextId >= m_persistencySvcVec.size()) {
609 return(StatusCode::FAILURE);
610 }
611 ContextLock lock(contextId, m_pool_mut, m_pers_mut);
612 pool::IPersistencySvc* persSvc = m_persistencySvcVec[contextId];
613 // Connect to a logical database using the pre-defined technology and dbID
614 if (persSvc->session().transaction().isActive()) {
615 return(StatusCode::SUCCESS);
616 }
617 if (!persSvc->session().transaction().start(type)) {
618 ATH_MSG_ERROR("connect failed persSvc = " << persSvc << " type = " << type);
619 return(StatusCode::FAILURE);
620 }
621
622 return(StatusCode::SUCCESS);
623}
#define ATH_MSG_INFO(x)
#define ATH_MSG_WARNING(x)
@ kOutputStream
Definition IPoolSvc.h:39
@ kInputStream
Definition IPoolSvc.h:39
virtual unsigned int getInputContext(const std::string &label, unsigned int maxFile=0) override
Definition PoolSvc.cxx:359
virtual bool start(Type type=READ)=0
Starts a new transaction. Returns the success of the operation.

◆ context()

const coral::Context * PoolSvc::context ( ) const
overridevirtual
Returns
the context.

Definition at line 394 of file PoolSvc.cxx.

394 {
395 return(m_context);
396}
coral::Context * m_context
Definition PoolSvc.h:224

◆ createCatalog()

pool::IFileCatalog * PoolSvc::createCatalog ( )
private

Definition at line 945 of file PoolSvc.cxx.

945 {
946 pool::IFileCatalog* ctlg = new pool::IFileCatalog;
947 ctlg->removeCatalog("*");
948 for (auto& catalog : m_readCatalog.value()) {
949 ATH_MSG_DEBUG("POOL ReadCatalog is " << catalog);
950 if (catalog.compare(0, 8,"apcfile:") == 0 || catalog.compare(0, 7, "prfile:") == 0) {
951 std::string::size_type cpos = catalog.find(':');
952 // check for file accessed via ATLAS_POOLCOND_PATH
953 std::string file = poolCondPath(catalog.substr(cpos + 1));
954 if (!file.empty()) {
955 ATH_MSG_INFO("Resolved path (via ATLAS_POOLCOND_PATH) is " << file);
956 ctlg->addReadCatalog("file:" + file);
957 } else {
958 // As backup, check for file accessed via PathResolver
959 file = PathResolver::find_file(catalog.substr(cpos + 1), "DATAPATH");
960 if (!file.empty()) {
961 ATH_MSG_INFO("Resolved path (via DATAPATH) is " << file);
962 ctlg->addReadCatalog("file:" + file);
963 } else {
964 ATH_MSG_INFO("Unable find catalog "
965 << catalog
966 << " in $ATLAS_POOLCOND_PATH and $DATAPATH");
967 }
968 }
969 } else {
970 ctlg->addReadCatalog(catalog);
971 }
972 }
973 try {
974 ATH_MSG_INFO("POOL WriteCatalog is " << m_writeCatalog.value());
975 ctlg->setWriteCatalog(m_writeCatalog.value());
976 ctlg->connect();
977 } catch(std::exception& e) {
978 ATH_MSG_ERROR("setWriteCatalog - caught exception: " << e.what());
979 return(nullptr); // This catalog is not setup properly!
980 }
981 return(ctlg);
982}
#define ATH_MSG_DEBUG(x)
static std::string find_file(const std::string &logical_file_name, const std::string &search_path)
std::string poolCondPath(const std::string &leaf)
Resolve a file using ATLAS_POOLCOND_PATH.
Definition PoolSvc.cxx:1032
Gaudi::Property< std::vector< std::string > > m_readCatalog
ReadCatalog, the list of additional POOL input file catalogs to consult: default = empty vector.
Definition PoolSvc.h:246
virtual const pool::IFileCatalog * catalog() const override
Definition PoolSvc.cxx:406
Gaudi::Property< std::string > m_writeCatalog
WriteCatalog, the file catalog to be used to register output files (also default input catalog): defa...
Definition PoolSvc.h:244
void addReadCatalog(const std::string &connect)
Add new catalog identified by name to the existing ones.
void removeCatalog(const std::string &connect)
Add new catalog identified by reference to the existing ones.
void setWriteCatalog(const std::string &connect)
Access to the (first) writable file catalog.
TFile * file

◆ createCollection()

pool::ICollection * PoolSvc::createCollection ( const std::string & collectionType,
const std::string & connection,
const std::string & collectionName,
unsigned int contextId = IPoolSvc::kInputStream ) const
overridevirtual
Returns
a pointer to a Pool Collection.
Parameters
collectionType[IN] string containing the collection type.
connection[IN] string containing the connection.
collectionName[IN] string containing the persistent name of the collection.
contextId[IN] id for PoolSvc persistency service to use for input.

Definition at line 443 of file PoolSvc.cxx.

446 {
447 ATH_MSG_DEBUG("createCollection() type="<< collectionType << ", connection=" << connection
448 << ", name=" << collectionName << ", contextID=" << contextId);
449 std::string collection(collectionName);
450 if (collectionType == "RootCollection") {
451 if (collectionName.find("PFN:") == std::string::npos
452 && collectionName.find("LFN:") == std::string::npos
453 && collectionName.find("FID:") == std::string::npos) {
454 collection = "PFN:" + collectionName;
455 }
456 }
457 if (contextId >= m_persistencySvcVec.size()) {
458 ATH_MSG_WARNING("createCollection: Using default input Stream instead of id = " << contextId);
459 contextId = IPoolSvc::kInputStream;
460 }
461 ContextLock lock(contextId, m_pool_mut, m_pers_mut);
462 // Check POOL FileCatalog entry.
463 bool insertFile = false;
464 if (connection.compare(0, 4, "PFN:") == 0) {
465 std::string fid, fileType;
466 m_catalog->lookupFileByPFN(connection.substr(4), fid, fileType);
467 if (fid.empty()) { // No entry in file catalog
468 insertFile = true;
469 ATH_MSG_INFO("File is not in Catalog! Attempt to open it anyway.");
470 }
471 }
472 // Check whether Collection Container exists.
473 if (collectionType == "ImplicitCollection") {
474 std::unique_ptr<pool::IDatabase> dbH = getDbHandle(contextId, connection);
475 if (dbH == nullptr) {
476 ATH_MSG_INFO("Failed to get Session/DatabaseHandle to create POOL collection.");
477 return(nullptr);
478 }
479 try {
480 if (dbH->openMode() == pool::IDatabase::CLOSED) {
481 dbH->connectForRead();
482 }
483 std::map<unsigned int, unsigned int>::const_iterator maxFileIter = m_contextMaxFile.find(contextId);
484 if (maxFileIter != m_contextMaxFile.end() && maxFileIter->second > 0 && !dbH->fid().empty()) {
485 const Guid guid(dbH->fid());
486 m_guidLists[contextId].remove(guid);
487 m_guidLists[contextId].push_back(guid);
488 while (m_guidLists[contextId].size() > maxFileIter->second + 1) {
489 this->disconnectDb("FID:" + m_guidLists[contextId].begin()->toString(), contextId).ignore();
490 }
491 }
492 std::unique_ptr<pool::IContainer> contH = getContainerHandle(dbH.get(), collection);
493 if (contH == nullptr) {
494 ATH_MSG_INFO("Failed to find container " << collection << " to create POOL collection.");
495 if (insertFile && m_attemptCatalogPatch.value()) {
496 patchCatalog(connection.substr(4), *dbH);
497 }
498 return(nullptr); // no events
499 }
500 } catch(std::exception& e) {
501 ATH_MSG_INFO("Failed to open container to check POOL collection - trying.");
502 }
503 }
504
505 // access to these variables is locked below:
506 pool::CollectionService collSvc ATLAS_THREAD_SAFE = pool::CollectionService();
507 pool::ICollection* collPtr ATLAS_THREAD_SAFE = nullptr;
508
509 if (collectionType == "RootCollection" &&
510 m_persistencySvcVec[contextId]->session().defaultConnectionPolicy().writeModeForNonExisting() != pool::DatabaseConnectionPolicy::RAISE_ERROR) {
511 ATH_MSG_INFO("Writing RootCollection - do not pass session pointer");
512 std::scoped_lock lock(m_pool_mut);
513 collPtr = collSvc.handle(collection, collectionType, "", true);
514 } else {
515 // Try to open APR EventTags Collection in the input file - first as RootCollection, then as RNTCollection
516 std::scoped_lock lock(m_pool_mut);
517 std::string tree_error, rntuple_error;
518 try {
519 collPtr = collSvc.handle(collection, collectionType, collectionType == "ImplicitCollection" ? connection : "", true, &m_persistencySvcVec[contextId]->session());
520 } catch (std::exception &e) {
521 tree_error = e.what();
522 }
523 if( !collPtr ) try {
524 collPtr = collSvc.handle(collection, "RNTCollection", collectionType == "ImplicitCollection" ? connection : "", true, &m_persistencySvcVec[contextId]->session());
525 } catch (std::exception &e) {
526 if (insertFile) {
527 std::unique_ptr<pool::IDatabase> dbH = getDbHandle(contextId, connection);
528 if (dbH != nullptr) {
529 if (!dbH->fid().empty()) {
530 return(nullptr); // no events
531 }
532 }
533 }
534 rntuple_error = e.what();
535 }
536 if( !collPtr ) throw std::runtime_error( "Failed to open APR Collection as RootCollection or RNTCollection: "
537 + tree_error + " | " + rntuple_error + "PoolSvc::createCollection" );
538 }
539 if (insertFile && m_attemptCatalogPatch.value()) {
540 std::unique_ptr<pool::IDatabase> dbH = getDbHandle(contextId, connection);
541 if (dbH == nullptr) {
542 ATH_MSG_INFO("Failed to create FileCatalog entry.");
543 } else if (dbH->fid().empty()) {
544 ATH_MSG_INFO("Cannot retrieve the FID of an existing POOL database: '"
545 << connection << "' - FileCatalog will NOT be updated.");
546 } else {
547 patchCatalog(connection.substr(4), *dbH);
548 }
549 }
550 // For multithreaded processing (with multiple events in flight),
551 // increase virtual tree size to accomodate back reads
552 if (m_useROOTMaxTree && Gaudi::Concurrency::ConcurrencyFlags::numConcurrentEvents() > 1) {
553 if (!this->setAttribute("TREE_MAX_VIRTUAL_SIZE", "-1", pool::ROOT_StorageType.type(), connection.substr(4), "CollectionTree", IPoolSvc::kInputStream).isSuccess()) {
554 ATH_MSG_WARNING("Failed to increase maximum virtual TTree size.");
555 }
556 }
557
558 return(collPtr);
559}
void patchCatalog(const std::string &pfn, pool::IDatabase &dbH) const
Definition PoolSvc.cxx:561
virtual StatusCode setAttribute(const std::string &optName, const std::string &data, long tech, unsigned int contextId=IPoolSvc::kOutputStream) const override
Set POOL attributes - domain.
Definition PoolSvc.cxx:790
std::unique_ptr< pool::IContainer > getContainerHandle(pool::IDatabase *dbH, const std::string &contName) const
Get Container handle.
Definition PoolSvc.cxx:1015
Gaudi::Property< bool > m_useROOTMaxTree
Increase virtual TTree size to avoid backreads in multithreading, default = false.
Definition PoolSvc.h:250
virtual StatusCode disconnectDb(const std::string &connection, unsigned int contextId=IPoolSvc::kInputStream) const override
Disconnect single Database.
Definition PoolSvc.cxx:680
std::map< unsigned int, unsigned int > m_contextMaxFile
Definition PoolSvc.h:232
std::unique_ptr< pool::IDatabase > getDbHandle(unsigned int contextId, const std::string &dbName) const
Get Database handle.
Definition PoolSvc.cxx:988
Gaudi::Property< bool > m_attemptCatalogPatch
AttemptCatalogPatch, option to create catalog: default = false.
Definition PoolSvc.h:253
std::map< unsigned int, std::list< Guid > > m_guidLists ATLAS_THREAD_SAFE
Definition PoolSvc.h:234
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
static const DbType ROOT_StorageType
Definition DbType.h:99

◆ disconnect()

StatusCode PoolSvc::disconnect ( unsigned int contextId = IPoolSvc::kInputStream) const
overridevirtual

Disconnect PersistencySvc associated with a contextId.

Parameters
contextId[IN] poolStream to be disconnected.

Definition at line 658 of file PoolSvc.cxx.

658 {
659 ATH_MSG_DEBUG("Disconnect request for contextId=" << contextId);
660 if (contextId >= m_persistencySvcVec.size()) {
661 return(StatusCode::SUCCESS);
662 }
663 ContextLock lock(contextId, m_pool_mut, m_pers_mut);
664 pool::IPersistencySvc* persSvc = m_persistencySvcVec[contextId];
665 if (persSvc != nullptr && persSvc->session().transaction().isActive()) {
666 if (!commit(contextId).isSuccess()) {
667 ATH_MSG_ERROR("disconnect failed to commit " << persSvc);
668 return(StatusCode::FAILURE);
669 }
670 if (persSvc->session().disconnectAll()) {
671 ATH_MSG_DEBUG("Disconnected PersistencySvc session");
672 } else {
673 ATH_MSG_ERROR("disconnect failed to diconnect PersistencySvc");
674 return(StatusCode::FAILURE);
675 }
676 }
677 return(StatusCode::SUCCESS);
678}
virtual StatusCode commit(unsigned int contextId=IPoolSvc::kInputStream) const override
Commit data for a given contextId and flush buffer.
Definition PoolSvc.cxx:625

◆ disconnectDb()

StatusCode PoolSvc::disconnectDb ( const std::string & connection,
unsigned int contextId = IPoolSvc::kInputStream ) const
overridevirtual

Disconnect single Database.

Parameters
connection[IN] connection string for Database to be disconnected.
contextId[IN] context id of database to be disconnected.

Definition at line 680 of file PoolSvc.cxx.

680 {
681 if (contextId >= m_persistencySvcVec.size()) {
682 return(StatusCode::SUCCESS);
683 }
684 ContextLock lock(contextId, m_pool_mut, m_pers_mut);
685 std::unique_ptr<pool::IDatabase> dbH = getDbHandle(contextId, connection);
686 if (dbH == nullptr) {
687 ATH_MSG_ERROR("Failed to get Session/DatabaseHandle.");
688 return(StatusCode::FAILURE);
689 }
690 std::map<unsigned int, unsigned int>::const_iterator maxFileIter = m_contextMaxFile.find(contextId);
691 if (maxFileIter != m_contextMaxFile.end() && maxFileIter->second > 0) {
692 m_guidLists[contextId].remove(Guid(dbH->fid()));
693 }
694 dbH->disconnect();
695 return(StatusCode::SUCCESS);
696}

◆ finalize()

StatusCode PoolSvc::finalize ( )
overridevirtual

Required of all Gaudi services:

Definition at line 259 of file PoolSvc.cxx.

259 {
260 clearState();
261 return(::AthService::finalize());
262}
void clearState()
Definition PoolSvc.cxx:239

◆ getAttribute() [1/2]

StatusCode PoolSvc::getAttribute ( const std::string & optName,
std::string & data,
long tech,
const std::string & dbName,
const std::string & contName = "",
unsigned int contextId = IPoolSvc::kInputStream ) const
overridevirtual

Get POOL attributes - db/file, container/collection.

Definition at line 739 of file PoolSvc.cxx.

744 {
745 ContextLock lock(contextId, m_pool_mut, m_pers_mut);
746 std::unique_ptr<pool::IDatabase> dbH = getDbHandle(contextId, dbName);
747 if (dbH == nullptr) {
748 ATH_MSG_DEBUG("getAttribute: Failed to get Session/DatabaseHandle to get POOL property.");
749 return(StatusCode::FAILURE);
750 }
751 if (dbH->openMode() == pool::IDatabase::CLOSED) {
752 if (m_persistencySvcVec[contextId]->session().defaultConnectionPolicy().writeModeForNonExisting() != pool::DatabaseConnectionPolicy::RAISE_ERROR) {
753 dbH->setTechnology(tech);
754 dbH->connectForWrite();
755 } else {
756 dbH->connectForRead();
757 }
758 }
759 std::ostringstream oss;
760 if (contName.empty()) {
761 if (data == "DbLonglong") {
762 oss << std::dec << dbH->technologySpecificAttributes().attribute<long long int>(optName);
763 } else if (data == "double") {
764 oss << std::dec << dbH->technologySpecificAttributes().attribute<double>(optName);
765 } else if (data == "string") {
766 oss << dbH->technologySpecificAttributes().attribute<char*>(optName);
767 } else {
768 oss << std::dec << dbH->technologySpecificAttributes().attribute<int>(optName);
769 }
770 ATH_MSG_INFO("Database (" << dbH->pfn() << ") attribute [" << optName << "]" << ": " << oss.str());
771 } else {
772 std::unique_ptr<pool::IContainer> contH = getContainerHandle(dbH.get(), contName);
773 if (contH == nullptr) {
774 ATH_MSG_DEBUG("Failed to get ContainerHandle to get POOL property.");
775 return(StatusCode::FAILURE);
776 }
777 if (data == "DbLonglong") {
778 oss << std::dec << contH->technologySpecificAttributes().attribute<long long int>(optName);
779 } else if (data == "double") {
780 oss << std::dec << contH->technologySpecificAttributes().attribute<double>(optName);
781 } else {
782 oss << std::dec << contH->technologySpecificAttributes().attribute<int>(optName);
783 }
784 ATH_MSG_INFO("Container attribute [" << contName << "." << optName << "]: " << oss.str());
785 }
786 data = oss.str();
787 return(StatusCode::SUCCESS);
788}
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11

◆ getAttribute() [2/2]

StatusCode PoolSvc::getAttribute ( const std::string & optName,
std::string & data,
long tech,
unsigned int contextId = IPoolSvc::kInputStream ) const
overridevirtual

Get POOL attributes - domain.

Definition at line 716 of file PoolSvc.cxx.

719 {
720 if (contextId >= m_persistencySvcVec.size()) {
721 ATH_MSG_WARNING("getAttribute: Using default input Stream instead of id = " << contextId);
722 contextId = IPoolSvc::kInputStream;
723 }
724 ContextLock lock(contextId, m_pool_mut, m_pers_mut);
725 pool::ISession& sesH = m_persistencySvcVec[contextId]->session();
726 std::ostringstream oss;
727 if (data == "DbLonglong") {
728 oss << std::dec << sesH.technologySpecificAttributes(tech).attribute<long long int>(optName);
729 } else if (data == "double") {
730 oss << std::dec << sesH.technologySpecificAttributes(tech).attribute<double>(optName);
731 } else {
732 oss << std::dec << sesH.technologySpecificAttributes(tech).attribute<int>(optName);
733 }
734 data = oss.str();
735 ATH_MSG_INFO("Domain attribute [" << optName << "]" << ": " << data);
736 return(StatusCode::SUCCESS);
737}
virtual const ITechnologySpecificAttributes & technologySpecificAttributes(long technology) const =0
Returns the object holding the technology specific attributes for a given technology domain.
T attribute(const std::string &attributeName, const std::string &option="")
Templated method to retrieve an attribute.

◆ getContainerHandle()

std::unique_ptr< pool::IContainer > PoolSvc::getContainerHandle ( pool::IDatabase * dbH,
const std::string & contName ) const
private

Get Container handle.

Definition at line 1015 of file PoolSvc.cxx.

1015 {
1016 pool::IContainer* contH = nullptr;
1017 if (dbH == nullptr) {
1018 ATH_MSG_DEBUG("No DatabaseHandle to get Container.");
1019 return(nullptr);
1020 }
1021 if (dbH->openMode() == pool::IDatabase::CLOSED) {
1022 dbH->connectForRead();
1023 }
1024 if (contName.find("DataHeader") != std::string::npos) {
1025 contH = dbH->containerHandle(contName.substr(0, contName.find("_p")));
1026 } else {
1027 contH = dbH->containerHandle(contName);
1028 }
1029 return(std::unique_ptr<pool::IContainer>(contH));
1030}
virtual OpenMode openMode() const =0
Returns the opening mode. It can be used to check whether the database is connected.
virtual void connectForRead()=0
Connects explicitly to the database for read operations.
virtual IContainer * containerHandle(const std::string &name)=0
Returns a pointer to a container object. The user acquires ownership of that object.

◆ getDbHandle()

std::unique_ptr< pool::IDatabase > PoolSvc::getDbHandle ( unsigned int contextId,
const std::string & dbName ) const
private

Get Database handle.

Definition at line 988 of file PoolSvc.cxx.

988 {
989 if (contextId >= m_persistencySvcVec.size()) {
990 ATH_MSG_WARNING("getDbHandle: Using default input Stream instead of id = " << contextId);
991 contextId = IPoolSvc::kInputStream;
992 }
993 pool::ISession& sesH = m_persistencySvcVec[contextId]->session();
994 if (!sesH.transaction().isActive()) {
996 if (m_persistencySvcVec[contextId]->session().defaultConnectionPolicy().writeModeForNonExisting() != pool::DatabaseConnectionPolicy::RAISE_ERROR) {
997 transMode = pool::ITransaction::UPDATE;
998 }
999 ATH_MSG_DEBUG("Start transaction, type = " << transMode);
1000 if (!sesH.transaction().start(transMode)) {
1001 ATH_MSG_WARNING("Failed to start transaction, type = " << transMode);
1002 return(nullptr);
1003 }
1004 }
1005 if (dbName.compare(0, 4,"PFN:") == 0) {
1007 } else if (dbName.compare(0, 4, "LFN:") == 0) {
1009 } else if (dbName.compare(0, 4,"FID:") == 0) {
1011 }
1013}
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.
Type
Transaction type enumeration.

◆ getFileSize()

long long int PoolSvc::getFileSize ( const std::string & dbName,
long tech,
unsigned int contextId ) const
overridevirtual

Get POOL FileSize attribute for database without logging a message.

Definition at line 698 of file PoolSvc.cxx.

698 {
699 ContextLock lock(contextId, m_pool_mut, m_pers_mut);
700 std::unique_ptr<pool::IDatabase> dbH = getDbHandle(contextId, dbName);
701 if (dbH == nullptr) {
702 ATH_MSG_DEBUG("getFileSize: Failed to get Session/DatabaseHandle to get POOL FileSize property.");
703 return 0; // failure
704 }
705 if (dbH->openMode() == pool::IDatabase::CLOSED) {
706 if (m_persistencySvcVec[contextId]->session().defaultConnectionPolicy().writeModeForNonExisting() != pool::DatabaseConnectionPolicy::RAISE_ERROR) {
707 dbH->setTechnology(tech);
708 dbH->connectForWrite();
709 } else {
710 dbH->connectForRead();
711 }
712 }
713 return(dbH->technologySpecificAttributes().attribute<long long int>("FILE_SIZE"));
714}

◆ getInputContext()

unsigned int PoolSvc::getInputContext ( const std::string & label,
unsigned int maxFile = 0 )
overridevirtual
Returns
an Id for an input context (POOL persistency service) and create it if needed.
Parameters
label[IN] string label to name new context and allow sharing (returns existing contextId)
maxFile[IN] maximum number of open input files.

Definition at line 359 of file PoolSvc.cxx.

359 {
360 std::lock_guard<CallMutex> lock(m_pool_mut);
361 if (!label.empty()) {
362 std::map<std::string, unsigned int>::const_iterator contextIter = m_inputContextLabel.find(label);
363 if (contextIter != m_inputContextLabel.end()) {
364 if (maxFile > 0) {
365 m_contextMaxFile[contextIter->second] = maxFile;
366 }
367 return(contextIter->second);
368 }
369 }
370 const unsigned int id = m_persistencySvcVec.size();
371 m_persistencySvcVec.push_back( pool::IPersistencySvc::create(*m_catalog).release() );
372 m_pers_mut.push_back(new CallMutex);
373 if (!connect(pool::ITransaction::READ, id).isSuccess()) {
374 ATH_MSG_WARNING("Failed to connect Input PersistencySvc: " << id);
376 }
377 if (!label.empty()) {
378 m_inputContextLabel.insert(std::pair<std::string, unsigned int>(label, id));
379 }
380 m_contextMaxFile.insert(std::pair<unsigned int, int>(id, maxFile));
381 return(id);
382}
virtual StatusCode connect(pool::ITransaction::Type type, unsigned int contextId=IPoolSvc::kInputStream) override
Connect to a logical database unit; PersistencySvc is chosen according to transaction type (accessmod...
Definition PoolSvc.cxx:593
std::recursive_mutex CallMutex
Definition PoolSvc.h:209
static std::unique_ptr< IPersistencySvc > create(IFileCatalog &catalog)
Factory for PersistencySvc.
std::string label(const std::string &format, int i)
Definition label.h:19

◆ getInputContextMap()

std::map< std::string, unsigned int > PoolSvc::getInputContextMap ( ) const
overridevirtual
Returns
copy of the map of all labelled input contexts.

Definition at line 384 of file PoolSvc.cxx.

384 {
385 std::lock_guard<CallMutex> lock(m_pool_mut);
386 return(m_inputContextLabel);
387}

◆ getInputContextMapSize()

unsigned int PoolSvc::getInputContextMapSize ( ) const
overridevirtual
Returns
size of the map of all labelled input contexts.

Definition at line 389 of file PoolSvc.cxx.

389 {
390 std::lock_guard<CallMutex> lock(m_pool_mut);
391 return(m_inputContextLabel.size());
392}

◆ getOutputContext()

unsigned int PoolSvc::getOutputContext ( const std::string & label)
overridevirtual
Returns
an Id for an output context (POOL persistency service) and create it if needed.
Parameters
label[IN] string label to name new context and allow sharing (returns existing contextId)

Definition at line 328 of file PoolSvc.cxx.

328 {
329 std::lock_guard<CallMutex> lock(m_pool_mut);
330 if (m_mainOutputLabel.empty()) {
332 m_outputContextLabel.insert(std::pair<std::string, unsigned int>(label, IPoolSvc::kOutputStream));
333 }
334 if (label == m_mainOutputLabel || label.empty()) {
336 }
337 std::map<std::string, unsigned int>::const_iterator contextIter = m_outputContextLabel.find(label);
338 if (contextIter != m_outputContextLabel.end()) {
339 return(contextIter->second);
340 }
341 const unsigned int id = m_persistencySvcVec.size();
342 m_persistencySvcVec.push_back(pool::IPersistencySvc::create(*m_catalog).release());
343 m_pers_mut.push_back(new CallMutex);
344 pool::DatabaseConnectionPolicy policy;
347 if (m_fileOpen.value() == "update") {
349 }
350 m_persistencySvcVec[id]->session().setDefaultConnectionPolicy(policy);
351 if (!m_persistencySvcVec[id]->session().technologySpecificAttributes(pool::ROOT_StorageType.type()).setAttribute<int>("DEFAULT_CONTAINER_TYPE", pool::DbType::getType(m_defaultROOTContainerType).type())) {
352 ATH_MSG_WARNING("Failed to set ROOT default container type via PersistencySvc for id " << id);
354 }
355 m_outputContextLabel.insert(std::pair<std::string, unsigned int>(label, id));
356 return(id);
357}
Gaudi::Property< std::string > m_defaultROOTContainerType
Default ROOT container type.
Definition PoolSvc.h:268
Gaudi::Property< std::string > m_fileOpen
FileOpen, the open mode for the file ("append" or "overwrite").
Definition PoolSvc.h:238
bool setWriteModeForExisting(Mode mode)
Sets the opening mode when an existing database is opened for writing.
bool setWriteModeForNonExisting(Mode mode)
Sets the opening mode when a non existing database is opened for writing Acceptable values are RAISE_...
static DbType getType(const std::string &name)
Access known storage type object by name.

◆ getToken()

Token * PoolSvc::getToken ( const std::string & connection,
const std::string & collection,
const unsigned long ientry ) const
overridevirtual
Returns
a token for a container entry.
Parameters
connection[IN] string containing the connection/file name.
collection[IN] string containing the persistent name of the collection.
ientry[IN] entry number for the token to be returned

Definition at line 569 of file PoolSvc.cxx.

571 {
572 std::lock_guard<CallMutex> lock(*m_pers_mut[IPoolSvc::kInputStream]);
573 std::unique_ptr<pool::IDatabase> dbH = getDbHandle(IPoolSvc::kInputStream, connection);
574 if (dbH == nullptr) {
575 return(nullptr);
576 }
577 if (dbH->openMode() == pool::IDatabase::CLOSED) {
578 dbH->connectForRead();
579 }
580 std::unique_ptr<pool::IContainer> contH = getContainerHandle(dbH.get(), collection);
581 if (contH == nullptr) {
582 return(nullptr);
583 }
584 pool::ITokenIterator* tokenIter = contH->tokens();
585 Token* thisToken = tokenIter->next();
586 for (unsigned long ipos = 0; ipos < ientry; ipos++) {
587 delete thisToken; thisToken = tokenIter->next();
588 }
589 delete tokenIter; tokenIter = nullptr;
590 return(thisToken);
591}
virtual Token * next()=0
Returns the pointer to next token.

◆ initialize()

StatusCode PoolSvc::initialize ( )
overridevirtual

Required of all Gaudi services:

Definition at line 57 of file PoolSvc.cxx.

57 {
58 ATH_CHECK(::AthService::initialize());
59
60 // Register this service for 'I/O' events
61 ServiceHandle<IIoComponentMgr> iomgr("IoComponentMgr", name());
62 ATH_CHECK(iomgr.retrieve());
63 ATH_CHECK(iomgr->io_register(this));
64 // Register input file's names with the I/O manager, unless in SharedWrite mode, set by AthenaPoolCnvSvc
65 bool allGood = true;
66 for (const auto& catalog : m_readCatalog.value()) {
67 if (catalog.starts_with("xmlcatalog_file:")) {
68 const std::string fileName = catalog.substr(16);
69 if (!iomgr->io_register(this, IIoComponentMgr::IoMode::READ, fileName, fileName).isSuccess()) {
70 ATH_MSG_FATAL("could not register [" << catalog << "] for input !");
71 allGood = false;
72 } else {
73 ATH_MSG_INFO("io_register[" << this->name() << "](" << catalog << ") [ok]");
74 }
75 }
76 }
77 if (m_writeCatalog.value().starts_with("xmlcatalog_file:")) {
78 const std::string fileName = m_writeCatalog.value().substr(16);
79 if (!iomgr->io_register(this, IIoComponentMgr::IoMode::WRITE, fileName, fileName).isSuccess()) {
80 ATH_MSG_FATAL("could not register [" << m_writeCatalog.value() << "] for input !");
81 allGood = false;
82 } else {
83 ATH_MSG_INFO("io_register[" << this->name() << "](" << m_writeCatalog.value() << ") [ok]");
84 }
85 }
86 if (!allGood) {
87 return(StatusCode::FAILURE);
88 }
89 m_context = &coral::Context::instance();
90 if (m_context == nullptr) {
91 ATH_MSG_FATAL("Failed to access CORAL Context");
92 return(StatusCode::FAILURE);
93 }
94 coral::ConnectionService conSvcH;
95 coral::IConnectionServiceConfiguration& csConfig = conSvcH.configuration();
96 csConfig.setConnectionRetrialPeriod(m_retrialPeriod);
97 csConfig.setConnectionRetrialTimeOut(m_retrialTimeOut);
98 if (m_connClean) {
99 csConfig.enablePoolAutomaticCleanUp();
100 csConfig.setConnectionTimeOut(m_timeOut);
101 } else {
102 csConfig.disablePoolAutomaticCleanUp();
103 csConfig.setConnectionTimeOut(0);
104 }
105 ATH_MSG_INFO("Set connectionsvc retry/timeout/IDLE timeout to "
107 << "/"
109 << "/"
110 << m_timeOut
111 << " seconds with connection cleanup "
112 << (csConfig.isPoolAutomaticCleanUpEnabled() ? "enabled" : "disabled"));
113 // set Frontier web cache compression level
114 coral::IWebCacheControl& webCache = conSvcH.webCacheControl();
115 webCache.setCompressionLevel(m_frontierComp);
116 ATH_MSG_INFO("Frontier compression level set to " << webCache.compressionLevel());
117 if (m_sortReplicas) {
118 // set replica sorter - get service
119 ServiceHandle<IDBReplicaSvc> replicasvc("DBReplicaSvc", name());
120 if (replicasvc.retrieve().isSuccess()) {
121 csConfig.setReplicaSortingAlgorithm(*replicasvc);
122 ATH_MSG_INFO("Successfully setup replica sorting algorithm");
123 } else {
124 ATH_MSG_WARNING("Cannot setup replica sorting algorithm");
125 }
126 }
127 MSG::Level athLvl = msg().level();
128 ATH_MSG_DEBUG("OutputLevel is " << (int)athLvl);
130 return(setupPersistencySvc());
131}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_FATAL(x)
Gaudi::Property< int > m_retrialTimeOut
ConnectionRetrialTimeOut, the retrial time out for CORAL Connection Service: default = 300 seconds.
Definition PoolSvc.h:257
Gaudi::Property< int > m_timeOut
ConnectionTimeOut, the time out for CORAL Connection Service: default = 5 seconds.
Definition PoolSvc.h:259
Gaudi::Property< int > m_retrialPeriod
ConnectionRetrialPeriod, retry period for CORAL Connection Service: default = 30 seconds.
Definition PoolSvc.h:255
Gaudi::Property< bool > m_sortReplicas
Use DBReplicaSvc to sort database connections, default = true.
Definition PoolSvc.h:266
Gaudi::Property< bool > m_connClean
ConnectionCleanUp - whether to use CORAL connection management thread: default = false.
Definition PoolSvc.h:261
Gaudi::Property< int > m_frontierComp
Frontier proprties, compression level and list of schemas to be refreshed: default = 5.
Definition PoolSvc.h:263
StatusCode setupPersistencySvc()
Definition PoolSvc.cxx:175
bool allGood
Loop over the SDOs & Digits.
static void setLevel(MSG::Level l)
Definition DbPrint.h:20
MsgStream & msg
Definition testRead.cxx:32

◆ io_finalize()

StatusCode PoolSvc::io_finalize ( )
overridevirtual

Definition at line 264 of file PoolSvc.cxx.

264 {
265 ATH_MSG_INFO("I/O finalization...");
266 for (size_t i = 0; i < m_persistencySvcVec.size(); i++) {
267 if (m_persistencySvcVec[i]->session().defaultConnectionPolicy().writeModeForNonExisting() != pool::DatabaseConnectionPolicy::RAISE_ERROR &&
268 !disconnect(i).isSuccess()) {
269 ATH_MSG_WARNING("Cannot disconnect output Stream " << i);
270 }
271 }
272 clearState();
273 return(StatusCode::SUCCESS);
274}
virtual StatusCode disconnect(unsigned int contextId=IPoolSvc::kInputStream) const override
Disconnect PersistencySvc associated with a contextId.
Definition PoolSvc.cxx:658

◆ io_reinit()

StatusCode PoolSvc::io_reinit ( )
overridevirtual

Definition at line 134 of file PoolSvc.cxx.

134 {
135 ATH_MSG_INFO("I/O reinitialization...");
136 ServiceHandle<IIoComponentMgr> iomgr("IoComponentMgr", name());
137 if (!iomgr.retrieve().isSuccess()) {
138 ATH_MSG_FATAL("Could not retrieve IoComponentMgr !");
139 return(StatusCode::FAILURE);
140 }
141 if (!iomgr->io_hasitem(this)) {
142 ATH_MSG_FATAL("IoComponentMgr does not know about myself !");
143 return(StatusCode::FAILURE);
144 }
145 std::vector<std::string> readcat = m_readCatalog.value();
146 for (std::size_t icat = 0, imax = readcat.size(); icat < imax; icat++) {
147 if (readcat[icat].compare(0, 16, "xmlcatalog_file:") == 0) {
148 std::string fileName = readcat[icat].substr(16);
149 if (iomgr->io_contains(this, fileName)) {
150 if (!iomgr->io_retrieve(this, fileName).isSuccess()) {
151 ATH_MSG_FATAL("Could not retrieve new value for [" << fileName << "] !");
152 return(StatusCode::FAILURE);
153 }
154 readcat[icat] = "xmlcatalog_file:" + fileName;
155 }
156 }
157 }
158 // all good... copy over.
159 m_readCatalog = readcat;
160 if (m_writeCatalog.value().compare(0, 16, "xmlcatalog_file:") == 0) {
161 std::string fileName = m_writeCatalog.value().substr(16);
162 if (iomgr->io_contains(this, fileName)) {
163 if (!iomgr->io_retrieve(this, fileName).isSuccess()) {
164 ATH_MSG_FATAL("Could not retrieve new value for [" << fileName << "] !");
165 return(StatusCode::FAILURE);
166 }
167 if (!m_shareCat) {
168 m_writeCatalog.setValue("xmlcatalog_file:" + fileName);
169 }
170 }
171 }
172 return(setupPersistencySvc());
173}
int imax(int i, int j)
bool m_shareCat
Definition PoolSvc.h:225
std::pair< int, int > compare(const AmgSymMatrix(N) &m1, const AmgSymMatrix(N) &m2, double precision=1e-9, bool relative=false)
compare two matrices, returns the indices of the first element that fails the condition,...

◆ loadComponent()

void PoolSvc::loadComponent ( const std::string & compName)
overridevirtual
Returns
void
Parameters
compName[IN] string name of the component to be loaded.

Definition at line 398 of file PoolSvc.cxx.

398 {
399 m_context->loadComponent(compName);
400}

◆ lookupBestPfn()

void PoolSvc::lookupBestPfn ( const std::string & token,
std::string & pfn,
std::string & type ) const
overridevirtual
Returns
void
Parameters
token[IN] filename/token string to be translated
pfn[OUT] string PFN of database
type[OUT] string filetype of database

Definition at line 410 of file PoolSvc.cxx.

410 {
411 std::string dbID;
412 if (token.compare(0, 4, "PFN:") == 0) {
413 m_catalog->lookupFileByPFN(token.substr(4), dbID, type); // PFN -> FID
414 } else if (token.compare(0, 4, "LFN:") == 0) {
415 m_catalog->lookupFileByLFN(token.substr(4), dbID); // LFN -> FID
416 } else if (token.compare(0, 4, "FID:") == 0) {
417 dbID = token.substr(4);
418 } else if (token.size() > Guid::stringSize()) { // full token
419 Token tok;
420 tok.fromString(token);
421 dbID = tok.dbID().toString();
422 } else { // guid only
423 dbID = token;
424 }
425 m_catalog->getFirstPFN(dbID, pfn, type); // FID -> best PFN
426}
constexpr void toString(std::span< char, StrLen > buf, bool uppercase=true) const noexcept
Automatic conversion to string representation.
static constexpr int stringSize()
Definition Guid.h:61
Token & fromString(const std::string_view from)
Build from the string representation of a token.
Definition Token.cxx:147
const Guid & dbID() const
Access database identifier.
Definition Token.h:64

◆ patchCatalog()

void PoolSvc::patchCatalog ( const std::string & pfn,
pool::IDatabase & dbH ) const
private

Definition at line 561 of file PoolSvc.cxx.

561 {
562 std::scoped_lock lock(m_pool_mut);
564 std::string fid = dbH.fid();
565 pool::IFileCatalog* catalog_locked ATLAS_THREAD_SAFE = m_catalog;
566 catalog_locked->registerPFN(pfn, "ROOT_All", fid);
567}
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.

◆ poolCondPath()

std::string PoolSvc::poolCondPath ( const std::string & leaf)
private

Resolve a file using ATLAS_POOLCOND_PATH.

Definition at line 1032 of file PoolSvc.cxx.

1032 {
1033 // look for files at $ATLAS_POOLCOND_PATH/<leaf>
1034 // return full filename if exists, or empty string if not
1035 const char* cpath = std::getenv("ATLAS_POOLCOND_PATH");
1036 if (cpath && strcmp(cpath, "") != 0) {
1037 const std::string testpath = std::string(cpath) + "/" + leaf;
1038
1039 // Try to open file for reading. Note that a simple stat call may return
1040 // a wrong result if the file is residing on an auto-mounted FS (ATR-28801).
1041 if (FILE* fp = std::fopen(testpath.c_str(), "r")) {
1042 std::fclose(fp);
1043 return testpath;
1044 }
1045 }
1046 return {};
1047}

◆ registerForWrite()

Token * PoolSvc::registerForWrite ( const Placement * placement,
const void * obj,
const RootType & classDesc )
overridevirtual
Returns
a token to a Data Object written to Pool.
Parameters
placement[IN] pointer to the placement hint.
obj[IN] pointer to the Data Object to be written to Pool.
classDesc[IN] pointer to the Seal class description for the Data Object.

Definition at line 276 of file PoolSvc.cxx.

278 {
279 unsigned int contextId = IPoolSvc::kOutputStream;
280 const std::string& auxString = placement->auxString();
281 if (!auxString.empty()) {
282 if (auxString.compare(0, 6, "[CTXT=") == 0) {
283 ::sscanf(auxString.c_str(), "[CTXT=%08X]", &contextId);
284 } else if (auxString.compare(0, 8, "[CLABEL=") == 0) {
285 contextId = this->getOutputContext(auxString);
286 }
287 if (contextId >= m_persistencySvcVec.size()) {
288 ATH_MSG_WARNING("registerForWrite: Using default output Stream instead of id = " << contextId);
289 contextId = IPoolSvc::kOutputStream;
290 }
291 }
292 std::lock_guard<CallMutex> lock(*m_pers_mut[contextId]);
293 Token* token = m_persistencySvcVec[contextId]->registerForWrite(*placement, obj, classDesc);
294 if (token == nullptr) {
295 ATH_MSG_WARNING("Cannot write object: " << placement->containerName());
296 }
297 return(token);
298}
const std::string & auxString() const
Access auxiliary string.
Definition Placement.h:40
const std::string & containerName() const
Access container name.
Definition Placement.h:32
virtual unsigned int getOutputContext(const std::string &label) override
Definition PoolSvc.cxx:328

◆ renamePfn()

void PoolSvc::renamePfn ( const std::string & pf,
const std::string & newpf )
overridevirtual
Returns
void
Parameters
pf[IN] filename to be renamed
newpf[IN] new filename

Definition at line 428 of file PoolSvc.cxx.

428 {
429 std::string dbID, type;
430 m_catalog->lookupFileByPFN(pf, dbID, type);
431 if (dbID.empty()) {
432 ATH_MSG_WARNING("Failed to lookup: " << pf << " in FileCatalog");
433 return;
434 }
435 m_catalog->lookupFileByPFN(newpf, dbID, type);
436 if (!dbID.empty()) {
437 ATH_MSG_INFO("Found: " << newpf << " in FileCatalog");
438 return;
439 }
440 m_catalog->renamePFN(pf, newpf);
441}

◆ setAttribute() [1/2]

StatusCode PoolSvc::setAttribute ( const std::string & optName,
const std::string & data,
long tech,
const std::string & dbName,
const std::string & contName = "",
unsigned int contextId = IPoolSvc::kOutputStream ) const
overridevirtual

Set POOL attributes - db/file, container/collection.

Definition at line 814 of file PoolSvc.cxx.

819 {
820 if (contextId >= m_persistencySvcVec.size()) {
821 ATH_MSG_WARNING("setAttribute: Using default output Stream instead of id = " << contextId);
822 contextId = IPoolSvc::kOutputStream;
823 }
824 ContextLock lock(contextId, m_pool_mut, m_pers_mut);
825 std::unique_ptr<pool::IDatabase> dbH = getDbHandle(contextId, dbName);
826 if (dbH == nullptr) {
827 ATH_MSG_DEBUG("Failed to get Session/DatabaseHandle to set POOL property.");
828 return(StatusCode::FAILURE);
829 }
830 if (dbH->openMode() == pool::IDatabase::CLOSED) {
831 if (m_persistencySvcVec[contextId]->session().defaultConnectionPolicy().writeModeForNonExisting() != pool::DatabaseConnectionPolicy::RAISE_ERROR) {
832 dbH->setTechnology(tech);
833 dbH->connectForWrite();
834 } else {
835 dbH->connectForRead();
836 }
837 }
838 bool retError = false;
839 std::string objName;
840 bool hasTTreeName = (contName.length() > 6 && contName.compare(0, 6, "TTree=") == 0);
841 if (contName.empty() || hasTTreeName || m_persistencySvcVec[contextId]->session().defaultConnectionPolicy().writeModeForNonExisting() == pool::DatabaseConnectionPolicy::RAISE_ERROR) {
842 objName = hasTTreeName ? contName.substr(6) : contName;
843 if( !isNumber(data) ) {
844 retError = dbH->technologySpecificAttributes().setAttribute(optName, data.c_str(), objName);
845 } else if( data[data.size() - 1] == 'L' ) {
846 retError = dbH->technologySpecificAttributes().setAttribute<long long int>(optName, atoll(data.c_str()), objName);
847 } else {
848 retError = dbH->technologySpecificAttributes().setAttribute<int>(optName, atoi(data.c_str()), objName);
849 }
850 if (!retError) {
851 ATH_MSG_DEBUG("Failed to set POOL property, " << optName << " to " << data);
852 return(StatusCode::FAILURE);
853 }
854 } else {
855 std::unique_ptr<pool::IContainer> contH = getContainerHandle(dbH.get(), contName);
856 if (contH == nullptr) {
857 ATH_MSG_DEBUG("Failed to get ContainerHandle to set POOL property.");
858 return(StatusCode::FAILURE);
859 }
860 if (auto p = contName.find('('); p != std::string::npos) {
861 objName = contName.substr(p + 1); // Get BranchName between parenthesis
862 objName.erase(objName.find(')'));
863 } else if (auto p = contName.find("::"); p != std::string::npos) {
864 objName = contName.substr(p + 2); // Split off Tree name
865 } else if (auto p = contName.find('_'); p != std::string::npos) {
866 objName = contName.substr(p + 1); // Split off "POOLContainer"
867 objName.erase(objName.find('/')); // Split off key
868 }
869 std::string::size_type off = 0;
870 while ((off = objName.find_first_of("<>/")) != std::string::npos) {
871 objName[off] = '_'; // Replace special chars (e.g. templates)
872 }
873 if (data[data.size() - 1] == 'L') {
874 retError = contH->technologySpecificAttributes().setAttribute<long long int>(optName, atoll(data.c_str()), objName);
875 } else {
876 retError = contH->technologySpecificAttributes().setAttribute<int>(optName, atoi(data.c_str()), objName);
877 }
878 if (!retError) {
879 ATH_MSG_DEBUG("Failed to set POOL container property, " << optName << " for " << contName << " : " << objName << " to " << data);
880 return(StatusCode::FAILURE);
881 }
882 }
883 return(StatusCode::SUCCESS);
884}
bool isNumber(const std::string &s)
Definition PoolSvc.cxx:52
int atoi(std::string_view str)
Helper functions to unpack numbers decoded in string into integers and doubles The strings are requir...

◆ setAttribute() [2/2]

StatusCode PoolSvc::setAttribute ( const std::string & optName,
const std::string & data,
long tech,
unsigned int contextId = IPoolSvc::kOutputStream ) const
overridevirtual

Set POOL attributes - domain.

Definition at line 790 of file PoolSvc.cxx.

793 {
794 if (contextId >= m_persistencySvcVec.size()) {
795 ATH_MSG_WARNING("setAttribute: Using default output Stream instead of id = " << contextId);
796 contextId = IPoolSvc::kOutputStream;
797 }
798 ContextLock lock(contextId, m_pool_mut, m_pers_mut);
799 pool::ISession& sesH = m_persistencySvcVec[contextId]->session();
800 if (data[data.size() - 1] == 'L') {
801 if (!sesH.technologySpecificAttributes(tech).setAttribute<long long int>(optName, atoll(data.c_str()))) {
802 ATH_MSG_DEBUG("Failed to set POOL property, " << optName << " to " << data);
803 return(StatusCode::FAILURE);
804 }
805 } else {
806 if (!sesH.technologySpecificAttributes(tech).setAttribute<int>(optName, atoi(data.c_str()))) {
807 ATH_MSG_DEBUG("Failed to set POOL property, " << optName << " to " << data);
808 return(StatusCode::FAILURE);
809 }
810 }
811 return(StatusCode::SUCCESS);
812}
bool setAttribute(const std::string &attributeName, const T &atttibuteValue, const std::string &option="")
Templated method to set an attribute.

◆ setFrontierCache()

StatusCode PoolSvc::setFrontierCache ( const std::string & conn)
overridevirtual

Setup Frontier cache for given logical or physical connection name.

Definition at line 886 of file PoolSvc.cxx.

886 {
887 std::lock_guard<CallMutex> lock(m_pool_mut);
888 ATH_MSG_VERBOSE("setFrontierCache called for connection:" << conn);
889 // setup the Frontier cache information for the given logical or physical connection string
890 // first determine if the connection is logical (no ':')
891 std::vector<std::string> physcons;
892 if (conn.find(':') == std::string::npos) {
893 // if logical, have to lookup list of physical replicas, and consider each
894 // need the CORAL ILookupSvc interface which must be loaded if needed
895 const std::string lookSvcStr("CORAL/Services/XMLLookupService");
896 coral::IHandle<coral::ILookupService> lookSvcH = m_context->query<coral::ILookupService>();
897 if (!lookSvcH.isValid()) {
898 m_context->loadComponent(lookSvcStr);
899 lookSvcH = m_context->query<coral::ILookupService>();
900 }
901 if (!lookSvcH.isValid()) {
902 ATH_MSG_ERROR("Cannot locate " << lookSvcStr);
903 return(StatusCode::FAILURE);
904 }
905 coral::IDatabaseServiceSet* dbset = lookSvcH->lookup(conn, coral::ReadOnly);
906 if (dbset != nullptr) {
907 for (int irep = 0, nrep = dbset->numberOfReplicas(); irep < nrep; ++irep) {
908 const std::string pcon = dbset->replica(irep).connectionString();
909 if (pcon.compare(0, 9, "frontier:") == 0) {
910 physcons.push_back(std::move(pcon));
911 }
912 }
913 delete dbset; dbset = nullptr;
914 } else {
915 ATH_MSG_DEBUG("setFrontierCache: Could not find any replicas for " << conn);
916 }
917 } else if (conn.compare(0, 9, "frontier:") == 0) {
918 physcons.push_back(conn);
919 }
920 // check if any replicas will try and use frontier
921 if (physcons.size() == 0) {
922 return(StatusCode::SUCCESS);
923 }
924 coral::ConnectionService conSvcH;
925 // for each frontier replica, define the web cache info
926 // get the WebCacheControl interface via ConnectionSvc
927 // note ConnectionSvc should already be loaded by initialize
928 coral::IWebCacheControl& webCache = conSvcH.webCacheControl();
929 for (const auto& physcon : physcons) {
930 const auto& refreshList = m_frontierRefresh.value();
931 if (std::find(refreshList.begin(), refreshList.end(), physcon) == refreshList.end()
932 && std::find(refreshList.begin(), refreshList.end(), conn) == refreshList.end()) {
933 // set that a table DUMMYTABLE should be refreshed - indicates that everything
934 // else in the schema should not be
935 webCache.refreshTable(physcon, "DUMMYTABLE");
936 } else {
937 // set the schema to be refreshed
938 webCache.refreshSchemaInfo(physcon);
939 }
940 ATH_MSG_DEBUG("Cache flag for connection " << physcon << " set to " << webCache.webCacheInfo(physcon).isSchemaInfoCached());
941 }
942 return(StatusCode::SUCCESS);
943}
#define ATH_MSG_VERBOSE(x)
Gaudi::Property< std::vector< std::string > > m_frontierRefresh
Definition PoolSvc.h:264

◆ setObjPtr()

void PoolSvc::setObjPtr ( void *& obj,
const Token * token )
overridevirtual
Returns
void
Parameters
obj[OUT] pointer to the Data Object.
token[IN] token of the Data Object for which a Pool Ref is filled.

Definition at line 300 of file PoolSvc.cxx.

300 {
301 unsigned int contextId = IPoolSvc::kInputStream;
302 const std::string& auxString = token->auxString();
303 if (!auxString.empty()) {
304 if (auxString.compare(0, 6, "[CTXT=") == 0) {
305 ::sscanf(auxString.c_str(), "[CTXT=%08X]", &contextId);
306 } else if (auxString.compare(0, 8, "[CLABEL=") == 0) {
307 contextId = this->getInputContext(auxString);
308 }
309 if (contextId >= m_persistencySvcVec.size()) {
310 ATH_MSG_WARNING("setObjPtr: Using default input Stream instead of id = " << contextId);
311 contextId = IPoolSvc::kInputStream;
312 }
313 }
314 ATH_MSG_VERBOSE("setObjPtr: token=" << token->toString() << ", auxString=" << auxString << ", contextID=" << contextId);
315 // Get Context ID/label from Token
316 std::lock_guard<CallMutex> lock(*m_pers_mut[contextId]);
317 obj = m_persistencySvcVec[contextId]->readObject(*token, obj);
318 std::map<unsigned int, unsigned int>::const_iterator maxFileIter = m_contextMaxFile.find(contextId);
319 if (maxFileIter != m_contextMaxFile.end() && maxFileIter->second > 0) {
320 m_guidLists[contextId].remove(token->dbID());
321 m_guidLists[contextId].push_back(token->dbID());
322 while (m_guidLists[contextId].size() > maxFileIter->second) {
323 this->disconnectDb("FID:" + m_guidLists[contextId].begin()->toString(), contextId).ignore();
324 }
325 }
326}
const std::string & auxString() const
Access auxiliary string.
Definition Token.h:91
virtual const std::string toString() const
Retrieve the string representation of the token.
Definition Token.cxx:134

◆ setShareMode()

void PoolSvc::setShareMode ( bool shareCat)
overridevirtual
Returns
void
Parameters
shareCat[IN] bool to share the file catalog.

Definition at line 402 of file PoolSvc.cxx.

402 {
403 m_shareCat = shareCat;
404}

◆ setupPersistencySvc()

StatusCode PoolSvc::setupPersistencySvc ( )
private

Definition at line 175 of file PoolSvc.cxx.

175 {
176 clearState();
177 ATH_MSG_INFO("Setting up APR FileCatalog and Streams");
179 if (m_catalog != nullptr) {
180 m_catalog->start();
181 } else {
182 ATH_MSG_FATAL("Failed to setup POOL File Catalog.");
183 return(StatusCode::FAILURE);
184 }
185 // Setup a persistency services
186 m_persistencySvcVec.push_back(pool::IPersistencySvc::create(*m_catalog).release()); // Read Service
187 m_pers_mut.push_back(new CallMutex);
188 if (!m_persistencySvcVec[IPoolSvc::kInputStream]->session().technologySpecificAttributes(pool::ROOT_StorageType.type()).setAttribute<bool>("ENABLE_THREADSAFETY", true)) {
189 ATH_MSG_FATAL("Failed to enable thread safety in ROOT via PersistencySvc.");
190 return(StatusCode::FAILURE);
191 }
192 m_contextMaxFile.insert(std::pair<unsigned int, int>(IPoolSvc::kInputStream, m_dbAgeLimit));
194 ATH_MSG_FATAL("Failed to connect Input PersistencySvc.");
195 return(StatusCode::FAILURE);
196 }
197 m_persistencySvcVec.push_back(pool::IPersistencySvc::create(*m_catalog).release()); // Write Service
198 m_pers_mut.push_back(new CallMutex);
199 pool::DatabaseConnectionPolicy policy;
202 if (m_fileOpen.value() == "update") {
204 }
205 m_persistencySvcVec[IPoolSvc::kOutputStream]->session().setDefaultConnectionPolicy(policy);
206 if (!m_persistencySvcVec[IPoolSvc::kOutputStream]->session().technologySpecificAttributes(pool::ROOT_StorageType.type()).setAttribute<int>("DEFAULT_CONTAINER_TYPE", pool::DbType::getType(m_defaultROOTContainerType).type())) {
207 ATH_MSG_FATAL("Failed to set ROOT default container type via PersistencySvc.");
208 return(StatusCode::FAILURE);
209 }
210
211 return(StatusCode::SUCCESS);
212}
pool::IFileCatalog * createCatalog()
Definition PoolSvc.cxx:945
Gaudi::Property< int > m_dbAgeLimit
MaxFilesOpen, option to have PoolSvc limit the number of open Input Files: default = 0 (No files are ...
Definition PoolSvc.h:241

◆ start()

StatusCode PoolSvc::start ( )
overridevirtual

Required of all Gaudi services:

Definition at line 214 of file PoolSvc.cxx.

214 {
215 // Switiching on ROOT implicit multi threading for AthenaMT
216 if (m_useROOTIMT && Gaudi::Concurrency::ConcurrencyFlags::numThreads() > 1) {
217 if (!m_persistencySvcVec[IPoolSvc::kInputStream]->session().technologySpecificAttributes(pool::ROOT_StorageType.type()).setAttribute<int>("ENABLE_IMPLICITMT", Gaudi::Concurrency::ConcurrencyFlags::numThreads() - 1)) {
218 ATH_MSG_FATAL("Failed to enable implicit multithreading in ROOT via PersistencySvc.");
219 return(StatusCode::FAILURE);
220 }
221 ATH_MSG_INFO("Enabled implicit multithreading in ROOT via PersistencySvc to: " << Gaudi::Concurrency::ConcurrencyFlags::numThreads() - 1);
222 }
223 return(StatusCode::SUCCESS);
224}
Gaudi::Property< bool > m_useROOTIMT
Use ROOT Implicit MultiThreading, default = true.
Definition PoolSvc.h:248

◆ stop()

StatusCode PoolSvc::stop ( )
overridevirtual

Definition at line 226 of file PoolSvc.cxx.

226 {
227 ATH_MSG_VERBOSE("stop()");
228 bool retError = false;
229 for (unsigned int contextId = 0, imax = m_persistencySvcVec.size(); contextId < imax; contextId++) {
230 if (!disconnect(contextId).isSuccess()) {
231 ATH_MSG_FATAL("Cannot disconnect Stream: " << contextId);
232 retError = true;
233 }
234 }
235 return(retError ? StatusCode::FAILURE : StatusCode::SUCCESS);
236}

Member Data Documentation

◆ ATLAS_THREAD_SAFE

std::map<unsigned int, std::list<Guid> > m_guidLists PoolSvc::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 234 of file PoolSvc.h.

◆ m_attemptCatalogPatch

Gaudi::Property<bool> PoolSvc::m_attemptCatalogPatch {this,"AttemptCatalogPatch",true}
private

AttemptCatalogPatch, option to create catalog: default = false.

Definition at line 253 of file PoolSvc.h.

253{this,"AttemptCatalogPatch",true};

◆ m_catalog

pool::IFileCatalog* PoolSvc::m_catalog {nullptr}
private

Definition at line 226 of file PoolSvc.h.

226{nullptr};

◆ m_connClean

Gaudi::Property<bool> PoolSvc::m_connClean {this,"ConnectionCleanUp",false}
private

ConnectionCleanUp - whether to use CORAL connection management thread: default = false.

Definition at line 261 of file PoolSvc.h.

261{this,"ConnectionCleanUp",false};

◆ m_context

coral::Context* PoolSvc::m_context {nullptr}
private

Definition at line 224 of file PoolSvc.h.

224{nullptr};

◆ m_contextMaxFile

std::map<unsigned int, unsigned int> PoolSvc::m_contextMaxFile
private

Definition at line 232 of file PoolSvc.h.

◆ m_dbAgeLimit

Gaudi::Property<int> PoolSvc::m_dbAgeLimit {this,"MaxFilesOpen",0}
private

MaxFilesOpen, option to have PoolSvc limit the number of open Input Files: default = 0 (No files are closed automatically)

Definition at line 241 of file PoolSvc.h.

241{this,"MaxFilesOpen",0};

◆ m_defaultROOTContainerType

Gaudi::Property<std::string> PoolSvc::m_defaultROOTContainerType {this, "DefaultContainerType", "ROOTTREEINDEX"}
private

Default ROOT container type.

Definition at line 268 of file PoolSvc.h.

268{this, "DefaultContainerType", "ROOTTREEINDEX"};

◆ m_fileOpen

Gaudi::Property<std::string> PoolSvc::m_fileOpen {this,"FileOpen","overwrite"}
private

FileOpen, the open mode for the file ("append" or "overwrite").

Definition at line 238 of file PoolSvc.h.

238{this,"FileOpen","overwrite"};

◆ m_frontierComp

Gaudi::Property<int> PoolSvc::m_frontierComp {this,"FrontierCompression",5}
private

Frontier proprties, compression level and list of schemas to be refreshed: default = 5.

Definition at line 263 of file PoolSvc.h.

263{this,"FrontierCompression",5};

◆ m_frontierRefresh

Gaudi::Property<std::vector<std::string> > PoolSvc::m_frontierRefresh {this,"FrontierRefreshSchema",{}}
private

Definition at line 264 of file PoolSvc.h.

264{this,"FrontierRefreshSchema",{}};

◆ m_inputContextLabel

std::map<std::string, unsigned int> PoolSvc::m_inputContextLabel
private

Definition at line 229 of file PoolSvc.h.

◆ m_mainOutputLabel

std::string PoolSvc::m_mainOutputLabel {}
private

Definition at line 231 of file PoolSvc.h.

231{};

◆ m_outputContextLabel

std::map<std::string, unsigned int> PoolSvc::m_outputContextLabel
private

Definition at line 230 of file PoolSvc.h.

◆ m_pers_mut

std::vector<CallMutex*> PoolSvc::m_pers_mut
private

Definition at line 228 of file PoolSvc.h.

◆ m_persistencySvcVec

std::vector<pool::IPersistencySvc*> PoolSvc::m_persistencySvcVec
private

Definition at line 227 of file PoolSvc.h.

◆ m_pool_mut

CallMutex PoolSvc::m_pool_mut
mutableprivate

Definition at line 223 of file PoolSvc.h.

◆ m_readCatalog

Gaudi::Property<std::vector<std::string> > PoolSvc::m_readCatalog {this,"ReadCatalog",{},"List of catalog files to read from","OrderedSet<std::string>"}
private

ReadCatalog, the list of additional POOL input file catalogs to consult: default = empty vector.

Definition at line 246 of file PoolSvc.h.

246{this,"ReadCatalog",{},"List of catalog files to read from","OrderedSet<std::string>"};

◆ m_retrialPeriod

Gaudi::Property<int> PoolSvc::m_retrialPeriod {this,"ConnectionRetrialPeriod",300}
private

ConnectionRetrialPeriod, retry period for CORAL Connection Service: default = 30 seconds.

Definition at line 255 of file PoolSvc.h.

255{this,"ConnectionRetrialPeriod",300};

◆ m_retrialTimeOut

Gaudi::Property<int> PoolSvc::m_retrialTimeOut {this,"ConnectionRetrialTimeOut",3600}
private

ConnectionRetrialTimeOut, the retrial time out for CORAL Connection Service: default = 300 seconds.

Definition at line 257 of file PoolSvc.h.

257{this,"ConnectionRetrialTimeOut",3600};

◆ m_shareCat

bool PoolSvc::m_shareCat {false}
private

Definition at line 225 of file PoolSvc.h.

225{false};

◆ m_sortReplicas

Gaudi::Property<bool> PoolSvc::m_sortReplicas {this,"SortReplicas",true}
private

Use DBReplicaSvc to sort database connections, default = true.

Definition at line 266 of file PoolSvc.h.

266{this,"SortReplicas",true};

◆ m_timeOut

Gaudi::Property<int> PoolSvc::m_timeOut {this,"ConnectionTimeOut",5}
private

ConnectionTimeOut, the time out for CORAL Connection Service: default = 5 seconds.

Definition at line 259 of file PoolSvc.h.

259{this,"ConnectionTimeOut",5};

◆ m_useROOTIMT

Gaudi::Property<bool> PoolSvc::m_useROOTIMT {this,"UseROOTImplicitMT",true}
private

Use ROOT Implicit MultiThreading, default = true.

Definition at line 248 of file PoolSvc.h.

248{this,"UseROOTImplicitMT",true};

◆ m_useROOTMaxTree

Gaudi::Property<bool> PoolSvc::m_useROOTMaxTree {this,"UseROOTIncreaseVMaxTree",false}
private

Increase virtual TTree size to avoid backreads in multithreading, default = false.

Definition at line 250 of file PoolSvc.h.

250{this,"UseROOTIncreaseVMaxTree",false};

◆ m_writeCatalog

Gaudi::Property<std::string> PoolSvc::m_writeCatalog {this,"WriteCatalog","xmlcatalog_file:PoolFileCatalog.xml"}
private

WriteCatalog, the file catalog to be used to register output files (also default input catalog): default = "" (use POOL default).

Definition at line 244 of file PoolSvc.h.

244{this,"WriteCatalog","xmlcatalog_file:PoolFileCatalog.xml"};

The documentation for this class was generated from the following files: