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;
72 std::vector<edm4eic::CalorimeterHit>::const_iterator
hits_begin()
const;
73 std::vector<edm4eic::CalorimeterHit>::const_iterator
hits_end()
const;
74 podio::RelationRange<edm4eic::CalorimeterHit>
getHits()
const;
78 std::vector<float>::const_iterator
weights_end()
const;
79 podio::RelationRange<float>
getWeights()
const;
85 void unlink() { m_obj = podio::utils::MaybeSharedPtr<ProtoClusterObj>{
nullptr}; }
102 swap(a.m_obj, b.m_obj);
107 explicit ProtoCluster(podio::utils::MaybeSharedPtr<ProtoClusterObj> obj);
110 podio::utils::MaybeSharedPtr<ProtoClusterObj> m_obj{
nullptr};
113std::ostream&
operator<<(std::ostream& o,
const ProtoCluster& value);
115#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
116void to_json(nlohmann::json& j,
const ProtoCluster& value);
Definition CalorimeterHit.h:37
Definition MutableProtoCluster.h:31
Definition ProtoClusterCollectionData.h:31
Definition ProtoClusterCollection.h:92
Definition ProtoClusterCollection.h:37
Definition ProtoCluster.h:33
const podio::ObjectID getObjectID() const
Definition ProtoCluster.cc:144
friend class ProtoClusterCollection
Definition ProtoCluster.h:36
friend class MutableProtoCluster
Definition ProtoCluster.h:35
bool operator==(const ProtoCluster &other) const
Definition ProtoCluster.h:87
bool operator<(const ProtoCluster &other) const
Definition ProtoCluster.h:94
std::vector< float >::const_iterator weights_begin() const
Definition ProtoCluster.cc:105
podio::RelationRange< edm4eic::CalorimeterHit > getHits() const
Definition ProtoCluster.cc:96
friend void swap(ProtoCluster &a, ProtoCluster &b)
Definition ProtoCluster.h:100
ProtoCluster(const ProtoCluster &other)=default
copy constructor
bool isAvailable() const
check whether the object is actually available
Definition ProtoCluster.cc:140
std::size_t weights_size() const
Definition ProtoCluster.cc:117
bool operator!=(const MutableProtoCluster &other) const
Definition ProtoCluster.h:91
podio::ObjectID id() const
Definition ProtoCluster.h:96
ProtoCluster()
default constructor
Definition ProtoCluster.cc:20
MutableProtoCluster clone(bool cloneRelations=true) const
Definition ProtoCluster.cc:29
std::size_t hits_size() const
Definition ProtoCluster.cc:85
std::vector< float >::const_iterator weights_end() const
Definition ProtoCluster.cc:111
std::vector< edm4eic::CalorimeterHit >::const_iterator hits_begin() const
Definition ProtoCluster.cc:73
std::vector< edm4eic::CalorimeterHit >::const_iterator hits_end() const
Definition ProtoCluster.cc:79
~ProtoCluster()=default
destructor
bool operator!=(const ProtoCluster &other) const
Definition ProtoCluster.h:90
ProtoCluster & operator=(ProtoCluster other)
copy-assignment operator
Definition ProtoCluster.cc:24
static ProtoCluster makeEmpty()
Definition ProtoCluster.cc:66
void unlink()
disconnect from ProtoClusterObj instance
Definition ProtoCluster.h:85
podio::RelationRange< float > getWeights() const
Definition ProtoCluster.cc:128
Definition ProtoClusterObj.h:19
Definition CalorimeterHit.cc:17
std::ostream & operator<<(std::ostream &o, const CalorimeterHit &value)
Definition CalorimeterHit.cc:103