Class podio::CollectionBase

class CollectionBase

Subclassed by podio::UserDataCollection< BasicType, typename >

Public Functions

CollectionBase(const CollectionBase&) = delete

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

CollectionBase &operator=(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(uint32_t id) = 0

set collection ID

virtual uint32_t getID() const = 0

get collection ID

virtual podio::CollectionWriteBuffers getBuffers() = 0

Get the collection buffers for this collection.

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 bool empty() const = 0

Is the collection empty.

virtual const std::string_view getTypeName() const = 0

fully qualified type name

virtual const std::string_view getValueTypeName() const = 0

fully qualified type name of elements - with namespace

virtual const std::string_view getDataTypeName() const = 0

fully qualified type name of stored POD elements - with namespace

virtual SchemaVersionT getSchemaVersion() const = 0

schema version of the collection

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.