 |
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef COLLECTIONBASE_COLLECTIONDESCRIPTION_H
6 #define COLLECTIONBASE_COLLECTIONDESCRIPTION_H
16 class CollectionColumn;
41 const std::string&
type,
111 const std::string& columnName,
112 const std::string& columnType,
113 const std::string& annotation =
"",
115 bool sizeIsFixed =
true );
123 const std::string& columnName,
124 const std::string& annotation =
"");
128 virtual const std::string&
name()
const;
131 virtual const std::string&
type()
const;
169 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.
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 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 const pool::CollectionColumn * column(const std::string &columnName, const std::string &methodName) const
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 bool isTokenColumn(const std::string &columnName, const std::string &method) const
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 const std::string & eventReferenceColumnName() const
Returns the name reserved for the event reference Token column.
CollectionDescription & operator=(const CollectionDescription &rhs)
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.
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 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.
std::string m_eventReferenceColumnName
Name of event reference column.
CollectionDescription(CollectionDescription &&)=default
virtual int numberOfTokenColumns() const
Returns the number of Token columns (including the event reference column if it is used)
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 const std::string & type() const
Returns the storage technology type of the collection.
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)