3#ifndef EDM4EIC_MutableTensor_H
4#define EDM4EIC_MutableTensor_H
10#include "podio/RelationRange.h"
14#include "podio/utilities/MaybeSharedPtr.h"
18#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
19#include "nlohmann/json_fwd.hpp"
73 [[deprecated(
"use getElementType instead")]]
80 std::int64_t
getShape(std::size_t)
const;
81 std::vector<std::int64_t>::const_iterator
shape_begin()
const;
82 std::vector<std::int64_t>::const_iterator
shape_end()
const;
83 podio::RelationRange<std::int64_t>
getShape()
const;
94 std::vector<std::int64_t>::const_iterator
int64Data_end()
const;
102 void unlink() { m_obj = podio::utils::MaybeSharedPtr<TensorObj>{
nullptr}; }
119 swap(a.m_obj, b.m_obj);
124 explicit MutableTensor(podio::utils::MaybeSharedPtr<TensorObj> obj);
126 podio::utils::MaybeSharedPtr<TensorObj> m_obj{
nullptr};
129#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
130void to_json(nlohmann::json& j,
const MutableTensor& value);
Definition MutableTensor.h:31
bool isAvailable() const
check whether the object is actually available
Definition MutableTensor.cc:171
friend class Tensor
Definition MutableTensor.h:35
MutableTensor(const MutableTensor &other)=default
copy constructor
bool operator<(const MutableTensor &other) const
Definition MutableTensor.h:111
std::vector< float >::const_iterator floatData_end() const
Definition MutableTensor.cc:105
bool operator!=(const MutableTensor &other) const
Definition MutableTensor.h:107
MutableTensor & operator=(MutableTensor other)
copy-assignment operator
Definition MutableTensor.cc:26
bool operator!=(const Tensor &other) const
Definition MutableTensor.h:108
MutableTensor clone(bool cloneRelations=true) const
Definition MutableTensor.cc:31
void addToInt64Data(const std::int64_t &)
Definition MutableTensor.cc:130
void addToFloatData(const float &)
Definition MutableTensor.cc:94
podio::ObjectID id() const
Definition MutableTensor.h:113
friend class TensorCollection
Definition MutableTensor.h:33
MutableTensor()
default constructor
Definition MutableTensor.cc:18
podio::RelationRange< std::int64_t > getInt64Data() const
Definition MutableTensor.cc:158
friend void swap(MutableTensor &a, MutableTensor &b)
Definition MutableTensor.h:117
podio::RelationRange< float > getFloatData() const
Definition MutableTensor.cc:122
std::size_t floatData_size() const
Definition MutableTensor.cc:111
std::int32_t getElementType() const
Access the Data type in the same encoding as "ONNXTensorElementDataType", 1 - float,...
Definition MutableTensor.cc:50
~MutableTensor()=default
destructor
std::vector< std::int64_t >::const_iterator int64Data_end() const
Definition MutableTensor.cc:141
podio::RelationRange< std::int64_t > getShape() const
Definition MutableTensor.cc:86
std::vector< std::int64_t >::const_iterator int64Data_begin() const
Definition MutableTensor.cc:135
std::vector< std::int64_t >::const_iterator shape_begin() const
Definition MutableTensor.cc:63
bool operator==(const MutableTensor &other) const
Definition MutableTensor.h:104
std::size_t int64Data_size() const
Definition MutableTensor.cc:147
std::int32_t & elementType()
Get reference to Data type in the same encoding as "ONNXTensorElementDataType", 1 - float,...
Definition MutableTensor.cc:55
void setElementType(std::int32_t value)
Set the Data type in the same encoding as "ONNXTensorElementDataType", 1 - float, 7 - int64.
Definition MutableTensor.cc:53
std::vector< float >::const_iterator floatData_begin() const
Definition MutableTensor.cc:99
std::size_t shape_size() const
Definition MutableTensor.cc:75
void addToShape(const std::int64_t &)
Definition MutableTensor.cc:58
std::vector< std::int64_t >::const_iterator shape_end() const
Definition MutableTensor.cc:69
void unlink()
disconnect from TensorObj instance
Definition MutableTensor.h:102
const podio::ObjectID getObjectID() const
Definition MutableTensor.cc:175
Definition TensorCollection.h:92
Definition TensorCollection.h:63
Definition CalorimeterHit.cc:17