14#include "GaudiKernel/IIoComponent.h"
37class PoolSvc :
public extends<AthService, IPoolSvc, IIoComponent> {
44 virtual StatusCode
start()
override;
45 virtual StatusCode
stop()
override;
47 virtual StatusCode
finalize()
override;
75 unsigned int maxFile = 0)
override;
107 void lookupBestPfn(
const std::string& token, std::string& pfn, std::string&
type)
const override;
113 void renamePfn(
const std::string& pf,
const std::string& newpf)
override;
122 const std::string& collectionName,
132 unsigned int contextId,
133 bool noContainer)
const override;
141 const std::string& collection,
142 const unsigned long ientry)
const override;
183 const std::string& dbName,
184 const std::string& contName =
"",
190 const std::string& data,
197 const std::string& data,
199 const std::string& dbName,
200 const std::string& contName =
"",
204 using base_class::base_class;
217 std::lock_guard<CallMutex> temp_lock( glob_mtx );
219 m_lock = std::unique_lock< CallMutex >{ *ctx_mutexes[contextId] };
243 Gaudi::Property<std::string>
m_writeCatalog{
this,
"WriteCatalog",
"xmlcatalog_file:PoolFileCatalog.xml"};
245 Gaudi::Property<std::vector<std::string>>
m_readCatalog{
this,
"ReadCatalog",{},
"List of catalog files to read from",
"OrderedSet<std::string>"};
266 std::unique_ptr<pool::IDatabase>
getDbHandle(
unsigned int contextId,
const std::string& dbName)
const;
This file contains the class definition for the Guid class (migrated from POOL).
This file contains the class definition for the IPoolSvc interface class.
Define macros for attributes used to control the static checker.
This class holds all the necessary information to guide the writing of an object in a physical place.
ContextLock(int contextId, CallMutex &glob_mtx, const std::vector< CallMutex * > &ctx_mutexes)
std::unique_lock< CallMutex > m_lock
This class provides the interface to the LCG POOL persistency software.
virtual StatusCode io_reinit() override
pool::IFileCatalog * createCatalog()
virtual Token * registerForWrite(const Placement *placement, const void *obj, const RootType &classDesc) override
virtual ~PoolSvc()
Destructor.
virtual void startCatalog() override
virtual void renamePfn(const std::string &pf, const std::string &newpf) override
pool::IFileCatalog * m_catalog
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
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_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:
StatusCode setupPersistencySvc()
virtual pool::ISession * getInputContextSession(unsigned int contextId) const override
virtual StatusCode io_finalize() override
virtual StatusCode checkCollection(const std::string &connection, unsigned int contextId, bool noContainer) const 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::recursive_mutex CallMutex
virtual void commitCatalog() override
std::vector< CallMutex * > m_pers_mut
std::map< std::string, unsigned int > m_inputContextLabel
virtual void setObjPtr(void *&obj, const Token *token) override
virtual StatusCode connectCollection(const std::string &connection, const std::string &collectionName, const pool::DbType &collectionType, unsigned int contextId=IPoolSvc::kInputStream) const 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
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.
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 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.
IContainer is the base class for container objects.
IDatabase is the base class for database objects.
ISession is the interface class for user (macroscopic) sessions Every transaction and connection to a...
std::string label(const std::string &format, int i)