PODIO v00-16-03
An Event-Data-Model Toolkit for High Energy Physics Experiments
Loading...
Searching...
No Matches
podio::CollectionBase Class Referenceabstract

#include <CollectionBase.h>

+ Inheritance diagram for podio::CollectionBase:

Public Member Functions

 CollectionBase (const CollectionBase &)=delete
 No copy c'tor because collections are move-only.
 
CollectionBaseoperator= (const CollectionBase &)=delete
 No copy assignment because collections are move-only.
 
virtual void prepareForWrite () const =0
 prepare buffers for serialization
 
virtual void prepareAfterRead ()=0
 re-create collection from buffers after read
 
virtual bool setReferences (const ICollectionProvider *collectionProvider)=0
 initialize references after read
 
virtual void setID (unsigned id)=0
 set collection ID
 
virtual unsigned getID () const =0
 get collection ID
 
virtual podio::CollectionWriteBuffers getBuffers ()=0
 Get the collection buffers for this collection.
 
virtual podio::CollectionReadBuffers createBuffers ()=0
 Create (empty) collection buffers from which a collection can be constructed.
 
virtual bool isValid () const =0
 check for validity of the container after read
 
virtual size_t size () const =0
 number of elements in the collection
 
virtual std::string getTypeName () const =0
 fully qualified type name
 
virtual std::string getValueTypeName () const =0
 fully qualified type name of elements - with namespace
 
virtual std::string getDataTypeName () const =0
 fully qualified type name of stored POD elements - with namespace
 
virtual ~CollectionBase ()=default
 destructor
 
virtual void clear ()=0
 clear the collection and all internal states
 
virtual bool isSubsetCollection () const =0
 check if this collection is a subset collection
 
virtual void setSubsetCollection (bool setSubset=true)=0
 declare this collection to be a subset collection
 
virtual void print (std::ostream &os=std::cout, bool flush=true) const =0
 print this collection to the passed stream
 
virtual size_t getDatamodelRegistryIndex () const =0
 Get the index in the DatatypeRegistry of the EDM this collection belongs to.
 

Protected Member Functions

 CollectionBase ()=default
 default constructor
 
 CollectionBase (CollectionBase &&)=default
 Move constructor.
 
CollectionBaseoperator= (CollectionBase &&)=default
 Move assignment.
 

Detailed Description

Definition at line 16 of file CollectionBase.h.

Constructor & Destructor Documentation

◆ CollectionBase() [1/3]

podio::CollectionBase::CollectionBase ( )
protecteddefault

default constructor

◆ CollectionBase() [2/3]

podio::CollectionBase::CollectionBase ( CollectionBase &&  )
protecteddefault

Move constructor.

◆ CollectionBase() [3/3]

podio::CollectionBase::CollectionBase ( const CollectionBase )
delete

No copy c'tor because collections are move-only.

◆ ~CollectionBase()

virtual podio::CollectionBase::~CollectionBase ( )
virtualdefault

destructor

Member Function Documentation

◆ clear()

virtual void podio::CollectionBase::clear ( )
pure virtual

clear the collection and all internal states

Implemented in podio::UserDataCollection< BasicType, typename >.

◆ createBuffers()

virtual podio::CollectionReadBuffers podio::CollectionBase::createBuffers ( )
pure virtual

Create (empty) collection buffers from which a collection can be constructed.

Implemented in podio::UserDataCollection< BasicType, typename >.

◆ getBuffers()

virtual podio::CollectionWriteBuffers podio::CollectionBase::getBuffers ( )
pure virtual

Get the collection buffers for this collection.

Implemented in podio::UserDataCollection< BasicType, typename >.

Referenced by podio::SIOBlock::setCollection().

◆ getDatamodelRegistryIndex()

virtual size_t podio::CollectionBase::getDatamodelRegistryIndex ( ) const
pure virtual

Get the index in the DatatypeRegistry of the EDM this collection belongs to.

Implemented in podio::UserDataCollection< BasicType, typename >.

Referenced by podio::DatamodelDefinitionCollector::registerDatamodelDefinition().

◆ getDataTypeName()

virtual std::string podio::CollectionBase::getDataTypeName ( ) const
pure virtual

fully qualified type name of stored POD elements - with namespace

Implemented in podio::UserDataCollection< BasicType, typename >.

◆ getID()

virtual unsigned podio::CollectionBase::getID ( ) const
pure virtual

get collection ID

Implemented in podio::UserDataCollection< BasicType, typename >.

◆ getTypeName()

virtual std::string podio::CollectionBase::getTypeName ( ) const
pure virtual

fully qualified type name

Implemented in podio::UserDataCollection< BasicType, typename >.

◆ getValueTypeName()

virtual std::string podio::CollectionBase::getValueTypeName ( ) const
pure virtual

◆ isSubsetCollection()

virtual bool podio::CollectionBase::isSubsetCollection ( ) const
pure virtual

◆ isValid()

virtual bool podio::CollectionBase::isValid ( ) const
pure virtual

check for validity of the container after read

Implemented in podio::UserDataCollection< BasicType, typename >.

◆ operator=() [1/2]

CollectionBase & podio::CollectionBase::operator= ( CollectionBase &&  )
protecteddefault

Move assignment.

◆ operator=() [2/2]

CollectionBase & podio::CollectionBase::operator= ( const CollectionBase )
delete

No copy assignment because collections are move-only.

◆ prepareAfterRead()

virtual void podio::CollectionBase::prepareAfterRead ( )
pure virtual

re-create collection from buffers after read

Implemented in podio::UserDataCollection< BasicType, typename >.

◆ prepareForWrite()

virtual void podio::CollectionBase::prepareForWrite ( ) const
pure virtual

prepare buffers for serialization

Implemented in podio::UserDataCollection< BasicType, typename >.

Referenced by podio::Frame::getCollectionForWrite().

◆ print()

virtual void podio::CollectionBase::print ( std::ostream &  os = std::cout,
bool  flush = true 
) const
pure virtual

print this collection to the passed stream

Implemented in podio::UserDataCollection< BasicType, typename >.

◆ setID()

virtual void podio::CollectionBase::setID ( unsigned  id)
pure virtual

◆ setReferences()

virtual bool podio::CollectionBase::setReferences ( const ICollectionProvider collectionProvider)
pure virtual

initialize references after read

Implemented in podio::UserDataCollection< BasicType, typename >.

◆ setSubsetCollection()

virtual void podio::CollectionBase::setSubsetCollection ( bool  setSubset = true)
pure virtual

declare this collection to be a subset collection

Implemented in podio::UserDataCollection< BasicType, typename >.

◆ size()

virtual size_t podio::CollectionBase::size ( ) const
pure virtual

number of elements in the collection

Implemented in podio::UserDataCollection< BasicType, typename >.


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