3#ifndef EDM4EIC_ProtoCluster_H
4#define EDM4EIC_ProtoCluster_H
9#include "podio/RelationRange.h"
12#include "podio/utilities/MaybeSharedPtr.h"
17#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
18#include "nlohmann/json_fwd.hpp"
25class MutableProtoCluster;
26class ProtoClusterCollection;
27class ProtoClusterCollectionData;
69 std::vector<edm4eic::CalorimeterHit>::const_iterator
hits_begin()
const;
70 std::vector<edm4eic::CalorimeterHit>::const_iterator
hits_end()
const;
71 podio::RelationRange<edm4eic::CalorimeterHit>
getHits()
const;
75 std::vector<float>::const_iterator
weights_end()
const;
76 podio::RelationRange<float>
getWeights()
const;
82 void unlink() { m_obj = podio::utils::MaybeSharedPtr<ProtoClusterObj>{
nullptr}; }
96 swap(a.m_obj, b.m_obj);
101 explicit ProtoCluster(podio::utils::MaybeSharedPtr<ProtoClusterObj> obj);
104 podio::utils::MaybeSharedPtr<ProtoClusterObj> m_obj{
nullptr};
107std::ostream&
operator<<(std::ostream& o,
const ProtoCluster& value);
109#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
110void to_json(nlohmann::json& j,
const ProtoCluster& value);
Definition CalorimeterHit.h:37
Definition MutableProtoCluster.h:32
Definition ProtoClusterCollectionData.h:31
Definition ProtoClusterCollection.h:95
Definition ProtoClusterCollection.h:40
Definition ProtoCluster.h:33
const podio::ObjectID getObjectID() const
Definition ProtoCluster.cc:119
friend class ProtoClusterCollection
Definition ProtoCluster.h:36
friend class MutableProtoCluster
Definition ProtoCluster.h:35
bool operator==(const ProtoCluster &other) const
Definition ProtoCluster.h:84
bool operator<(const ProtoCluster &other) const
Definition ProtoCluster.h:88
std::vector< float >::const_iterator weights_begin() const
Definition ProtoCluster.cc:77
podio::RelationRange< edm4eic::CalorimeterHit > getHits() const
Definition ProtoCluster.cc:68
friend void swap(ProtoCluster &a, ProtoCluster &b)
Definition ProtoCluster.h:94
ProtoCluster(const ProtoCluster &other)=default
copy constructor
bool isAvailable() const
check whether the object is actually available
Definition ProtoCluster.cc:112
std::size_t weights_size() const
Definition ProtoCluster.cc:89
podio::ObjectID id() const
Definition ProtoCluster.h:90
ProtoCluster()
default constructor
Definition ProtoCluster.cc:21
std::size_t hits_size() const
Definition ProtoCluster.cc:57
MutableProtoCluster clone() const
create a mutable deep-copy of the object with identical relations
Definition ProtoCluster.cc:30
std::vector< float >::const_iterator weights_end() const
Definition ProtoCluster.cc:83
std::vector< edm4eic::CalorimeterHit >::const_iterator hits_begin() const
Definition ProtoCluster.cc:45
std::vector< edm4eic::CalorimeterHit >::const_iterator hits_end() const
Definition ProtoCluster.cc:51
~ProtoCluster()=default
destructor
ProtoCluster & operator=(ProtoCluster other)
copy-assignment operator
Definition ProtoCluster.cc:25
static ProtoCluster makeEmpty()
Definition ProtoCluster.cc:38
void unlink()
disconnect from ProtoClusterObj instance
Definition ProtoCluster.h:82
podio::RelationRange< float > getWeights() const
Definition ProtoCluster.cc:100
Definition ProtoClusterObj.h:19
Definition CalorimeterHit.cc:18
std::ostream & operator<<(std::ostream &o, const CalorimeterHit &value)
Definition CalorimeterHit.cc:97