![]() |
ATLAS Offline Software
|
An implementation of the ICollectionDescription interface used to define the properties of a collection to be constructed and to retrieve these properties after construction. More...
#include <CollectionSvc/CollectionDescription.h>
Public Member Functions | |
| 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. | |
| CollectionDescription (const ICollectionDescription &rhs) | |
| Copy constructor. | |
| CollectionDescription (const CollectionDescription &rhs) | |
| virtual | ~CollectionDescription () |
| Default destructor. | |
| CollectionDescription & | operator= (const ICollectionDescription &rhs) |
| Assignment operator. | |
| CollectionDescription & | operator= (const CollectionDescription &rhs) |
| CollectionDescription & | operator= (CollectionDescription &&rhs) |
| CollectionDescription (CollectionDescription &&)=default | |
| virtual void | setName (const std::string &name) |
| Sets the name of the collection. | |
| virtual void | setType (const std::string &type) |
| Sets the storage technology type of the collection. | |
| virtual void | setConnection (const std::string &connection) |
| Sets the connection to the database containing 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::string &columnType, int maxSize=0, bool sizeIsFixed=true) |
| Adds a new column to the collection. | |
| virtual const ICollectionColumn & | insertTokenColumn (const std::string &columnName) |
| Adds a new column of type pool::Token to the collection. | |
| virtual const std::string & | name () const |
| Returns the name of the collection and the top level collection fragment. | |
| virtual const std::string & | type () const |
| Returns the storage technology type of the collection. | |
| virtual const std::string & | connection () const |
| Returns the connection to the database containing the collection. | |
| virtual const std::string & | eventReferenceColumnName () const |
| Returns the name reserved for the event reference Token column. | |
| virtual int | numberOfTokenColumns () const |
| Returns the number of Token columns (including the event reference column if it is used) | |
| 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 const ICollectionColumn & | attributeColumn (int columnId) const |
| Returns a description object for an Attribute column of the collection, given the position of the column. | |
| virtual int | setColumnId (const std::string &columnName, int id, const std::string &methodName) |
Protected Member Functions | |
| virtual void | copyFrom (const ICollectionDescription &rhs) |
| make this description a copy of 'rhs' | |
| virtual void | clearAll () |
| virtual int | setColumnId (pool::CollectionColumn *column, int id=-1) |
| virtual void | checkNewColumnName (const std::string &name, const std::string &method) const |
| virtual pool::CollectionColumn * | column (const std::string &columnName, const std::string &methodName) |
| virtual const pool::CollectionColumn * | column (const std::string &columnName, const std::string &methodName) const |
Private Types | |
| typedef std::map< std::string, CollectionColumn * > | ColumnByName |
Private Attributes | |
| std::string | m_name |
| Name of the collection. | |
| std::string | m_type |
| Storage technology type of collection. | |
| std::string | m_connection |
| Connection to database containing collection. | |
| std::string | m_eventReferenceColumnName |
| Name of event reference column. | |
| std::vector< pool::CollectionColumn * > | m_tokenColumns |
| std::vector< pool::CollectionColumn * > | m_attributeColumns |
| Attribute column description objects. | |
| std::map< std::string, int > | m_columnIdForColumnName |
| Map of column ID numbers for column names IDs are unique in the collection. | |
| ColumnByName | m_tokenColumnForColumnName |
| Map of Token CollectionColumn objects using column names as keys. | |
| ColumnByName | m_attributeColumnForColumnName |
| Map of Attribute CollectionColumn objects using column names as keys. | |
An implementation of the ICollectionDescription interface used to define the properties of a collection to be constructed and to retrieve these properties after construction.
The schema editor of the collection should be used for any modifications to these properties after construction.
Definition at line 26 of file CollectionDescription.h.
|
private |
Definition at line 211 of file CollectionDescription.h.
| pool::CollectionDescription::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.
An event reference Token column is inserted by default but may be renamed via a call to ‘setEventReferenceColumnName’.
| pool::CollectionDescription::CollectionDescription | ( | const ICollectionDescription & | rhs | ) |
Copy constructor.
| rhs | Collection description object to copy. |
| pool::CollectionDescription::CollectionDescription | ( | const CollectionDescription & | rhs | ) |
|
virtual |
Default destructor.
|
default |
|
virtual |
Returns a description object for an Attribute column of the collection, given the position of the column.
| columnId | Position of column in associated collection fragment. |
Implements pool::ICollectionDescription.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
virtual |
Returns the connection to the database containing the collection.
Implements pool::ICollectionDescription.
|
protectedvirtual |
make this description a copy of 'rhs'
|
virtual |
Returns the name reserved for the event reference Token column.
If the name has not been set by the user a default name is returned.
Implements pool::ICollectionDescription.
|
virtual |
Adds a new column to the collection.
| columnName | Name of new column. |
| columnType | Data type of new column. |
| maxSize | Maximum size of column data type (useful for string or blob data types). |
| sizeIsFixed | Flag indicating whether size of column data type is fixed (useful for string or blob data types). |
|
virtual |
Adds a new column of type pool::Token to the collection.
| columnName | Name of new column. |
|
virtual |
Returns the name of the collection and the top level collection fragment.
Implements pool::ICollectionDescription.
|
virtual |
Returns the number of Attribute columns in the collection.
Implements pool::ICollectionDescription.
|
virtual |
Returns the number of Token columns (including the event reference column if it is used)
Implements pool::ICollectionDescription.
|
inline |
Definition at line 67 of file CollectionDescription.h.
|
inline |
Definition at line 63 of file CollectionDescription.h.
| CollectionDescription & pool::CollectionDescription::operator= | ( | const ICollectionDescription & | rhs | ) |
Assignment operator.
| rhs | source ICollectionDescription object to copy. |
|
virtual |
|
protectedvirtual |
|
virtual |
Sets the connection to the database containing the collection.
| connection | Connection to database where collection is stored. |
|
virtual |
|
virtual |
Sets the name of the collection.
| name | Name of collection. |
|
virtual |
Sets the storage technology type of the collection.
| type | Storage technology type of collection. |
|
virtual |
Returns a description object for a Token column of the collection, given the position of the column.
| columnId | Position of column in associated collection fragment. |
Implements pool::ICollectionDescription.
|
virtual |
Returns the storage technology type of the collection.
Implements pool::ICollectionDescription.
|
private |
Map of Attribute CollectionColumn objects using column names as keys.
Definition at line 216 of file CollectionDescription.h.
|
private |
Attribute column description objects.
Definition at line 205 of file CollectionDescription.h.
|
private |
Map of column ID numbers for column names IDs are unique in the collection.
Definition at line 209 of file CollectionDescription.h.
|
private |
Connection to database containing collection.
Definition at line 196 of file CollectionDescription.h.
|
private |
Name of event reference column.
Definition at line 199 of file CollectionDescription.h.
|
private |
Name of the collection.
Definition at line 190 of file CollectionDescription.h.
|
private |
Map of Token CollectionColumn objects using column names as keys.
Definition at line 213 of file CollectionDescription.h.
|
private |
Definition at line 202 of file CollectionDescription.h.
|
private |
Storage technology type of collection.
Definition at line 193 of file CollectionDescription.h.