ATLAS Offline Software
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
pool::RootCollection::RootCollectionSchemaEditor Class Reference

#include <CollectionBase/RootCollectionSchemaEditor.h>

Inheritance diagram for pool::RootCollection::RootCollectionSchemaEditor:
Collaboration diagram for pool::RootCollection::RootCollectionSchemaEditor:

Public Member Functions

 RootCollectionSchemaEditor (RootCollection &collection, CollectionDescription &description, TTree *tree)
 
virtual void setEventReferenceColumnName (const std::string &columnName)
 Sets the name of the event reference Token column. More...
 
virtual const ICollectionColumninsertColumn (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. More...
 
virtual const ICollectionColumninsertColumn (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. More...
 
virtual const ICollectionColumninsertTokenColumn (const std::string &columnName, const std::string &annotation="")
 Adds a new column of type pool::Token to the collection. More...
 
virtual const ICollectionColumnannotateColumn (const std::string &columnName, const std::string &annotation)
 add annotation to column More...
 
virtual void dropColumn (const std::string &columnName)
 Removes a column from the collection. More...
 
virtual void renameColumn (const std::string &oldName, const std::string &newName)
 Renames a column of the collection. More...
 
virtual ~RootCollectionSchemaEditor ()
 destructor. More...
 

Protected Member Functions

void addTreeBranch (const std::string &name, const std::string &type_name)
 
void readSchema ()
 
void createTreeBranches ()
 
void writeSchema ()
 

Protected Attributes

RootCollectionm_collection
 
CollectionDescriptionm_description
 
TTree * m_tree
 
bool m_schemaWritten
 
coral::MessageStream m_poolOut
 

Friends

class RootCollection
 

Detailed Description

An interface used to define the schema of a collection.

Definition at line 32 of file RootCollectionSchemaEditor.h.

Constructor & Destructor Documentation

◆ RootCollectionSchemaEditor()

pool::RootCollection::RootCollectionSchemaEditor::RootCollectionSchemaEditor ( RootCollection collection,
CollectionDescription description,
TTree *  tree 
)

◆ ~RootCollectionSchemaEditor()

virtual pool::RootCollection::RootCollectionSchemaEditor::~RootCollectionSchemaEditor ( )
virtual

destructor.

Member Function Documentation

◆ addTreeBranch()

void pool::RootCollection::RootCollectionSchemaEditor::addTreeBranch ( const std::string &  name,
const std::string &  type_name 
)
protected

◆ annotateColumn()

virtual const ICollectionColumn& pool::RootCollection::RootCollectionSchemaEditor::annotateColumn ( const std::string &  columnName,
const std::string &  annotation 
)
virtual

add annotation to column

Implements pool::ICollectionSchemaEditor.

◆ createTreeBranches()

void pool::RootCollection::RootCollectionSchemaEditor::createTreeBranches ( )
protected

◆ dropColumn()

virtual void pool::RootCollection::RootCollectionSchemaEditor::dropColumn ( const std::string &  columnName)
virtual

Removes a column from the collection.

Parameters
columnNameName of column to be removed.

Implements pool::ICollectionSchemaEditor.

◆ insertColumn() [1/2]

virtual const ICollectionColumn& pool::RootCollection::RootCollectionSchemaEditor::insertColumn ( const std::string &  columnName,
const std::string &  columnType,
const std::string &  annotation = "",
int  maxSize = 0,
bool  sizeIsFixed = true 
)
virtual

Adds a new column to the collection.

Parameters
columnNameName of new column.
columnTypeData type of new column.
maxSizeMaximum size of column data type (useful for string or blob data types).
sizeIsFixedFlag indicating whether size of column data type is fixed (useful for string or blob data types).

Implements pool::ICollectionSchemaEditor.

◆ insertColumn() [2/2]

virtual const ICollectionColumn& pool::RootCollection::RootCollectionSchemaEditor::insertColumn ( const std::string &  columnName,
const std::type_info &  columnType,
const std::string &  annotation = "",
int  maxSize = 0,
bool  sizeIsFixed = true 
)
virtual

Adds a new column to the collection.

Parameters
columnNameName of new column.
columnTypeData type of new column.
maxSizeMaximum size of column data type (useful for string or blob data types).
sizeIsFixedFlag indicating whether size of column data type is fixed (useful for string or blob data types).

Implements pool::ICollectionSchemaEditor.

◆ insertTokenColumn()

virtual const ICollectionColumn& pool::RootCollection::RootCollectionSchemaEditor::insertTokenColumn ( const std::string &  columnName,
const std::string &  annotation = "" 
)
virtual

Adds a new column of type pool::Token to the collection.

Parameters
columnNameName of new column.

Implements pool::ICollectionSchemaEditor.

◆ readSchema()

void pool::RootCollection::RootCollectionSchemaEditor::readSchema ( )
protected

◆ renameColumn()

virtual void pool::RootCollection::RootCollectionSchemaEditor::renameColumn ( const std::string &  oldName,
const std::string &  newName 
)
virtual

Renames a column of the collection.

Parameters
oldNameOld name of column.
newNameNew name of column.

Implements pool::ICollectionSchemaEditor.

◆ setEventReferenceColumnName()

virtual void pool::RootCollection::RootCollectionSchemaEditor::setEventReferenceColumnName ( const std::string &  columnName)
virtual

Sets the name of the event reference Token column.

Otherwise a default name is used.

Parameters
columnNameName of event reference Token column.

Implements pool::ICollectionSchemaEditor.

◆ writeSchema()

void pool::RootCollection::RootCollectionSchemaEditor::writeSchema ( )
protected

Friends And Related Function Documentation

◆ RootCollection

friend class RootCollection
friend

Definition at line 35 of file RootCollectionSchemaEditor.h.

Member Data Documentation

◆ m_collection

RootCollection& pool::RootCollection::RootCollectionSchemaEditor::m_collection
protected

Definition at line 121 of file RootCollectionSchemaEditor.h.

◆ m_description

CollectionDescription& pool::RootCollection::RootCollectionSchemaEditor::m_description
protected

Definition at line 123 of file RootCollectionSchemaEditor.h.

◆ m_poolOut

coral::MessageStream pool::RootCollection::RootCollectionSchemaEditor::m_poolOut
protected

Definition at line 129 of file RootCollectionSchemaEditor.h.

◆ m_schemaWritten

bool pool::RootCollection::RootCollectionSchemaEditor::m_schemaWritten
protected

Definition at line 127 of file RootCollectionSchemaEditor.h.

◆ m_tree

TTree* pool::RootCollection::RootCollectionSchemaEditor::m_tree
protected

Definition at line 125 of file RootCollectionSchemaEditor.h.


The documentation for this class was generated from the following file: