ATLAS Offline Software
ICollectionDescription.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 COLLECTIONBASE_ICOLLECTIONDESCRIPTION_H
6 #define COLLECTIONBASE_ICOLLECTIONDESCRIPTION_H
7 
8 #include <string>
9 #include <vector>
10 #include <typeinfo>
11 
12 
13 namespace pool {
14 
15  class ICollectionColumn;
16  class ICollectionIndex;
17 
26  {
27  public:
29  virtual const std::string& name() const = 0;
30 
32  virtual const std::string& type() const = 0;
33 
35  virtual const std::string& connection() const = 0;
36 
41  virtual const std::string& eventReferenceColumnName() const = 0;
42 
46  virtual bool hasEventReferenceColumn() const = 0;
47 
52  virtual int numberOfColumns() const = 0;
53 
60  virtual const ICollectionColumn& column( const std::string& columnName ) const = 0;
61 
63  virtual const ICollectionColumn* columnPtr( const std::string& columnName ) const = 0;
64 
68  virtual int numberOfTokenColumns() const = 0;
69 
76  virtual const ICollectionColumn& tokenColumn( const std::string& columnName ) const = 0;
77 
84  virtual const ICollectionColumn& tokenColumn( int columnId ) const = 0;
85 
89  virtual int numberOfAttributeColumns( ) const = 0;
90 
97  virtual const ICollectionColumn& attributeColumn( const std::string& columnName ) const = 0;
98 
105  virtual const ICollectionColumn& attributeColumn( int columnId ) const = 0;
106 
110  virtual int numberOfIndices() const = 0;
111 
118  virtual const ICollectionIndex& index( const std::string& columnName ) const = 0;
119 
126  virtual const ICollectionIndex& index( const std::vector<std::string>& columnNames ) const = 0;
127 
134  virtual const ICollectionIndex& index( int indexId ) const = 0;
135 
141  virtual bool equals( const ICollectionDescription& rhs ) const = 0;
142 
149  virtual bool isSubsetOf( const ICollectionDescription& rhs ) const = 0;
150 
152  virtual void printOut() const {}
153 
154  protected:
157  };
158 
159 }
160 
161 #endif
162 
pool::ICollectionDescription::attributeColumn
virtual const ICollectionColumn & attributeColumn(const std::string &columnName) const =0
Returns a description object for an Attribute column of the collection, given the name of the column.
pool::ICollectionDescription::eventReferenceColumnName
virtual const std::string & eventReferenceColumnName() const =0
Returns the name reserved for the event reference Token column.
pool::ICollectionDescription::name
virtual const std::string & name() const =0
Returns the name of the collection.
pool::ICollectionDescription::tokenColumn
virtual const ICollectionColumn & tokenColumn(int columnId) const =0
Returns a description object for a Token column of the collection, given the position of the column.
pool::ICollectionDescription::attributeColumn
virtual const ICollectionColumn & attributeColumn(int columnId) const =0
Returns a description object for an Attribute column of the collection, given the position of the col...
pool::ICollectionDescription::numberOfAttributeColumns
virtual int numberOfAttributeColumns() const =0
Returns the number of Attribute columns.
pool::ICollectionDescription::numberOfTokenColumns
virtual int numberOfTokenColumns() const =0
Returns the number of Token columns (including the event reference column if it is used)
pool
pool namespace
Definition: libname.h:15
pool::ICollectionDescription::numberOfColumns
virtual int numberOfColumns() const =0
Returns the number of columns (including the event reference column if it is used) in the collection.
pool::ICollectionDescription::type
virtual const std::string & type() const =0
Returns the storage technology type of the collection.
pool::ICollectionDescription::column
virtual const ICollectionColumn & column(const std::string &columnName) const =0
Returns a description object for a column of the collection, given the name of the column.
pool::ICollectionDescription::index
virtual const ICollectionIndex & index(const std::vector< std::string > &columnNames) const =0
Returns a description object for an index of the collection, given the names of the columns on which ...
pool::ICollectionDescription::connection
virtual const std::string & connection() const =0
Returns the connection to the database containing the collection.
pool::ICollectionDescription::tokenColumn
virtual const ICollectionColumn & tokenColumn(const std::string &columnName) const =0
Returns a description object for a Token column of the collection, given the name of the column.
pool::ICollectionDescription::hasEventReferenceColumn
virtual bool hasEventReferenceColumn() const =0
Indicates whether the collection contains the event reference column.
pool::ICollectionDescription::~ICollectionDescription
virtual ~ICollectionDescription()
Empty destructor.
Definition: ICollectionDescription.h:156
pool::ICollectionColumn
Definition: ICollectionColumn.h:19
pool::ICollectionDescription::isSubsetOf
virtual bool isSubsetOf(const ICollectionDescription &rhs) const =0
Check if all columns from this Description are present in the rhs Description and if they have the sa...
pool::ICollectionDescription::index
virtual const ICollectionIndex & index(int indexId) const =0
Returns a description object for an index of the collection, given the ID number of the index.
pool::ICollectionDescription::equals
virtual bool equals(const ICollectionDescription &rhs) const =0
Check if both Descriptions have the same columns.
pool::ICollectionDescription::printOut
virtual void printOut() const
print out the description (optional debugging)
Definition: ICollectionDescription.h:152
pool::ICollectionIndex
Definition: ICollectionIndex.h:20
pool::ICollectionDescription::numberOfIndices
virtual int numberOfIndices() const =0
Returns the number of indices used by the collection.
pool::ICollectionDescription::columnPtr
virtual const ICollectionColumn * columnPtr(const std::string &columnName) const =0
return pointer to Column or NULL if it's not found (will not throw exceptions)
pool::ICollectionDescription::index
virtual const ICollectionIndex & index(const std::string &columnName) const =0
Returns a description object for an index of the collection, given the name of the column on which th...
pool::ICollectionDescription
Definition: ICollectionDescription.h:26