EDM4eic
EIC data model
Loading...
Searching...
No Matches
edm4eic::TensorCollection Class Reference

#include <TensorCollection.h>

Inheritance diagram for edm4eic::TensorCollection:

Public Types

using value_type = Tensor
 
using const_iterator = TensorCollectionIterator
 
using iterator = TensorMutableCollectionIterator
 

Public Member Functions

 TensorCollection ()
 
 TensorCollection (TensorCollectionData &&data, bool isSubsetColl)
 
 TensorCollection (const TensorCollection &)=delete
 
TensorCollectionoperator= (const TensorCollection &)=delete
 
 TensorCollection (TensorCollection &&)=default
 
TensorCollectionoperator= (TensorCollection &&)=default
 
 ~TensorCollection ()
 
void clear () final
 
void print (std::ostream &os=std::cout, bool flush=true) const final
 Print this collection to the passed stream.
 
TensorCollectionoperator-> ()
 operator to allow pointer like calling of members a la LCIO
 
MutableTensor create ()
 Append a new object to the collection, and return this object.
 
template<typename... Args>
MutableTensor create (Args &&... args)
 
std::size_t size () const final
 number of elements in the collection
 
bool empty () const final
 Is the collection empty.
 
const std::string_view getTypeName () const final
 fully qualified type name
 
const std::string_view getValueTypeName () const final
 fully qualified type name of elements - with namespace
 
const std::string_view getDataTypeName () const final
 fully qualified type name of stored POD elements - with namespace
 
podio::SchemaVersionT getSchemaVersion () const final
 schema version
 
bool isSubsetCollection () const final
 
void setSubsetCollection (bool setSubset=true) final
 
Tensor operator[] (std::size_t index) const
 Returns the const object of given index.
 
MutableTensor operator[] (std::size_t index)
 Returns the object of a given index.
 
Tensor at (std::size_t index) const
 Returns the const object of given index.
 
MutableTensor at (std::size_t index)
 Returns the object of given index.
 
void push_back (MutableTensor object)
 Append object to the collection.
 
void push_back (Tensor object)
 Append an object to the (subset) collection.
 
void prepareForWrite () const final
 
void prepareAfterRead () final
 
bool setReferences (const podio::ICollectionProvider *collectionProvider) final
 
podio::CollectionWriteBuffers getBuffers () final
 Get the collection buffers for this collection.
 
void setID (uint32_t ID) final
 
uint32_t getID () const final
 
bool isValid () const final
 
size_t getDatamodelRegistryIndex () const final
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
std::vector< std::int32_t > elementType (const size_t nElem=0) const
 

Static Public Attributes

static constexpr auto typeName = "edm4eic::TensorCollection"
 
static constexpr auto valueTypeName = "edm4eic::Tensor"
 
static constexpr auto dataTypeName = "edm4eic::TensorData"
 

Friends

class TensorCollectionData
 

Detailed Description

A Collection is identified by an ID.

Member Typedef Documentation

◆ const_iterator

◆ iterator

◆ value_type

Constructor & Destructor Documentation

◆ TensorCollection() [1/4]

edm4eic::TensorCollection::TensorCollection ( )

◆ TensorCollection() [2/4]

edm4eic::TensorCollection::TensorCollection ( TensorCollectionData && data,
bool isSubsetColl )

◆ TensorCollection() [3/4]

edm4eic::TensorCollection::TensorCollection ( const TensorCollection & )
delete

◆ TensorCollection() [4/4]

edm4eic::TensorCollection::TensorCollection ( TensorCollection && )
default

◆ ~TensorCollection()

edm4eic::TensorCollection::~TensorCollection ( )

Member Function Documentation

◆ at() [1/2]

MutableTensor edm4eic::TensorCollection::at ( std::size_t index)

Returns the object of given index.

◆ at() [2/2]

Tensor edm4eic::TensorCollection::at ( std::size_t index) const

Returns the const object of given index.

◆ begin() [1/2]

iterator edm4eic::TensorCollection::begin ( )
inline

◆ begin() [2/2]

const_iterator edm4eic::TensorCollection::begin ( ) const
inline

◆ clear()

void edm4eic::TensorCollection::clear ( )
final

◆ create() [1/2]

