ATLAS Offline Software
RootCollectionQuery.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 ROOTCOLLECTION_COLLECTIONQUERY_H
6 #define ROOTCOLLECTION_COLLECTIONQUERY_H
7 
8 #include "CoralBase/AttributeList.h"
9 
14 
15 #include "RootCollectionCursor.h"
16 
17 #include "TTree.h"
18 
19 #include <set>
20 
21 namespace pool {
22  namespace RootCollection {
23 
30  {
31  public:
34 
37 
43  virtual void addToOutputList( const std::string& columnName );
44 
50  virtual void addToOutputList( const std::vector<std::string>& columnNames );
51 
53  virtual void selectAllAttributes();
54 
56  virtual void selectAllTokens();
57 
59  virtual void selectAll();
60 
70  virtual void setCondition( const std::string& whereClause,
71  coral::AttributeList* attributeBindData = 0,
72  TokenList* tokenBindData = 0 ) ;
73 
75  virtual const std::string& whereClause() const;
76 
82  virtual void setRowCacheSize( int rowCacheSize );
83 
86 
93  virtual void skipEventReference( bool = true );
94 
95  protected:
96 
97  void addToTokenOutputList( const std::string& columnName );
98 
99  void addToAttributeOutputList( const std::string& columnName );
100 
101 
103 
104  TTree *m_tree;
105 
107 
108  std::string m_whereClause;
109 
112 
113  std::set< std::string > m_selectedColumnNames;
114  std::set< std::string > m_collectionFragmentNames;
115 
118  };
119 
120  }
121 }
122 
123 #endif
124 
125 
pool::RootCollection::RootCollectionQuery::selectAll
virtual void selectAll()
Adds all Token and Attribute columns to the query select list.
pool::ICollectionQuery
Definition: ICollectionQuery.h:27
TokenList.h
pool::RootCollection::RootCollectionQuery::m_skipEventRef
bool m_skipEventRef
If false, the primary event reference is added always to the query result.
Definition: RootCollectionQuery.h:117
pool::RootCollection::RootCollectionQuery::selectAllAttributes
virtual void selectAllAttributes()
Adds all Attribute columns to the query select list.
ICollectionCursor.h
tree
TChain * tree
Definition: tile_monitor.h:30
pool::RootCollection::RootCollectionQuery::m_tree
TTree * m_tree
Definition: RootCollectionQuery.h:104
pool
pool namespace
Definition: libname.h:15
pool::RootCollection::RootCollectionQuery::m_outputAttributeList
coral::AttributeList m_outputAttributeList
Definition: RootCollectionQuery.h:111
pool::RootCollection::RootCollectionQuery::skipEventReference
virtual void skipEventReference(bool=true)
Tell the query to not include the primary event reference in the result by default (it can still bese...
python.PyKernel.AttributeList
AttributeList
Definition: PyKernel.py:36
pool::RootCollection::RootCollectionQuery::m_cursor
RootCollectionCursor * m_cursor
Definition: RootCollectionQuery.h:106
pool::TokenList
Definition: TokenList.h:24
pool::RootCollection::RootCollectionQuery::addToAttributeOutputList
void addToAttributeOutputList(const std::string &columnName)
RootCollectionCursor.h
pool::RootCollection::RootCollectionQuery::m_selectedColumnNames
std::set< std::string > m_selectedColumnNames
Definition: RootCollectionQuery.h:113
pool::RootCollection::RootCollectionQuery::selectAllTokens
virtual void selectAllTokens()
Adds all Token columns to the query select list.
pool::RootCollection::RootCollectionQuery::~RootCollectionQuery
virtual ~RootCollectionQuery()
Destructor.
pool::RootCollection::RootCollectionQuery::m_whereClause
std::string m_whereClause
Definition: RootCollectionQuery.h:108
pool::ICollectionCursor
Definition: ICollectionCursor.h:21
pool::RootCollection::RootCollectionQuery::m_collectionFragmentNames
std::set< std::string > m_collectionFragmentNames
Definition: RootCollectionQuery.h:114
pool::RootCollection::RootCollectionQuery::addToOutputList
virtual void addToOutputList(const std::string &columnName)
Adds a column to the query select list.
pool::RootCollection::RootCollectionQuery::whereClause
virtual const std::string & whereClause() const
Returns the where clause of the query.
pool::RootCollection::RootCollectionQuery
Definition: RootCollectionQuery.h:30
pool::RootCollection::RootCollectionQuery::m_outputTokenList
pool::TokenList m_outputTokenList
Definition: RootCollectionQuery.h:110
pool::RootCollection::RootCollectionQuery::setRowCacheSize
virtual void setRowCacheSize(int rowCacheSize)
Sets the cache size used to store the query result.
ICollectionQuery.h
pool::RootCollection::RootCollectionQuery::addToOutputList
virtual void addToOutputList(const std::vector< std::string > &columnNames)
Adds one or more columns to the query select list.
pool::RootCollection::RootCollectionQuery::m_description
const ICollectionDescription & m_description
Definition: RootCollectionQuery.h:102
pool::RootCollection::RootCollectionQuery::RootCollectionQuery
RootCollectionQuery(const pool::ICollectionDescription &description, TTree *tree)
Constructor.
ICollectionDescription.h
pool::RootCollection::RootCollectionQuery::execute
virtual pool::ICollectionCursor & execute()
Processes the query and returns a cursor over the query result.
pool::RootCollection::RootCollectionQuery::setCondition
virtual void setCondition(const std::string &whereClause, coral::AttributeList *attributeBindData=0, TokenList *tokenBindData=0)
Sets the query.
pool::RootCollection::RootCollectionQuery::addToTokenOutputList
void addToTokenOutputList(const std::string &columnName)
pool::ICollectionDescription
Definition: ICollectionDescription.h:26
description
std::string description
glabal timer - how long have I taken so far?
Definition: hcg.cxx:88
pool::RootCollection::RootCollectionCursor
Definition: RootCollectionCursor.h:31