 |
ATLAS Offline Software
|
Go to the documentation of this file.
14 #include "GaudiKernel/IIoComponent.h"
29 class IPersistencySvc;
36 class PoolSvc :
public extends<AthService, IPoolSvc, IIoComponent> {
74 unsigned int maxFile = 0)
override;
82 const coral::Context*
context()
const override;
103 void lookupBestPfn(
const std::string& token, std::string& pfn, std::string&
type)
const override;
109 void renamePfn(
const std::string&
pf,
const std::string& newpf)
override;
118 const std::string& connection,
119 const std::string& collectionName,
128 const std::string& collection,
129 const unsigned long ientry)
const override;
160 long long int getFileSize(
const std::string&
dbName,
long tech,
unsigned int contextId)
const 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 =
"",
199 using base_class::base_class;
212 std::lock_guard<CallMutex> temp_lock( glob_mtx );
214 m_lock = std::unique_lock< CallMutex >{ *ctx_mutexes[contextId] };
234 Gaudi::Property<std::string>
m_fileOpen{
this,
"FileOpen",
"overwrite"};
240 Gaudi::Property<std::string>
m_writeCatalog{
this,
"WriteCatalog",
"xmlcatalog_file:PoolFileCatalog.xml"};
242 Gaudi::Property<std::vector<std::string>>
m_readCatalog{
this,
"ReadCatalog",{},
"List of catalog files to read from",
"OrderedSet<std::string>"};
255 Gaudi::Property<int>
m_timeOut{
this,
"ConnectionTimeOut",5};
257 Gaudi::Property<bool>
m_connClean{
this,
"ConnectionCleanUp",
false};
277 std::unique_ptr<pool::IDatabase>
getDbHandle(
unsigned int contextId,
const std::string&
dbName)
const;
virtual StatusCode stop() override
Gaudi::Property< bool > m_connClean
ConnectionCleanUp - whether to use CORAL connection management thread: default = false.
char data[hepevt_bytes_allocation_ATLAS]
Gaudi::Property< std::vector< std::string > > m_readCatalog
ReadCatalog, the list of additional POOL input file catalogs to consult: default = empty vector.
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.
Gaudi::Property< int > m_retrialTimeOut
ConnectionRetrialTimeOut, the retrial time out for CORAL Connection Service: default = 300 seconds.
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.
Gaudi::Property< bool > m_useROOTIMT
Use ROOT Implicit MultiThreading, default = true.
Gaudi::Property< int > m_dbAgeLimit
MaxFilesOpen, option to have PoolSvc limit the number of open Input Files: default = 0 (No files are ...
virtual const pool::IFileCatalog * catalog() const override
virtual StatusCode disconnect(unsigned int contextId=IPoolSvc::kInputStream) const override
Disconnect PersistencySvc associated with a contextId.
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.
virtual void setObjPtr(void *&obj, const Token *token) override
Type
Transaction type enumeration.
This class provides a token that identifies in a unique way objects on the persistent storage.
Gaudi::Property< bool > m_attemptCatalogPatch
AttemptCatalogPatch, option to create catalog: default = false.
virtual void renamePfn(const std::string &pf, const std::string &newpf) override
std::recursive_mutex CallMutex
std::vector< CallMutex * > m_pers_mut
Gaudi::Property< std::string > m_writeCatalog
WriteCatalog, the file catalog to be used to register output files (also default input catalog): defa...
Gaudi::Property< int > m_frontierComp
Frontier proprties, compression level and list of schemas to be refreshed: default = 5.
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
Gaudi::Property< bool > m_useROOTMaxTree
Increase virtual TTree size to avoid backreads in multithreading, default = false.
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.
Gaudi::Property< int > m_retrialPeriod
ConnectionRetrialPeriod, retry period for CORAL Connection Service: default = 30 seconds.
virtual StatusCode setFrontierCache(const std::string &conn) override
Setup Frontier cache for given logical or physical connection name.
Gaudi::Property< bool > m_sortReplicas
Use DBReplicaSvc to sort database connections, default = true.
Gaudi::Property< std::string > m_defaultROOTContainerType
Default ROOT container type.
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
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
Gaudi::Property< int > m_timeOut
ConnectionTimeOut, the time out for CORAL Connection Service: default = 5 seconds.
virtual StatusCode start() override
Required of all Gaudi services:
Gaudi::Property< std::vector< std::string > > m_frontierRefresh
virtual StatusCode initialize() override
Required of all Gaudi services:
std::vector< pool::IPersistencySvc * > m_persistencySvcVec
StatusCode setupPersistencySvc()
virtual ~PoolSvc()
Destructor.
pool::IFileCatalog * createCatalog()
virtual StatusCode io_reinit() override
Gaudi::Property< std::string > m_fileOpen
FileOpen, the open mode for the file ("append" or "overwrite").
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
virtual StatusCode io_finalize() override
std::map< std::string, unsigned int > m_outputContextLabel