File LinkCollectionImpl.h

namespace podio

Functions

template<typename FromT, typename ToT>
std::ostream &operator<<(std::ostream &o, const LinkCollection<FromT, ToT> &v)
template<typename FromT, typename ToT>
class LinkCollection : public podio::CollectionBase
#include <podio/detail/LinkCollectionImpl.h>

Public Types

using from_type = FromT
using to_type = ToT
using value_type = Link<FromT, ToT>
using mutable_type = MutableLink<FromT, ToT>
using const_iterator = LinkCollectionIterator<FromT, ToT>
using iterator = LinkMutableCollectionIterator<FromT, ToT>
using difference_type = ptrdiff_t
using size_type = size_t
using const_reverse_iterator = std::reverse_iterator<const_iterator>
using reverse_iterator = std::reverse_iterator<iterator>

Public Functions

LinkCollection() = default
inline LinkCollection(CollectionDataT &&data, bool isSubsetColl)
LinkCollection(const LinkCollection&) = delete
LinkCollection &operator=(const LinkCollection&) = delete
LinkCollection(LinkCollection&&) = default
LinkCollection &operator=(LinkCollection&&) = default
inline ~LinkCollection() override
inline mutable_type create()

Append a new link to the collection and return this object.

inline value_type operator[](std::size_t index) const

Returns the immutable object of given index.

inline mutable_type operator[](std::size_t index)

Returns the mutable object of given index.

inline value_type at(std::size_t index) const

Returns the immutable object of given index.

inline mutable_type at(std::size_t index)

Returns the mutable object of given index.

inline void push_back(mutable_type object)
inline void push_back(value_type object)
inline virtual size_t size() const override

Number of elements in the collection.

inline virtual std::size_t max_size() const override

maximal number of elements in the collection

inline virtual bool empty() const override

Is the collection empty.

inline virtual void clear() override

clear the collection and all internal states

inline virtual void print(std::ostream &os = std::cout, bool flush = true) const override

print this collection to the passed stream

inline const_iterator begin() const
inline const_iterator cbegin() const
inline const_iterator end() const
inline const_iterator cend() const
inline iterator begin()
inline iterator end()
inline reverse_iterator rbegin()
inline const_reverse_iterator rbegin() const
inline const_reverse_iterator crbegin() const
inline reverse_iterator rend()
inline const_reverse_iterator rend() const
inline const_reverse_iterator crend() const
inline virtual bool isValid() const override

check for validity of the container after read

inline virtual podio::CollectionWriteBuffers getBuffers() override

Get the collection buffers for this collection.

inline virtual const std::string_view getTypeName() const override

fully qualified type name

inline virtual const std::string_view getValueTypeName() const override

fully qualified type name of elements - with namespace

inline virtual const std::string_view getDataTypeName() const override

fully qualified type name of stored POD elements - with namespace

inline virtual bool isSubsetCollection() const override

check if this collection is a subset collection

inline virtual void setSubsetCollection(bool setSubset = true) override

declare this collection to be a subset collection

inline virtual void setID(uint32_t id) override

set collection ID

inline virtual uint32_t getID() const override

get collection ID

inline virtual void prepareForWrite() const override

prepare buffers for serialization

inline virtual void prepareAfterRead() override

re-create collection from buffers after read

inline virtual bool setReferences(const ICollectionProvider *collectionProvider) override

initialize references after read

inline virtual SchemaVersionT getSchemaVersion() const override

schema version of the collection

inline virtual size_t getDatamodelRegistryIndex() const override

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

Public Static Functions

static inline void __cppyy_pythonize__(PyObject *klass, const std::string &name)

Cppyy protocol to setup the pythonizations for this class. Not to be called directly.

Public Static Attributes

static std::string_view typeName = podio::utils::static_concatenate_v<podio::detail::link_coll_name_prefix, FromT::typeName, podio::detail::link_name_infix, ToT::typeName, podio::detail::link_name_suffix>
static std::string_view valueTypeName = value_type::typeName
static std::string_view dataTypeName = "podio::LinkData"
static SchemaVersionT schemaVersion = 1

Private Types

using CollectionDataT = podio::LinkCollectionData<FromT, ToT>

Private Members

friend CollectionDataT
bool m_isValid = {false}
mutable bool m_isPrepared = {false}
bool m_isSubsetColl = {false}
uint32_t m_collectionID = {0}
mutable std::unique_ptr<std::mutex> m_storageMtx = {std::make_unique<std::mutex>()}
mutable CollectionDataT m_storage = {}