ATLAS Offline Software
Public Member Functions | Protected Attributes | List of all members
pool::ImplicitCollectionIterator Class Reference

#include <Implicitcollection/ImplicitCollectionIterator.h>

Inheritance diagram for pool::ImplicitCollectionIterator:
Collaboration diagram for pool::ImplicitCollectionIterator:

Public Member Functions

 ImplicitCollectionIterator (IContainer &container, const pool::ICollectionDescription &description)
 Constructor. More...
 
virtual void setCondition (const std::string &whereClause, coral::AttributeList *attributeBindData=0, TokenList *tokenBindData=0)
 Sets the query. More...
 
virtual const std::string & whereClause () const
 Returns the where clause of the query. More...
 
virtual pool::ICollectionCursorexecute ()
 Processes the query and returns a cursor over the query result. More...
 
virtual bool next ()
 Retrieves the next token in the collection. More...
 
virtual Tokentoken () const
 Returns the token of the current position. More...
 
virtual const TokeneventRef () const
 Returns the event reference Token for the current row. More...
 
virtual const CollectionRowBuffercurrentRow () const
 Returns the selected Tokens and Attributes for the current row of the query result set. More...
 
virtual bool seek (long long int position)
 Seek to a given position in the collection. More...
 
virtual int size ()
 Return the size of the collection. More...
 
virtual ~ImplicitCollectionIterator ()
 Destructor. More...
 
virtual void addToOutputList (const std::string &)
 Adds a column to the query select list. More...
 
virtual void addToOutputList (const std::vector< std::string > &)
 Adds one or more columns to the query select list. More...
 
virtual void selectAllAttributes ()
 Adds all Attribute columns to the query select list. More...
 
virtual void selectAllTokens ()
 Adds all Token columns to the query select list. More...
 
virtual void selectAll ()
 Adds all Token and Attribute columns to the query select list. More...
 
virtual void addToCollectionFragmentList (const std::string &)
 
virtual void addToCollectionFragmentList (const std::vector< std::string > &)
 
virtual void addAllCollectionFragments ()
 
virtual void setRowCacheSize (int)
 Sets the cache size used to store the query result. More...
 
virtual void close ()
 Cleanup. More...
 
virtual void skipEventReference (bool=true)
 Tell the query to not include the primary event reference in the result by default (it can still beselected manually) Only relevant for explicit collections with attributes. More...
 

Protected Attributes

IContainerm_container
 
ITokenIteratorm_tokenIterator
 
Tokenm_token
 
CollectionRowBuffer m_rowBuffer
 
std::string m_whereClause
 

Detailed Description

Iterator over an implicit collection. Single class implementing both Query and Cursor interfaces to simplify backward compatibility

Definition at line 37 of file ImplicitCollectionIterator.h.

Constructor & Destructor Documentation

◆ ImplicitCollectionIterator()

pool::ImplicitCollectionIterator::ImplicitCollectionIterator ( IContainer container,
const pool::ICollectionDescription description 
)

Constructor.

◆ ~ImplicitCollectionIterator()

virtual pool::ImplicitCollectionIterator::~ImplicitCollectionIterator ( )
virtual

Destructor.

Member Function Documentation

◆ addAllCollectionFragments()

virtual void pool::ImplicitCollectionIterator::addAllCollectionFragments ( )
inlinevirtual

Definition at line 109 of file ImplicitCollectionIterator.h.

109 {}

◆ addToCollectionFragmentList() [1/2]

virtual void pool::ImplicitCollectionIterator::addToCollectionFragmentList ( const std::string &  )
inlinevirtual

Definition at line 107 of file ImplicitCollectionIterator.h.

107 {}

◆ addToCollectionFragmentList() [2/2]

virtual void pool::ImplicitCollectionIterator::addToCollectionFragmentList ( const std::vector< std::string > &  )
inlinevirtual

Definition at line 108 of file ImplicitCollectionIterator.h.

108 {}

◆ addToOutputList() [1/2]

virtual void pool::ImplicitCollectionIterator::addToOutputList ( const std::string &  columnName)
inlinevirtual

Adds a column to the query select list.

Parameters
columnNameName of Attribute column to select.

Implements pool::ICollectionQuery.

Definition at line 102 of file ImplicitCollectionIterator.h.

102 {}

◆ addToOutputList() [2/2]

virtual void pool::ImplicitCollectionIterator::addToOutputList ( const std::vector< std::string > &  columnNames)
inlinevirtual

Adds one or more columns to the query select list.

Parameters
columnNamesNames of Attribute columns to select.

Implements pool::ICollectionQuery.

Definition at line 103 of file ImplicitCollectionIterator.h.

103 {}

◆ close()

virtual void pool::ImplicitCollectionIterator::close ( )
inlinevirtual

Cleanup.

Implements pool::ICollectionCursor.

