Loading [MathJax]/jax/input/TeX/config.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
12 #include "GaudiKernel/IIoComponentMgr.h"
13 #include "GaudiKernel/ConcurrencyFlags.h"
17 #include "CoralKernel/Context.h"
36 #include "RelationalAccess/ConnectionService.h"
37 #include "RelationalAccess/IConnectionServiceConfiguration.h"
38 #include "RelationalAccess/IWebCacheControl.h"
39 #include "RelationalAccess/IWebCacheInfo.h"
40 #include "RelationalAccess/ILookupService.h"
41 #include "RelationalAccess/IDatabaseServiceSet.h"
42 #include "RelationalAccess/IDatabaseServiceDescription.h"
53 return !
s.empty() and ( isdigit(
s[0]) or
s[0]==
'+' or
s[0]==
'-' );
60 return(StatusCode::FAILURE);
65 if (!iomgr.retrieve().isSuccess()) {
67 return(StatusCode::FAILURE);
69 if (!iomgr->io_register(
this).isSuccess()) {
70 ATH_MSG_FATAL(
"Could not register myself with the IoComponentMgr !");
71 return(StatusCode::FAILURE);
76 if (
catalog.compare(0, 16,
"xmlcatalog_file:") == 0) {
86 if (
m_writeCatalog.value().compare(0, 16,
"xmlcatalog_file:") == 0) {
96 return(StatusCode::FAILURE);
101 return(StatusCode::FAILURE);
103 coral::ConnectionService conSvcH;
104 coral::IConnectionServiceConfiguration& csConfig = conSvcH.configuration();
108 csConfig.enablePoolAutomaticCleanUp();
109 csConfig.setConnectionTimeOut(
m_timeOut);
111 csConfig.disablePoolAutomaticCleanUp();
112 csConfig.setConnectionTimeOut(0);
114 ATH_MSG_INFO(
"Set connectionsvc retry/timeout/IDLE timeout to "
120 <<
" seconds with connection cleanup "
121 << (csConfig.isPoolAutomaticCleanUpEnabled() ?
"enabled" :
"disabled"));
123 coral::IWebCacheControl& webCache = conSvcH.webCacheControl();
125 ATH_MSG_INFO(
"Frontier compression level set to " << webCache.compressionLevel());
129 if (replicasvc.retrieve().isSuccess()) {
130 csConfig.setReplicaSortingAlgorithm(*replicasvc);
131 ATH_MSG_INFO(
"Successfully setup replica sorting algorithm");
146 if (!iomgr.retrieve().isSuccess()) {
148 return(StatusCode::FAILURE);
150 if (!iomgr->io_hasitem(
this)) {
151 ATH_MSG_FATAL(
"IoComponentMgr does not know about myself !");
152 return(StatusCode::FAILURE);
155 for (std::size_t icat = 0,
imax = readcat.size(); icat <
imax; icat++) {
156 if (readcat[icat].
compare(0, 16,
"xmlcatalog_file:") == 0) {
157 std::string
fileName = readcat[icat].substr(16);
158 if (iomgr->io_contains(
this,
fileName)) {
159 if (!iomgr->io_retrieve(
this,
fileName).isSuccess()) {
161 return(StatusCode::FAILURE);
163 readcat[icat] =
"xmlcatalog_file:" +
fileName;
169 if (
m_writeCatalog.value().compare(0, 16,
"xmlcatalog_file:") == 0) {
171 if (iomgr->io_contains(
this,
fileName)) {
172 if (!iomgr->io_retrieve(
this,
fileName).isSuccess()) {
174 return(StatusCode::FAILURE);
192 return(StatusCode::FAILURE);
198 ATH_MSG_FATAL(
"Failed to enable thread safety in ROOT via PersistencySvc.");
199 return(StatusCode::FAILURE);
204 return(StatusCode::FAILURE);
216 ATH_MSG_FATAL(
"Failed to set ROOT default container type via PersistencySvc.");
217 return(StatusCode::FAILURE);
220 return(StatusCode::SUCCESS);
227 ATH_MSG_FATAL(
"Failed to enable implicit multithreading in ROOT via PersistencySvc.");
228 return(StatusCode::FAILURE);
232 return(StatusCode::SUCCESS);
237 bool retError =
false;
244 return(retError ? StatusCode::FAILURE : StatusCode::SUCCESS);
251 delete persistencySvc;
254 for (
const auto& persistencyMutex :
m_pers_mut) {
255 delete persistencyMutex;
281 return(StatusCode::SUCCESS);
288 const std::string& auxString = placement->
auxString();
289 if (!auxString.empty()) {
290 if (auxString.compare(0, 6,
"[CTXT=") == 0) {
291 ::sscanf(auxString.c_str(),
"[CTXT=%08X]", &contextId);
292 }
else if (auxString.compare(0, 8,
"[CLABEL=") == 0) {
296 ATH_MSG_WARNING(
"registerForWrite: Using default output Stream instead of id = " << contextId);
300 std::lock_guard<CallMutex> lock(*
m_pers_mut[contextId]);
302 if (token ==
nullptr) {
310 const std::string& auxString = token->
auxString();
311 if (!auxString.empty()) {
312 if (auxString.compare(0, 6,
"[CTXT=") == 0) {
313 ::sscanf(auxString.c_str(),
"[CTXT=%08X]", &contextId);
314 }
else if (auxString.compare(0, 8,
"[CLABEL=") == 0) {
318 ATH_MSG_WARNING(
"setObjPtr: Using default input Stream instead of id = " << contextId);
322 ATH_MSG_VERBOSE(
"setObjPtr: token=" << token->
toString() <<
", auxString=" << auxString <<
", contextID=" << contextId);
324 std::lock_guard<CallMutex> lock(*
m_pers_mut[contextId]);
326 std::map<unsigned int, unsigned int>::const_iterator maxFileIter =
m_contextMaxFile.find(contextId);
328 m_guidLists[contextId].remove(token->
dbID());
329 m_guidLists[contextId].push_back(token->
dbID());
330 while (m_guidLists[contextId].
size() > maxFileIter->second) {
347 return(contextIter->second);
360 ATH_MSG_WARNING(
"Failed to set ROOT default container type via PersistencySvc for id " <<
id);
369 if (!
label.empty()) {
375 return(contextIter->second);
385 if (!
label.empty()) {
414 if (token.compare(0, 4,
"PFN:") == 0) {
416 }
else if (token.compare(0, 4,
"LFN:") == 0) {
418 }
else if (token.compare(0, 4,
"FID:") == 0) {
419 dbID = token.substr(4);
431 std::string dbID,
type;
446 const std::string& connection,
447 const std::string& collectionName,
448 unsigned int contextId)
const {
449 ATH_MSG_DEBUG(
"createCollection() type="<< collectionType <<
", connection=" << connection
450 <<
", name=" << collectionName <<
", contextID=" << contextId);
451 std::string collection(collectionName);
452 if (collectionType ==
"RootCollection") {
453 if (collectionName.find(
"PFN:") == std::string::npos
454 && collectionName.find(
"LFN:") == std::string::npos
455 && collectionName.find(
"FID:") == std::string::npos) {
456 collection =
"PFN:" + collectionName;
460 ATH_MSG_WARNING(
"createCollection: Using default input Stream instead of id = " << contextId);
465 bool insertFile =
false;
466 if (connection.compare(0, 4,
"PFN:") == 0) {
467 std::string fid, fileType;
471 ATH_MSG_INFO(
"File is not in Catalog! Attempt to open it anyway.");
475 if (collectionType ==
"ImplicitCollection") {
476 std::unique_ptr<pool::IDatabase> dbH =
getDbHandle(contextId, connection);
477 if (dbH ==
nullptr) {
478 ATH_MSG_INFO(
"Failed to get Session/DatabaseHandle to create POOL collection.");
485 std::map<unsigned int, unsigned int>::const_iterator maxFileIter =
m_contextMaxFile.find(contextId);
486 if (maxFileIter !=
m_contextMaxFile.end() && maxFileIter->second > 0 && !dbH->
fid().empty()) {
488 m_guidLists[contextId].remove(
guid);
489 m_guidLists[contextId].push_back(
guid);
490 while (m_guidLists[contextId].
size() > maxFileIter->second + 1) {
495 if (contH ==
nullptr) {
496 ATH_MSG_INFO(
"Failed to find container " << collection <<
" to create POOL collection.");
503 ATH_MSG_INFO(
"Failed to open container to check POOL collection - trying.");
512 if (collectionType ==
"RootCollection" &&
514 ATH_MSG_INFO(
"Writing ExplicitROOT Collection - do not pass session pointer");
520 std::string tree_error, rntuple_error;
524 tree_error =
e.what();
527 collDes.
setType(
"RNTCollection");
531 std::unique_ptr<pool::IDatabase> dbH =
getDbHandle(contextId, connection);
532 if (dbH !=
nullptr) {
533 if (!dbH->
fid().empty()) {
538 rntuple_error =
e.what();
540 if( !collPtr )
throw pool::Exception(
"Failed to open APR Collection as RootCollection or RNTCollection: "
541 + tree_error +
" | " + rntuple_error,
542 "PoolSvc::createCollection",
"PoolSvc" );
545 std::unique_ptr<pool::IDatabase> dbH =
getDbHandle(contextId, connection);
546 if (dbH ==
nullptr) {
548 }
else if (dbH->
fid().empty()) {
549 ATH_MSG_INFO(
"Cannot retrieve the FID of an existing POOL database: '"
550 << connection <<
"' - FileCatalog will NOT be updated.");
557 if (
m_useROOTMaxTree && Gaudi::Concurrency::ConcurrencyFlags::numConcurrentEvents() > 1) {
569 std::string fid = dbH.
fid();
575 const std::string& collection,
576 const unsigned long ientry)
const {
579 if (dbH ==
nullptr) {
586 if (contH ==
nullptr) {
591 for (
unsigned long ipos = 0; ipos < ientry; ipos++) {
592 delete thisToken; thisToken = tokenIter->
next();
594 delete tokenIter; tokenIter =
nullptr;
601 ATH_MSG_WARNING(
"connect: Using default output Stream instead of id = " << contextId);
606 ATH_MSG_WARNING(
"connect: Using default input Stream instead of id = " << contextId);
609 ATH_MSG_INFO(
"Connecting to InputStream for: " << contextId);
614 return(StatusCode::FAILURE);
620 return(StatusCode::SUCCESS);
624 return(StatusCode::FAILURE);
627 return(StatusCode::SUCCESS);
632 return(StatusCode::FAILURE);
639 return(StatusCode::FAILURE);
645 return(StatusCode::SUCCESS);
650 return(StatusCode::FAILURE);
657 return(StatusCode::FAILURE);
660 return(StatusCode::SUCCESS);
664 ATH_MSG_DEBUG(
"Disconnect request for contextId=" << contextId);
666 return(StatusCode::SUCCESS);
671 if (!
commit(contextId).isSuccess()) {
673 return(StatusCode::FAILURE);
678 ATH_MSG_ERROR(
"disconnect failed to diconnect PersistencySvc");
679 return(StatusCode::FAILURE);
682 return(StatusCode::SUCCESS);
687 return(StatusCode::SUCCESS);
690 std::unique_ptr<pool::IDatabase> dbH =
getDbHandle(contextId, connection);
691 if (dbH ==
nullptr) {
693 return(StatusCode::FAILURE);
695 std::map<unsigned int, unsigned int>::const_iterator maxFileIter =
m_contextMaxFile.find(contextId);
697 m_guidLists[contextId].remove(
Guid(dbH->
fid()));
700 return(StatusCode::SUCCESS);
706 if (dbH ==
nullptr) {
707 ATH_MSG_DEBUG(
"getFileSize: Failed to get Session/DatabaseHandle to get POOL FileSize property.");
724 unsigned int contextId)
const {
726 ATH_MSG_WARNING(
"getAttribute: Using default input Stream instead of id = " << contextId);
731 std::ostringstream oss;
732 if (
data ==
"DbLonglong") {
734 }
else if (
data ==
"double") {
741 return(StatusCode::SUCCESS);
747 const std::string&
dbName,
748 const std::string& contName,
749 unsigned int contextId)
const {
752 if (dbH ==
nullptr) {
753 ATH_MSG_DEBUG(
"getAttribute: Failed to get Session/DatabaseHandle to get POOL property.");
754 return(StatusCode::FAILURE);
764 std::ostringstream oss;
765 if (contName.empty()) {
766 if (
data ==
"DbLonglong") {
768 }
else if (
data ==
"double") {
770 }
else if (
data ==
"string") {
775 ATH_MSG_INFO(
"Database (" << dbH->
pfn() <<
") attribute [" << optName <<
"]" <<
": " << oss.str());
778 if (contH ==
nullptr) {
779 ATH_MSG_DEBUG(
"Failed to get ContainerHandle to get POOL property.");
780 return(StatusCode::FAILURE);
782 if (
data ==
"DbLonglong") {
784 }
else if (
data ==
"double") {
789 ATH_MSG_INFO(
"Container attribute [" << contName <<
"." << optName <<
"]: " << oss.str());
792 return(StatusCode::SUCCESS);
796 const std::string&
data,
798 unsigned int contextId)
const {
800 ATH_MSG_WARNING(
"setAttribute: Using default output Stream instead of id = " << contextId);
808 return(StatusCode::FAILURE);
813 return(StatusCode::FAILURE);
816 return(StatusCode::SUCCESS);
820 const std::string&
data,
822 const std::string&
dbName,
823 const std::string& contName,
824 unsigned int contextId)
const {
826 ATH_MSG_WARNING(
"setAttribute: Using default output Stream instead of id = " << contextId);
831 if (dbH ==
nullptr) {
832 ATH_MSG_DEBUG(
"Failed to get Session/DatabaseHandle to set POOL property.");
833 return(StatusCode::FAILURE);
843 bool retError =
false;
845 bool hasTTreeName = (contName.length() > 6 && contName.compare(0, 6,
"TTree=") == 0);
847 objName = hasTTreeName ? contName.substr(6) : contName;
850 }
else if(
data[
data.size() - 1] ==
'L' ) {
857 return(StatusCode::FAILURE);
861 if (contH ==
nullptr) {
862 ATH_MSG_DEBUG(
"Failed to get ContainerHandle to set POOL property.");
863 return(StatusCode::FAILURE);
865 if (
auto p = contName.find(
'(');
p != std::string::npos) {
866 objName = contName.substr(
p + 1);
867 objName.erase(objName.find(
')'));
868 }
else if (
auto p = contName.find(
"::");
p != std::string::npos) {
869 objName = contName.substr(
p + 2);
870 }
else if (
auto p = contName.find(
'_');
p != std::string::npos) {
871 objName = contName.substr(
p + 1);
872 objName.erase(objName.find(
'/'));
874 std::string::size_type off = 0;
875 while ((off = objName.find_first_of(
"<>/")) != std::string::npos) {
884 ATH_MSG_DEBUG(
"Failed to set POOL container property, " << optName <<
" for " << contName <<
" : " << objName <<
" to " <<
data);
885 return(StatusCode::FAILURE);
888 return(StatusCode::SUCCESS);
896 std::vector<std::string> physcons;
897 if (
conn.find(
':') == std::string::npos) {
900 const std::string lookSvcStr(
"CORAL/Services/XMLLookupService");
901 coral::IHandle<coral::ILookupService> lookSvcH =
m_context->query<coral::ILookupService>();
902 if (!lookSvcH.isValid()) {
904 lookSvcH =
m_context->query<coral::ILookupService>();
906 if (!lookSvcH.isValid()) {
908 return(StatusCode::FAILURE);
910 coral::IDatabaseServiceSet* dbset = lookSvcH->lookup(
conn, coral::ReadOnly);
911 if (dbset !=
nullptr) {
912 for (
int irep = 0, nrep = dbset->numberOfReplicas(); irep < nrep; ++irep) {
913 const std::string pcon = dbset->replica(irep).connectionString();
914 if (pcon.compare(0, 9,
"frontier:") == 0) {
915 physcons.push_back(pcon);
918 delete dbset; dbset =
nullptr;
922 }
else if (
conn.compare(0, 9,
"frontier:") == 0) {
923 physcons.push_back(
conn);
926 if (physcons.size() == 0) {
927 return(StatusCode::SUCCESS);
929 coral::ConnectionService conSvcH;
933 coral::IWebCacheControl& webCache = conSvcH.webCacheControl();
934 for (std::vector<std::string>::const_iterator iter = physcons.begin(), last = physcons.end();
935 iter != last; ++iter) {
942 webCache.refreshTable(*iter,
"DUMMYTABLE");
945 webCache.refreshSchemaInfo(*iter);
947 ATH_MSG_DEBUG(
"Cache flag for connection " << *iter <<
" set to " << webCache.webCacheInfo(*iter).isSchemaInfoCached());
949 return(StatusCode::SUCCESS);
957 if (
catalog.compare(0, 8,
"apcfile:") == 0 ||
catalog.compare(0, 7,
"prfile:") == 0) {
958 std::string::size_type cpos =
catalog.find(
':');
973 <<
" in $ATLAS_POOLCOND_PATH and $DATAPATH");
985 ATH_MSG_ERROR(
"setWriteCatalog - caught exception: " <<
e.what());
998 ATH_MSG_WARNING(
"getDbHandle: Using default input Stream instead of id = " << contextId);
1013 if (
dbName.compare(0, 4,
"PFN:") == 0) {
1015 }
else if (
dbName.compare(0, 4,
"LFN:") == 0) {
1017 }
else if (
dbName.compare(0, 4,
"FID:") == 0) {
1022 return(std::unique_ptr<pool::IDatabase>(dbH));
1027 if (dbH ==
nullptr) {
1034 if (contName.find(
"DataHeader") != std::string::npos) {
1035 contH = dbH->
containerHandle(contName.substr(0, contName.find(
"_p")));
1039 return(std::unique_ptr<pool::IContainer>(contH));
1045 const char* cpath =
std::getenv(
"ATLAS_POOLCOND_PATH");
1046 if (cpath && strcmp(cpath,
"") != 0) {
1047 const std::string testpath = std::string(cpath) +
"/" + leaf;
1051 if (FILE*
fp = std::fopen(testpath.c_str(),
"r")) {
virtual StatusCode stop() override
IntegerProperty m_timeOut
ConnectionTimeOut, the time out for CORAL Connection Service: default = 5 seconds.
char data[hepevt_bytes_allocation_ATLAS]
static CollectionFactory * get()
Retrieves the collection factory singleton.
static const Guid & null()
NULL-Guid: static class method.
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
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,...
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
void lookupFileByPFN(const std::string &pfn, std::string &fid, std::string &tech) const
Get FID and filetype for a given PFN.
std::unique_ptr< pool::IDatabase > getDbHandle(unsigned int contextId, const std::string &dbName) const
Get Database handle.
static DbType getType(const std::string &name)
Access known storage type object by name.
IntegerProperty m_retrialTimeOut
ConnectionRetrialTimeOut, the retrial time out for CORAL Connection Service: default = 300 seconds.
const std::string & containerName() const
Access container name.
bool setWriteModeForNonExisting(Mode mode)
Sets the opening mode when a non existing database is opened for writing Acceptable values are RAISE_...
std::string find(const std::string &s)
return a remapped string
static std::string find_file(const std::string &logical_file_name, const std::string &search_path, SearchType search_type=LocalSearch)
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.
void registerPFN(const std::string &pfn, const std::string &ftype, std::string &fid)
Register PFN, assign new FID if not given.
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 ITechnologySpecificAttributes & technologySpecificAttributes() const =0
Returns the object holding the technology specific attributes for a given technology domain.
virtual void connectForRead()=0
Connects explicitly to the database for read operations.
const std::string & auxString() const
Access auxiliary string.
virtual const pool::IFileCatalog * catalog() const override
void renamePFN(const std::string &pfn, const std::string &newpfn)
Rename PFN.
virtual StatusCode disconnect(unsigned int contextId=IPoolSvc::kInputStream) const override
Disconnect PersistencySvc associated with a contextId.
const Guid & dbID() const
Access database identifier.
StringArrayProperty m_frontierRefresh
virtual bool disconnectAll()=0
Explicitly disconnects all the databases.
virtual const std::string & pfn()=0
Returns the physical file name of this database.
const std::string toString() const
Automatic conversion to string representation.
void commit()
Save catalog to file.
bool setAttribute(const std::string &attributeName, const T &atttibuteValue, const std::string &option="")
Templated method to set an attribute.
virtual ITokenIterator * tokens(const std::string &selection)=0
Starts an iteration over the tokens in the container.
coral::Context * m_context
#define ATH_MSG_VERBOSE(x)
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 ITransaction & transaction()=0
Returns the transaction object.
virtual const std::string & fid()=0
Returns the file identifier of this 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.
StringProperty m_writeCatalog
WriteCatalog, the file catalog to be used to register output files (also default input catalog): defa...
virtual OpenMode openMode() const =0
Returns the opening mode. It can be used to check whether the database is connected.
virtual void setObjPtr(void *&obj, const Token *token) override
virtual Token * next()=0
Returns the pointer to next token.
BooleanProperty m_useROOTMaxTree
Increase virtual TTree size to avoid backreads in multithreading, default = false.
Type
Transaction type enumeration.
virtual const ITechnologySpecificAttributes & technologySpecificAttributes() const =0
Returns the object holding the technology specific attributes.
void lookupFileByLFN(const std::string &lfn, std::string &fid) const
Return the status of a LFName.
This class provides a token that identifies in a unique way objects on the persistent storage.
void setLevel(MsgLevel l)
virtual void renamePfn(const std::string &pf, const std::string &newpf) override
std::recursive_mutex CallMutex
Token & fromString(const std::string &from)
Build from the string representation of a token.
std::vector< CallMutex * > m_pers_mut
std::string m_mainOutputLabel
Base exception class for the POOL system.
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
virtual const coral::Context * context() const override
virtual unsigned int getOutputContext(const std::string &label) override
This file contains the class definition for the PoolSvc class.
virtual bool commitAndHold()=0
Commits the holds transaction.
virtual void connectForWrite()=0
Connects explicitly to the database for write/update operations.
::StatusCode StatusCode
StatusCode definition for legacy code.
std::unique_ptr< pool::IContainer > getContainerHandle(pool::IDatabase *dbH, const std::string &contName) const
Get Container handle.
virtual const ITechnologySpecificAttributes & technologySpecificAttributes(long technology) const =0
Returns the object holding the technology specific attributes for a given technology domain.
void start()
redirect to init() for Gaudi FC
virtual bool start(Type type=READ)=0
Starts a new transaction. Returns the success of the operation.
bool setWriteModeForExisting(Mode mode)
Sets the opening mode when an existing database is opened for writing.
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.
void setWriteCatalog(const std::string &connect)
Access to the (first) writable file catalog.
virtual bool setTechnology(long technology)=0
Sets the technology identifier for this database.
virtual void disconnect()=0
Disconnects from the database.
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.
const std::string & auxString() const
Access auxiliary string.
void removeCatalog(const std::string &connect)
Add new catalog identified by reference to the existing ones.
bool allGood
Loop over the SDOs & Digits.
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.
StringProperty 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
virtual void setType(const std::string &type)
Sets the storage technology type of the collection.
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 ...
virtual const std::string toString() const
Retrieve the string representation of the token.
void patchCatalog(const std::string &pfn, pool::IDatabase &dbH) const
virtual bool commit()=0
Commits the transaction.
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 IDatabase * databaseHandle(const std::string &dbName, DatabaseSpecification::NameType dbNameType)=0
Returns a pointer to a database object. The user acquires ownership of that object.
virtual StatusCode finalize() override
Required of all Gaudi services:
T attribute(const std::string &attributeName, const std::string &option="")
Templated method to retrieve an attribute.
void getFirstPFN(const std::string &fid, std::string &pfn, std::string &tech) const
Get the first PFN + filetype for the given FID.
virtual void setShareMode(bool shareCat) override
virtual StatusCode start() override
Required of all Gaudi services:
This class provides a encapsulation of a GUID/UUID/CLSID/IID data structure (128 bit number).
std::string getenv(const std::string &variableName)
get an environment variable
#define ATH_MSG_WARNING(x)
virtual StatusCode initialize() override
Required of all Gaudi services:
std::vector< pool::IPersistencySvc * > m_persistencySvcVec
StatusCode setupPersistencySvc()
virtual ISession & session()=0
Returns the underlying global session.
virtual IContainer * containerHandle(const std::string &name)=0
Returns a pointer to a container object. The user acquires ownership of that object.
virtual ~PoolSvc()
Destructor.
IntegerProperty m_retrialPeriod
ConnectionRetrialPeriod, retry period for CORAL Connection Service: default = 30 seconds.
int atoi(std::string_view str)
Helper functions to unpack numbers decoded in string into integers and doubles The strings are requir...
bool isNumber(const std::string &s)
pool::IFileCatalog * createCatalog()
virtual StatusCode io_reinit() override
This file contains the class definition for the Placement class (migrated from POOL).
static std::unique_ptr< IPersistencySvc > create(IFileCatalog &catalog)
Factory for PersistencySvc.
virtual unsigned int getInputContext(const std::string &label, unsigned int maxFile=0) override
This file contains the class definition for the Token class (migrated from POOL).
BooleanProperty m_connClean
ConnectionCleanUp - whether to use CORAL connection management thread: default = false.
void addReadCatalog(const std::string &connect)
Add new catalog identified by name to the existing ones.
virtual Type type() const =0
Returns the transaction type.
virtual StatusCode io_finalize() override
BooleanProperty m_useROOTIMT
Use ROOT Implicit MultiThreading, default = true.
virtual bool isActive() const =0
Checks if the transaction is active.
std::map< std::string, unsigned int > m_outputContextLabel