|
ATLAS Offline Software
|
Go to the documentation of this file.
15 #include "CoralBase/AttributeList.h"
16 #include "CoralBase/Attribute.h"
25 #include "GaudiKernel/StatusCode.h"
32 const std::string& inputCollection,
33 unsigned int contextId,
34 const std::string&
query,
38 m_inputCollection(inputCollection),
39 m_contextId(contextId),
42 m_poolCollection(nullptr),
43 m_collectionQuery(nullptr),
46 std::string::size_type p_colon = collectionType.rfind(
':');
47 if (p_colon != std::string::npos) {
56 if (p_slash != std::string::npos) {
70 std::string collectionTypeString;
72 collectionTypeString =
"RootCollection";
74 collectionTypeString =
"ImplicitCollection";
76 return(StatusCode::FAILURE);
78 if (collectionTypeString ==
"ImplicitCollection") {
103 if (
m_poolCollection ==
nullptr && collectionTypeString ==
"ImplicitCollection") {
108 return(StatusCode::RECOVERABLE);
110 return(StatusCode::SUCCESS);
115 return(StatusCode::SUCCESS);
120 return(StatusCode::SUCCESS);
124 return(
m_poolCollection !=
nullptr ? StatusCode::SUCCESS : StatusCode::FAILURE);
146 const std::string& refName)
const {
150 std::string tokenStr;
151 if (!refName.empty()) {
152 std::string
attrName = refName +
"_ref";
158 tokenStr =
cursor->currentRow().attributeList()[
attrName].data<std::string>();
164 tokenStr =
cursor->eventRef().toString();
This class provides the interface to the LCG POOL persistency software.
PoolCollectionConverter(const std::string &collectionType, const std::string &inputCollection, unsigned int contextId, const std::string &query, const IPoolSvc *svc)
Constructor.
pool::ICollectionCursor & executeQuery()
Query the collection.
This file contains the class definition for the PoolCollectionConverter class.
virtual pool::ICollectionCursor & execute()=0
Processes the query and returns a cursor over the query result.
pool::ICollectionCursor & selectAll()
virtual void close()=0
Closes the collection and terminates any database connections.
std::string m_collectionType
virtual const std::string & type() const =0
Returns the storage technology type of the collection.
virtual void selectAll()=0
Adds all Token and Attribute columns to the query select list.
std::string m_inputCollection
std::string m_inputContainer
virtual ICollectionQuery * newQuery()=0
Returns an object used to query the collection.
StatusCode isValid() const
Check whether has valid pool::ICollection*.
::StatusCode StatusCode
StatusCode definition for legacy code.
const IPoolSvc * m_poolSvc
virtual const ICollectionDescription & description() const =0
Returns an object used to describe the collection properties.
AthROOTErrorHandlerSvc * svc
std::string retrieveToken(const pool::ICollectionCursor *cursor, const std::string &refName) const
pool::ICollectionQuery * m_collectionQuery
This file contains the class definition for the IPoolSvc interface class.
virtual void setCondition(const std::string &whereClause, coral::AttributeList *attributeBindData=0, TokenList *tokenBindData=0)=0
Sets the predicates of the query.
StatusCode disconnectDb()
Disconnect Database.
StatusCode initialize()
Required by all Gaudi Services.
pool::ICollection * m_poolCollection
virtual StatusCode disconnectDb(const std::string &connection, unsigned int contextId=IPoolSvc::kInputStream) const =0
Disconnect single Database.
virtual void setRowCacheSize(int rowCacheSize)=0
Sets the cache size used to store the query result.
virtual ~PoolCollectionConverter()
Destructor.
This file contains the class definition for the Token class (migrated from POOL).
virtual pool::ICollection * createCollection(const std::string &collectionType, const std::string &connection, const std::string &collectionName, unsigned int contextId=IPoolSvc::kInputStream) const =0