Definition at line 112 of file ImplicitCollectionIterator.h.

112 {}

◆ currentRow()

virtual const CollectionRowBuffer& pool::ImplicitCollectionIterator::currentRow ( ) const
virtual

Returns the selected Tokens and Attributes for the current row of the query result set.

Implements pool::ICollectionCursor.

◆ eventRef()

virtual const Token& pool::ImplicitCollectionIterator::eventRef ( ) const
inlinevirtual

Returns the event reference Token for the current row.

Implements pool::ICollectionCursor.

Definition at line 76 of file ImplicitCollectionIterator.h.

76 { return *token(); }

◆ execute()

virtual pool::ICollectionCursor& pool::ImplicitCollectionIterator::execute ( )
virtual

Processes the query and returns a cursor over the query result.

this method returns self

Implements pool::ICollectionQuery.

◆ next()

virtual bool pool::ImplicitCollectionIterator::next ( )
virtual

Retrieves the next token in the collection.

Returns false if the end of the collection has been reached.

Implements pool::ICollectionCursor.

◆ seek()

virtual bool pool::ImplicitCollectionIterator::seek ( long long int  position)
virtual

Seek to a given position in the collection.

Parameters
positionThe position to which to seek.
Returns
True if successful, false otherwise.

Implements pool::IPositionSeek.

◆ selectAll()

virtual void pool::ImplicitCollectionIterator::selectAll ( )
inlinevirtual

Adds all Token and Attribute columns to the query select list.

Implements pool::ICollectionQuery.

Definition at line 106 of file ImplicitCollectionIterator.h.

106 {}

◆ selectAllAttributes()

virtual void pool::ImplicitCollectionIterator::selectAllAttributes ( )
inlinevirtual

Adds all Attribute columns to the query select list.

Implements pool::ICollectionQuery.

Definition at line 104 of file ImplicitCollectionIterator.h.

104 {}

◆ selectAllTokens()

virtual void pool::ImplicitCollectionIterator::selectAllTokens ( )
inlinevirtual

Adds all Token columns to the query select list.

Implements pool::ICollectionQuery.

Definition at line 105 of file ImplicitCollectionIterator.h.

105 {}

◆ setCondition()

virtual void pool::ImplicitCollectionIterator::setCondition ( const std::string &  whereClause,
coral::AttributeList *  attributeBindData = 0,
TokenList tokenBindData = 0 
)
virtual

Sets the query.

Parameters
whereClauseThe query.
attributeBindData- unused
tokenBindData- unused

Implements pool::ICollectionQuery.

◆ setRowCacheSize()

virtual void pool::ImplicitCollectionIterator::setRowCacheSize ( int  rowCacheSize)
inlinevirtual

Sets the cache size used to store the query result.

Parameters
rowCacheSizeNumber of rows stored in cache before cache is flushed.

Implements pool::ICollectionQuery.

Definition at line 110 of file ImplicitCollectionIterator.h.

110 {}

◆ size()

virtual int pool::ImplicitCollectionIterator::size ( )
virtual

Return the size of the collection.

◆ skipEventReference()

virtual void pool::ICollectionQuery::skipEventReference ( bool  = true)
inlinevirtualinherited

Tell the query to not include the primary event reference in the result by default (it can still beselected manually) Only relevant for explicit collections with attributes.

Parameters
skipif true (the default) then skip the primary event reference

Reimplemented in pool::RootCollection::RootCollectionQuery, and pool::RootCollection::RNTCollectionQuery.

Definition at line 98 of file ICollectionQuery.h.

98 {}

◆ token()

virtual Token* pool::ImplicitCollectionIterator::token ( ) const
virtual

Returns the token of the current position.

◆ whereClause()

virtual const std::string& pool::ImplicitCollectionIterator::whereClause ( ) const
virtual

Returns the where clause of the query.

Implements pool::ICollectionQuery.

Member Data Documentation

◆ m_container

IContainer& pool::ImplicitCollectionIterator::m_container
protected

Definition at line 116 of file ImplicitCollectionIterator.h.

◆ m_rowBuffer

CollectionRowBuffer pool::ImplicitCollectionIterator::m_rowBuffer
mutableprotected

Definition at line 120 of file ImplicitCollectionIterator.h.

◆ m_token

Token* pool::ImplicitCollectionIterator::m_token
protected

Definition at line 118 of file ImplicitCollectionIterator.h.

◆ m_tokenIterator

ITokenIterator* pool::ImplicitCollectionIterator::m_tokenIterator
protected

Definition at line 117 of file ImplicitCollectionIterator.h.

◆ m_whereClause

std::string pool::ImplicitCollectionIterator::m_whereClause
protected

Definition at line 122 of file ImplicitCollectionIterator.h.


The documentation for this class was generated from the following file:
pool::ImplicitCollectionIterator::token
virtual Token * token() const
Returns the token of the current position.