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

#include <CollectionBase/RNTCollectionSchemaEditor.h>

Inheritance diagram for pool::RootCollection::RNTCollectionSchemaEditor:
Collaboration diagram for pool::RootCollection::RNTCollectionSchemaEditor:

Public Member Functions

 RNTCollectionSchemaEditor (RNTCollection &collection, CollectionDescription &description, RNTupleReader &reader)
 
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...
 
void readSchema ()
 get Collection Description from the RNTupleReader More...
 
virtual ~RNTCollectionSchemaEditor ()
 destructor. More...
 

Protected Member Functions

void addRNTupleField (const std::string &name, const std::string &type_name)
 
void createRNTuple ()
 

Protected Attributes

RNTCollectionm_collection
 
CollectionDescriptionm_description
 
RNTupleReaderm_reader
 
coral::MessageStream m_poolOut
 

Friends

class RNTCollection
 

Detailed Description

An interface used to define the schema of a collection.

Definition at line 36 of file RNTCollectionSchemaEditor.h.

Constructor & Destructor Documentation

◆ RNTCollectionSchemaEditor()

pool::RootCollection::RNTCollectionSchemaEditor::RNTCollectionSchemaEditor ( RNTCollection collection,
CollectionDescription description,
RNTupleReader reader 
)

◆ ~RNTCollectionSchemaEditor()

virtual pool::RootCollection::RNTCollectionSchemaEditor::~RNTCollectionSchemaEditor ( )
virtual

destructor.

Member Function Documentation

◆ addRNTupleField()

void pool::RootCollection::RNTCollectionSchemaEditor::addRNTupleField ( const std::string &  name,
const std::string &  type_name 
)
protected

◆ annotateColumn()

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

add annotation to column

Implements pool::ICollectionSchemaEditor.

◆ createRNTuple()

void pool::RootCollection::RNTCollectionSchemaEditor::createRNTuple ( )
protected

◆ dropColumn()

virtual void pool::RootCollection::RNTCollectionSchemaEditor::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::RNTCollectionSchemaEditor::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::RNTCollectionSchemaEditor::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::RNTCollectionSchemaEditor::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::RNTCollectionSchemaEditor::readSchema ( )

get Collection Description from the RNTupleReader

◆ renameColumn()

virtual void pool::RootCollection::RNTCollectionSchemaEditor::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::RNTCollectionSchemaEditor::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.

Friends And Related Function Documentation

◆ RNTCollection

friend class RNTCollection
friend

Definition at line 39 of file RNTCollectionSchemaEditor.h.

Member Data Documentation

◆ m_collection

RNTCollection& pool::RootCollection::RNTCollectionSchemaEditor::m_collection
protected

Definition at line 126 of file RNTCollectionSchemaEditor.h.

◆ m_description

CollectionDescription& pool::RootCollection::RNTCollectionSchemaEditor::m_description
protected

Definition at line 128 of file RNTCollectionSchemaEditor.h.

◆ m_poolOut

coral::MessageStream pool::RootCollection::RNTCollectionSchemaEditor::m_poolOut
protected

Definition at line 132 of file RNTCollectionSchemaEditor.h.

◆ m_reader

RNTupleReader& pool::RootCollection::RNTCollectionSchemaEditor::m_reader
protected

Definition at line 130 of file RNTCollectionSchemaEditor.h.


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