|
ATLAS Offline Software
|
Go to the documentation of this file.
14 #include "GaudiKernel/IIoComponent.h"
28 class IPersistencySvc;
35 class PoolSvc :
public extends<AthService, IPoolSvc, IIoComponent> {
73 unsigned int maxFile = 0)
override;
81 const coral::Context*
context()
const override;
102 void lookupBestPfn(
const std::string& token, std::string& pfn, std::string&
type)
const override;
108 void renamePfn(
const std::string&
pf,
const std::string& newpf)
override;
117 const std::string& connection,
118 const std::string& collectionName,
127 const std::string& collection,
128 const unsigned long ientry)
const override;
159 long long int getFileSize(
const std::string&
dbName,
long tech,
unsigned int contextId)
const override;
173 const std::string&
dbName,
174 const std::string& contName =
"",
180 const std::string&
data,
187 const std::string&
data,
189 const std::string&
dbName,
190 const std::string& contName =
"",
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 StringProperty
m_writeCatalog{
this,
"WriteCatalog",
"xmlcatalog_file:PoolFileCatalog.xml"};
241 StringArrayProperty
m_readCatalog{
this,
"ReadCatalog",{},
"List of catalog files to read from",
"OrderedSet<std::string>"};
274 std::unique_ptr<pool::IDatabase>
getDbHandle(
unsigned int contextId,
const std::string&
dbName)
const;
virtual StatusCode stop() override
IntegerProperty m_timeOut
ConnectionTimeOut, the time out for CORAL Connection Service: default = 5 seconds.
char data[hepevt_bytes_allocation_ATLAS]
This class holds all the necessary information to guide the writing of an object in a physical place.
std::map< unsigned int, std::list< Guid > > m_guidLists ATLAS_THREAD_SAFE
std::unique_ptr< pool::IDatabase > getDbHandle(unsigned int contextId, const std::string &dbName) const
Get Database handle.
IntegerProperty m_retrialTimeOut
ConnectionRetrialTimeOut, the retrial time out for CORAL Connection Service: default = 300 seconds.
StringProperty m_fileOpen
FileOpen, the open mode for the file ("append" or "overwrite").
IntegerProperty m_frontierComp
Frontier proprties, compression level and list of schemas to be refreshed: default = 5.
std::map< std::string, unsigned int > m_inputContextLabel
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...
virtual StatusCode commit(unsigned int contextId=IPoolSvc::kInputStream) const override
Commit data for a given contextId and flush buffer.
BooleanProperty m_attemptCatalogPatch
AttemptCatalogPatch, option to create catalog: default = false.
virtual const pool::IFileCatalog * catalog() const override
virtual StatusCode disconnect(unsigned int contextId=IPoolSvc::kInputStream) const override
Disconnect PersistencySvc associated with a contextId.
StringArrayProperty m_frontierRefresh
This class provides the interface to the LCG POOL persistency software.
coral::Context * m_context
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 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.
StringProperty m_writeCatalog
WriteCatalog, the file catalog to be used to register output files (also default input catalog): defa...
virtual void setObjPtr(void *&obj, const Token *token) override
BooleanProperty m_useROOTMaxTree
Increase virtual TTree size to avoid backreads in multithreading, default = false.
Type
Transaction type enumeration.
This class provides a token that identifies in a unique way objects on the persistent storage.
virtual void renamePfn(const std::string &pf, const std::string &newpf) override
std::recursive_mutex CallMutex
std::vector< CallMutex * > m_pers_mut
std::string m_mainOutputLabel
virtual const coral::Context * context() const override
virtual unsigned int getOutputContext(const std::string &label) override
::StatusCode StatusCode
StatusCode definition for legacy code.
std::unique_ptr< pool::IContainer > getContainerHandle(pool::IDatabase *dbH, const std::string &contName) const
Get Container handle.
std::unique_lock< CallMutex > m_lock
virtual Token * getToken(const std::string &connection, const std::string &collection, const unsigned long ientry) const override
virtual StatusCode disconnectDb(const std::string &connection, unsigned int contextId=IPoolSvc::kInputStream) const override
Disconnect single Database.
ContextLock(int contextId, CallMutex &glob_mtx, const std::vector< CallMutex * > &ctx_mutexes)
virtual pool::ICollection * createCollection(const std::string &collectionType, const std::string &connection, const std::string &collectionName, unsigned int contextId=IPoolSvc::kInputStream) const override
virtual StatusCode commitAndHold(unsigned int contextId=IPoolSvc::kInputStream) const override
Commit data for a given contextId and hold buffer.
BooleanProperty m_sortReplicas
Use DBReplicaSvc to sort database connections, default = true.
virtual StatusCode setFrontierCache(const std::string &conn) override
Setup Frontier cache for given logical or physical connection name.
virtual StatusCode getAttribute(const std::string &optName, std::string &data, long tech, unsigned int contextId=IPoolSvc::kInputStream) const override
Get POOL attributes - domain.
pool::IFileCatalog * m_catalog
std::map< unsigned int, unsigned int > m_contextMaxFile
StringArrayProperty m_readCatalog
ReadCatalog, the list of additional POOL input file catalogs to consult: default = empty vector.
IntegerProperty m_dbAgeLimit
MaxFilesOpen, option to have PoolSvc limit the number of open Input Files: default = 0 (No files are ...
void patchCatalog(const std::string &pfn, pool::IDatabase &dbH) const
This file contains the class definition for the IPoolSvc interface class.
virtual void loadComponent(const std::string &compName) override
virtual const std::map< std::string, unsigned int > & getInputContextMap() const override
std::string poolCondPath(const std::string &leaf)
Resolve a file using ATLAS_POOLCOND_PATH.
virtual void lookupBestPfn(const std::string &token, std::string &pfn, std::string &type) const override
virtual Token * registerForWrite(const Placement *placement, const void *obj, const RootType &classDesc) override
virtual StatusCode finalize() override
Required of all Gaudi services:
virtual void setShareMode(bool shareCat) override
virtual StatusCode start() override
Required of all Gaudi services:
virtual StatusCode initialize() override
Required of all Gaudi services:
std::vector< pool::IPersistencySvc * > m_persistencySvcVec
StatusCode setupPersistencySvc()
virtual ~PoolSvc()
Destructor.
IntegerProperty m_retrialPeriod
ConnectionRetrialPeriod, retry period for CORAL Connection Service: default = 30 seconds.
pool::IFileCatalog * createCatalog()
virtual StatusCode io_reinit() override
This file contains the class definition for the Guid class (migrated from POOL).
Define macros for attributes used to control the static checker.
virtual unsigned int getInputContext(const std::string &label, unsigned int maxFile=0) override
BooleanProperty m_connClean
ConnectionCleanUp - whether to use CORAL connection management thread: default = false.
virtual StatusCode io_finalize() override
BooleanProperty m_useROOTIMT
Use ROOT Implicit MultiThreading, default = true.
std::map< std::string, unsigned int > m_outputContextLabel