MutableTensor edm4eic::TensorCollection::create ( )

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

◆ create() [2/2]

template<typename... Args>
MutableTensor edm4eic::TensorCollection::create ( Args &&... args)

Append a new object to the collection, and return this object. Initialized with the parameters given

◆ elementType()

std::vector< std::int32_t > edm4eic::TensorCollection::elementType ( const size_t nElem = 0) const

◆ empty()

bool edm4eic::TensorCollection::empty ( ) const
final

Is the collection empty.

◆ end() [1/2]

iterator edm4eic::TensorCollection::end ( )
inline

◆ end() [2/2]

const_iterator edm4eic::TensorCollection::end ( ) const
inline

◆ getBuffers()

podio::CollectionWriteBuffers edm4eic::TensorCollection::getBuffers ( )
final

Get the collection buffers for this collection.

◆ getDatamodelRegistryIndex()

size_t edm4eic::TensorCollection::getDatamodelRegistryIndex ( ) const
final

◆ getDataTypeName()

const std::string_view edm4eic::TensorCollection::getDataTypeName ( ) const
inlinefinal

fully qualified type name of stored POD elements - with namespace

◆ getID()

uint32_t edm4eic::TensorCollection::getID ( ) const
inlinefinal

◆ getSchemaVersion()

podio::SchemaVersionT edm4eic::TensorCollection::getSchemaVersion ( ) const
final

schema version

◆ getTypeName()

const std::string_view edm4eic::TensorCollection::getTypeName ( ) const
inlinefinal

fully qualified type name

◆ getValueTypeName()

const std::string_view edm4eic::TensorCollection::getValueTypeName ( ) const
inlinefinal

fully qualified type name of elements - with namespace

◆ isSubsetCollection()

bool edm4eic::TensorCollection::isSubsetCollection ( ) const
inlinefinal

◆ isValid()

bool edm4eic::TensorCollection::isValid ( ) const
inlinefinal

◆ operator->()

TensorCollection * edm4eic::TensorCollection::operator-> ( )
inline

operator to allow pointer like calling of members a la LCIO

◆ operator=() [1/2]

TensorCollection & edm4eic::TensorCollection::operator= ( const TensorCollection & )
delete

◆ operator=() [2/2]

TensorCollection & edm4eic::TensorCollection::operator= ( TensorCollection && )
default

◆ operator[]() [1/2]

MutableTensor edm4eic::TensorCollection::operator[] ( std::size_t index)

Returns the object of a given index.

◆ operator[]() [2/2]

Tensor edm4eic::TensorCollection::operator[] ( std::size_t index) const

Returns the const object of given index.

◆ prepareAfterRead()

void edm4eic::TensorCollection::prepareAfterRead ( )
final

◆ prepareForWrite()

void edm4eic::TensorCollection::prepareForWrite ( ) const
final

◆ print()

void edm4eic::TensorCollection::print ( std::ostream & os = std::cout,
bool flush = true ) const
final

Print this collection to the passed stream.

◆ push_back() [1/2]

void edm4eic::TensorCollection::push_back ( MutableTensor object)

Append object to the collection.

◆ push_back() [2/2]

void edm4eic::TensorCollection::push_back ( Tensor object)

Append an object to the (subset) collection.

◆ setID()

void edm4eic::TensorCollection::setID ( uint32_t ID)
inlinefinal

◆ setReferences()

bool edm4eic::TensorCollection::setReferences ( const podio::ICollectionProvider * collectionProvider)
final

◆ setSubsetCollection()

void edm4eic::TensorCollection::setSubsetCollection ( bool setSubset = true)
final

◆ size()

std::size_t edm4eic::TensorCollection::size ( ) const
final

number of elements in the collection

Friends And Related Symbol Documentation

◆ TensorCollectionData

friend class TensorCollectionData
friend

Member Data Documentation

◆ dataTypeName

auto edm4eic::TensorCollection::dataTypeName = "edm4eic::TensorData"
staticconstexpr

◆ typeName

auto edm4eic::TensorCollection::typeName = "edm4eic::TensorCollection"
staticconstexpr

◆ valueTypeName

auto edm4eic::TensorCollection::valueTypeName = "edm4eic::Tensor"
staticconstexpr

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