3#ifndef EDM4EIC_MutableProtoCluster_H
4#define EDM4EIC_MutableProtoCluster_H
11#include "podio/RelationRange.h"
14#include "podio/utilities/MaybeSharedPtr.h"
19#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
20#include "nlohmann/json_fwd.hpp"
71 std::vector<edm4eic::CalorimeterHit>::const_iterator
hits_begin()
const;
72 std::vector<edm4eic::CalorimeterHit>::const_iterator
hits_end()
const;
73 podio::RelationRange<edm4eic::CalorimeterHit>
getHits()
const;
78 std::vector<float>::const_iterator
weights_end()
const;
79 podio::RelationRange<float>
getWeights()
const;
86 void unlink() { m_obj = podio::utils::MaybeSharedPtr<ProtoClusterObj>{
nullptr}; }
100 swap(a.m_obj, b.m_obj);
107 podio::utils::MaybeSharedPtr<ProtoClusterObj> m_obj{
nullptr};
110#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
111void to_json(nlohmann::json& j,
const MutableProtoCluster& value);
Definition CalorimeterHit.h:37
Definition MutableProtoCluster.h:32
friend class ProtoClusterCollection
Definition MutableProtoCluster.h:34
bool operator==(const MutableProtoCluster &other) const
Definition MutableProtoCluster.h:88
void addToWeights(float)
Definition MutableProtoCluster.cc:77
MutableProtoCluster clone() const
create a mutable deep-copy of the object with identical relations
Definition MutableProtoCluster.cc:30
MutableProtoCluster & operator=(MutableProtoCluster other)
copy-assignment operator
Definition MutableProtoCluster.cc:25
std::size_t weights_size() const
Definition MutableProtoCluster.cc:94
podio::ObjectID id() const
Definition MutableProtoCluster.h:94
bool operator<(const MutableProtoCluster &other) const
Definition MutableProtoCluster.h:92
friend void swap(MutableProtoCluster &a, MutableProtoCluster &b)
Definition MutableProtoCluster.h:98
std::vector< edm4eic::CalorimeterHit >::const_iterator hits_end() const
Definition MutableProtoCluster.cc:52
bool isAvailable() const
check whether the object is actually available
Definition MutableProtoCluster.cc:118
const podio::ObjectID getObjectID() const
Definition MutableProtoCluster.cc:125
std::vector< float >::const_iterator weights_end() const
Definition MutableProtoCluster.cc:88
~MutableProtoCluster()=default
destructor
friend class ProtoCluster
Definition MutableProtoCluster.h:36
podio::RelationRange< float > getWeights() const
Definition MutableProtoCluster.cc:105
std::vector< float >::const_iterator weights_begin() const
Definition MutableProtoCluster.cc:82
podio::RelationRange< edm4eic::CalorimeterHit > getHits() const
Definition MutableProtoCluster.cc:69
void unlink()
disconnect from ProtoClusterObj instance
Definition MutableProtoCluster.h:86
MutableProtoCluster()
default constructor
Definition MutableProtoCluster.cc:21
std::vector< edm4eic::CalorimeterHit >::const_iterator hits_begin() const
Definition MutableProtoCluster.cc:46
void addToHits(edm4eic::CalorimeterHit)
Definition MutableProtoCluster.cc:41
MutableProtoCluster(const MutableProtoCluster &other)=default
copy constructor
std::size_t hits_size() const
Definition MutableProtoCluster.cc:58
Definition ProtoClusterCollection.h:95
Definition ProtoCluster.h:33
Definition ProtoClusterCollection.h:66
Definition CalorimeterHit.cc:18