15#include "GaudiKernel/IIoComponent.h"
16#include "GaudiKernel/SmartIF.h"
35class PoolSvc :
public extends<AthService, IPoolSvc, IIoComponent> {
42 virtual StatusCode
start()
override;
43 virtual StatusCode
stop()
override;
45 virtual StatusCode
finalize()
override;
73 unsigned int maxFile = 0)
override;
86 const std::string& connection)
override;
106 void lookupBestPfn(
const std::string& dbID, std::string& pfn, std::string&
type)
const override;
114 const std::string& collectionName,
123 unsigned int contextId,
124 bool noContainer)
override;
132 const std::string& collection,
133 const unsigned long ientry)
override;
174 const std::string& dbName,
175 const std::string& contName =
"",
181 const std::string& data,
188 const std::string& data,
190 const std::string& dbName,
191 const std::string& contName =
"",
195 StatusCode
createSession(
const std::string& sessionName,
int ageLimit = -1 );
198 using base_class::base_class;
211 std::lock_guard<CallMutex> temp_lock( glob_mtx );
213 m_lock = std::unique_lock< CallMutex >{ *ctx_mutexes[contextId] };
239 Gaudi::Property<std::string>
m_writeCatalog{
this,
"WriteCatalog",
"xmlcatalog_file:PoolFileCatalog.xml"};
241 Gaudi::Property<std::vector<std::string>>
m_readCatalog{
this,
"ReadCatalog",{},
"List of catalog files to read from",
"OrderedSet<std::string>"};
263 std::unique_ptr<Database>
getDbHandle(
unsigned int contextId,
const std::string& dbName);
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
virtual Token * registerForWrite(const Placement *placement, const void *obj, const RootType &classDesc) override
std::vector< ToolHandle< SessionTool > > m_dbSessionVec
virtual ~PoolSvc()
Destructor.
virtual void startCatalog() override
StatusCode createSession(const std::string &sessionName, int ageLimit=-1)
Create a new session for a given session name and age limit.
SmartIF< Gaudi::IFileCatalog > m_catalog
void patchCatalog(const std::string &pfn, Database &dbH) const
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
virtual unsigned int getInputContext(const std::string &label, unsigned int maxFile=0) override
virtual StatusCode disconnectDb(const std::string &connection, unsigned int contextId=IPoolSvc::kInputStream) override
Disconnect single Database.
SmartIF< Gaudi::IFileCatalogMgr > m_catalogMgr
virtual StatusCode checkCollection(const std::string &connection, unsigned int contextId, bool noContainer) override
std::unique_ptr< Database > getDbHandle(unsigned int contextId, const std::string &dbName)
Get Database handle.
Gaudi::Property< bool > m_useROOTIMT
Use ROOT Implicit MultiThreading, default = true.
virtual StatusCode start() override
Required of all Gaudi services:
StatusCode setupPersistencySvc()
virtual StatusCode commit(unsigned int contextId=IPoolSvc::kInputStream) override
Commit data for a given contextId and flush buffer.
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 ...
virtual void lookupBestPfn(const std::string &dbID, std::string &pfn, std::string &type) const override
virtual Token * getToken(const std::string &connection, const std::string &collection, const unsigned long ientry) override
Gaudi::Property< bool > m_useROOTMaxTree
Increase virtual TTree size to avoid backreads in multithreading, default = false.
std::map< std::string, unsigned int > m_outputContextLabel
std::recursive_mutex CallMutex
virtual void commitCatalog() override
std::unique_ptr< Container > getContainerHandle(Database *dbH, const std::string &contName)
Get Container handle.
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, unsigned int contextId=IPoolSvc::kInputStream) 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
virtual FileDescriptor getInputFileDescriptor(unsigned int contextId, const std::string &connection) override
virtual StatusCode finalize() override
Required of all Gaudi services:
virtual StatusCode initialize() override
Required of all Gaudi services:
virtual StatusCode getAttribute(const std::string &optName, std::string &data, long tech, unsigned int contextId=IPoolSvc::kInputStream) override
Get POOL attributes - domain.
virtual StatusCode setAttribute(const std::string &optName, const std::string &data, long tech, unsigned int contextId=IPoolSvc::kOutputStream) override
Set POOL attributes - domain.
virtual StatusCode commitAndHold(unsigned int contextId=IPoolSvc::kInputStream) override
Commit data for a given contextId and hold buffer.
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 disconnect(unsigned int contextId=IPoolSvc::kInputStream) override
Disconnect PersistencySvc associated with a contextId.
This class provides a token that identifies in a unique way objects on the persistent storage.
std::string label(const std::string &format, int i)