Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef COLLECTIONBASE_COLLECTIONDESCRIPTION_H
6 #define COLLECTIONBASE_COLLECTIONDESCRIPTION_H
15 class CollectionColumn;
40 const std::string&
type,
136 const std::string& columnName,
137 const std::string& columnType,
138 const std::string& annotation =
"",
140 bool sizeIsFixed =
true );
151 const std::string& columnName,
152 const std::type_info& columnType,
153 const std::string& annotation =
"",
155 bool sizeIsFixed =
true );
163 const std::string& columnName,
164 const std::string& annotation =
"");
169 const std::string& columnName,
170 const std::string& annotation );
198 const std::string& newType,
200 bool sizeIsFixed =
true );
212 const std::type_info& newType,
214 bool sizeIsFixed =
true );
217 virtual const std::string&
name()
const;
220 virtual const std::string&
type()
const;
303 virtual int setColumnId(
const std::string& columnName,
int id,
const std::string& methodName );
virtual const ICollectionColumn & insertColumn(const std::string &columnName, const std::string &columnType, const std::string &annotation="", int maxSize=0, bool sizeIsFixed=true)
Adds a new column to the collection.
virtual const ICollectionColumn & column(const std::string &columnName) const
Returns a description object for a column of the collection, given the name of the column.
std::vector< pool::CollectionColumn * > m_tokenColumns
virtual void setConnection(const std::string &connection)
Sets the connection to the database containing the collection.
virtual const ICollectionColumn & insertTokenColumn(const std::string &columnName, const std::string &annotation="")
Adds a new column of type pool::Token to the collection.
std::string m_connection
Connection to database containing collection.
virtual void dropColumn(const std::string &columnName)
Removes a column from the collection description.
virtual void changeColumnType(const std::string &columnName, const std::string &newType, int maxSize=0, bool sizeIsFixed=true)
Changes the data type of a column in the collection description.
virtual const ICollectionColumn & attributeColumn(const std::string &columnName) const
Returns a description object for an Attribute column of the collection, given the name of the column.
virtual const std::string & name() const
Returns the name of the collection and the top level collection fragment.
std::string m_name
Name of the collection.
virtual bool hasEventReferenceColumn() const
Indicates whether the top level collection fragment contains the event reference column and is theref...
virtual const pool::CollectionColumn * column(const std::string &columnName, const std::string &methodName) const
virtual const ICollectionColumn & tokenColumn(const std::string &columnName) const
Returns a description object for a Token column of the collection, given the name of the column.
CollectionDescription & operator=(const ICollectionDescription &rhs)
Assignment operator.
std::map< std::string, int > m_columnIdForColumnName
Map of column ID numbers for column names IDs are unique in the collection.
virtual void setEventReferenceColumnName(const std::string &columnName)
Sets the name of the event reference Token column.
virtual const ICollectionColumn & insertColumn(const std::string &columnName, const std::type_info &columnType, const std::string &annotation="", int maxSize=0, bool sizeIsFixed=true)
Adds a new column to the collection.
virtual bool isTokenColumn(const std::string &columnName, const std::string &method) const
virtual const ICollectionColumn & annotateColumn(const std::string &columnName, const std::string &annotation)
add annotation to column
const std::vector< pool::CollectionColumn * > & tokenColumns() const
Returns the Token column description objects.
CollectionDescription(const std::string &name, const std::string &type, const std::string &connection="", const std::string &eventReferenceColumnName="")
Constructor that takes as input the minimum amount of properties needed to describe the collection.
std::vector< pool::CollectionColumn * > m_attributeColumns
Attribute column description objects.
virtual int numberOfColumns() const
Returns the number of columns (including the event reference column if it is used) in the collection.
virtual const std::string & eventReferenceColumnName() const
Returns the name reserved for the event reference Token column.
CollectionDescription & operator=(const CollectionDescription &rhs)
Assignment operator.
virtual int setColumnId(const std::string &columnName, int id, const std::string &methodName)
ColumnByName m_tokenColumnForColumnName
Map of Token CollectionColumn objects using column names as keys.
bool operator!=(const CollectionDescription &rhs) const
Inequality operator.
CollectionDescription(const CollectionDescription &rhs)
virtual const ICollectionColumn & attributeColumn(int columnId) const
Returns a description object for an Attribute column of the collection, given the position of the col...
virtual void printOut() const
print out the description (debugging)
virtual const std::string & connection() const
Returns the connection to the database containing the collection.
virtual void checkNewColumnName(const std::string &name, const std::string &method) const
virtual void setType(const std::string &type)
Sets the storage technology type of the collection.
virtual const ICollectionColumn * columnPtr(const std::string &columnName) const
return pointer to Column or NULL if it's not found (will not throw exceptions)
std::string m_eventReferenceColumnName
Name of event reference column.
const std::vector< pool::CollectionColumn * > & attributeColumns() const
Returns the Attribute column description objects.
virtual int numberOfTokenColumns() const
Returns the number of Token columns (including the event reference column if it is used)
virtual void changeColumnType(const std::string &columnName, const std::type_info &newType, int maxSize=0, bool sizeIsFixed=true)
Changes the data type of a column in the collection description.
virtual pool::CollectionColumn * column(const std::string &columnName, const std::string &methodName)
ColumnByName m_attributeColumnForColumnName
Map of Attribute CollectionColumn objects using column names as keys.
virtual void setName(const std::string &name)
Sets the name of the collection.
virtual const ICollectionColumn & tokenColumn(int columnId) const
Returns a description object for a Token column of the collection, given the position of the column.
virtual int numberOfAttributeColumns() const
Returns the number of Attribute columns in the collection.
virtual void copyFrom(const ICollectionDescription &rhs)
make this description a copy of 'rhs'
virtual bool equals(const ICollectionDescription &rhs) const
Check if both Descriptions have the same columns.
virtual const std::string & type() const
Returns the storage technology type of the collection.
bool operator==(const CollectionDescription &rhs) const
Equality operator.
virtual bool isSubsetOf(const ICollectionDescription &rhs) const
Check if all columns from this Description are present in the rhs Description and if they have the sa...
virtual void renameColumn(const std::string &oldName, const std::string &newName)
Renames a column of the collection description.
std::map< std::string, CollectionColumn * > ColumnByName
virtual ~CollectionDescription()
Default destructor.
std::string m_type
Storage technology type of collection.
CollectionDescription(const ICollectionDescription &rhs)
Copy constructor.
virtual int setColumnId(pool::CollectionColumn *column, int id=-1)