ATLAS Offline Software
ImplicitCollectionIterator.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef IMPLICITCOLLECTION_COLLECTIONITERATOR_H
6 #define IMPLICITCOLLECTION_COLLECTIONITERATOR_H
7 
8 //#include "CollectionBase/ICollectionDescription.h"
11 
13 
17 
18 class Token;
19 
20 namespace coral { class AttributeList; }
21 
22 namespace pool {
23 
24  // forward declarations
25  class IContainer;
26  class ITokenIterator;
27  class TokenList;
28  class ICollectionDescription;
29 
38  public ICollectionCursor,
39  virtual public IPositionSeek,
40  virtual public implements<ICollectionSize>
41  {
42  public:
46 
47  // ------------------- Query interface
48 
55  virtual void setCondition( const std::string& whereClause,
56  coral::AttributeList* attributeBindData = 0,
57  TokenList* tokenBindData = 0 ) ;
58 
60  virtual const std::string& whereClause() const;
61 
65 
66 
67  // ------------------- Cursor interface
68 
72  virtual bool next();
73 
75  virtual Token* token() const;
76  virtual const Token& eventRef() const { return *token(); }
77 
78  virtual const CollectionRowBuffer& currentRow() const;
79 
80  // ------------------- Seek interface
86  virtual bool seek (long long int position);
87 
91  virtual int size ();
92 
93 
94  //------------------------------------------
95 
98 
99 
100  // ------------------- Unimplemented methods
101 
102  virtual void addToOutputList( const std::string& ) {}
103  virtual void addToOutputList( const std::vector<std::string>& ) {}
104  virtual void selectAllAttributes() {}
105  virtual void selectAllTokens() {}
106  virtual void selectAll() {}
107  virtual void addToCollectionFragmentList( const std::string& ) {}
108  virtual void addToCollectionFragmentList( const std::vector< std::string >& ) {}
109  virtual void addAllCollectionFragments() {}
110  virtual void setRowCacheSize( int ) {}
111 
112  virtual void close() {}
113 
114 
115  protected:
119 
121 
122  std::string m_whereClause;
123  };
124 
125 }
126 
127 #endif
128 
129 
pool::IContainer
Definition: IContainer.h:23
pool::ImplicitCollectionIterator::currentRow
virtual const CollectionRowBuffer & currentRow() const
Returns the selected Tokens and Attributes for the current row of the query result set.
pool::ImplicitCollectionIterator::addToCollectionFragmentList
virtual void addToCollectionFragmentList(const std::vector< std::string > &)
Definition: ImplicitCollectionIterator.h:108
pool::ICollectionQuery
Definition: ICollectionQuery.h:27
pool::ImplicitCollectionIterator::next
virtual bool next()
Retrieves the next token in the collection.
pool::ImplicitCollectionIterator::setRowCacheSize
virtual void setRowCacheSize(int)
Sets the cache size used to store the query result.
Definition: ImplicitCollectionIterator.h:110
pool::ImplicitCollectionIterator::size
virtual int size()
Return the size of the collection.
pool::ImplicitCollectionIterator::m_tokenIterator
ITokenIterator * m_tokenIterator
Definition: ImplicitCollectionIterator.h:117
pool::ImplicitCollectionIterator::token
virtual Token * token() const
Returns the token of the current position.
ICollectionCursor.h
pool
pool namespace
Definition: libname.h:15
pool::ImplicitCollectionIterator::selectAllTokens
virtual void selectAllTokens()
Adds all Token columns to the query select list.
Definition: ImplicitCollectionIterator.h:105
ICollectionSize.h
Abstract interface for finding the size of an event collection.
pool::ImplicitCollectionIterator::m_rowBuffer
CollectionRowBuffer m_rowBuffer
Definition: ImplicitCollectionIterator.h:120
pool::ImplicitCollectionIterator::selectAllAttributes
virtual void selectAllAttributes()
Adds all Attribute columns to the query select list.
Definition: ImplicitCollectionIterator.h:104
python.PyKernel.AttributeList
AttributeList
Definition: PyKernel.py:36
pool::ImplicitCollectionIterator::whereClause
virtual const std::string & whereClause() const
Returns the where clause of the query.
Token
This class provides a token that identifies in a unique way objects on the persistent storage.
Definition: Token.h:21
coral
Definition: ISecondaryEventSelector.h:19
pool::TokenList
Definition: TokenList.h:24
CollectionRowBuffer.h
pool::ImplicitCollectionIterator::m_container
IContainer & m_container
Definition: ImplicitCollectionIterator.h:116
pool::ImplicitCollectionIterator
Definition: ImplicitCollectionIterator.h:41
pool::ImplicitCollectionIterator::seek
virtual bool seek(long long int position)
Seek to a given position in the collection.
IPositionSeek.h
Abstract interface for seeking within an event stream.
pool::ImplicitCollectionIterator::m_token
Token * m_token
Definition: ImplicitCollectionIterator.h:118
pool::ICollectionCursor
Definition: ICollectionCursor.h:21
pool::ITokenIterator
Definition: ITokenIterator.h:20
pool::ImplicitCollectionIterator::setCondition
virtual void setCondition(const std::string &whereClause, coral::AttributeList *attributeBindData=0, TokenList *tokenBindData=0)
Sets the query.
pool::ImplicitCollectionIterator::m_whereClause
std::string m_whereClause
Definition: ImplicitCollectionIterator.h:122
pool::ImplicitCollectionIterator::execute
virtual pool::ICollectionCursor & execute()
Processes the query and returns a cursor over the query result.
pool::CollectionRowBuffer
Definition: CollectionRowBuffer.h:31
pool::ImplicitCollectionIterator::selectAll
virtual void selectAll()
Adds all Token and Attribute columns to the query select list.
Definition: ImplicitCollectionIterator.h:106
pool::ImplicitCollectionIterator::close
virtual void close()
Cleanup.
Definition: ImplicitCollectionIterator.h:112
pool::ImplicitCollectionIterator::addToCollectionFragmentList
virtual void addToCollectionFragmentList(const std::string &)
Definition: ImplicitCollectionIterator.h:107
pool::IPositionSeek
Abstract interface for seeking inside a collection.
Definition: IPositionSeek.h:26
pool::ATLAS_NOT_THREAD_SAFE
DbStatus DbObjectHandle< T >::makeLink ATLAS_NOT_THREAD_SAFE(const Token *pToken, Token::OID_t &linkH) const
Add persistent association entry.
Definition: DbObject.h:220
pool::ImplicitCollectionIterator::addAllCollectionFragments
virtual void addAllCollectionFragments()
Definition: ImplicitCollectionIterator.h:109
pool::ImplicitCollectionIterator::ImplicitCollectionIterator
ImplicitCollectionIterator(IContainer &container, const pool::ICollectionDescription &description)
Constructor.
ICollectionQuery.h
pool::ImplicitCollectionIterator::~ImplicitCollectionIterator
virtual ~ImplicitCollectionIterator()
Destructor.
pool::ImplicitCollectionIterator::addToOutputList
virtual void addToOutputList(const std::vector< std::string > &)
Adds one or more columns to the query select list.
Definition: ImplicitCollectionIterator.h:103
pool::ImplicitCollectionIterator::eventRef
virtual const Token & eventRef() const
Returns the event reference Token for the current row.
Definition: ImplicitCollectionIterator.h:76
checker_macros.h
Define macros for attributes used to control the static checker.
pool::ImplicitCollectionIterator::addToOutputList
virtual void addToOutputList(const std::string &)
Adds a column to the query select list.
Definition: ImplicitCollectionIterator.h:102
pool::ICollectionDescription
Definition: ICollectionDescription.h:26
description
std::string description
glabal timer - how long have I taken so far?
Definition: hcg.cxx:88