3#ifndef EDM4EIC_ProtoCluster_H
4#define EDM4EIC_ProtoCluster_H
9#include "podio/RelationRange.h"
12#include "podio/utilities/MaybeSharedPtr.h"
13#include "podio/detail/OrderKey.h"
18#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
19#include "nlohmann/json_fwd.hpp"
24class ProtoClusterCollection;
35class MutableProtoCluster;
36class ProtoClusterCollection;
37class ProtoClusterCollectionData;
79 static constexpr auto typeName =
"edm4eic::ProtoCluster";
85 std::vector<edm4eic::CalorimeterHit>::const_iterator
hits_begin()
const;
86 std::vector<edm4eic::CalorimeterHit>::const_iterator
hits_end()
const;
87 podio::RelationRange<edm4eic::CalorimeterHit>
getHits()
const;
91 std::vector<float>::const_iterator
weights_end()
const;
92 podio::RelationRange<float>
getWeights()
const;
98 void unlink() { m_obj = podio::utils::MaybeSharedPtr<ProtoClusterObj>{
nullptr}; }
115 swap(a.m_obj, b.m_obj);
120 explicit ProtoCluster(podio::utils::MaybeSharedPtr<ProtoClusterObj> obj);
123 podio::utils::MaybeSharedPtr<ProtoClusterObj> m_obj{
nullptr};
126std::ostream&
operator<<(std::ostream& o,
const ProtoCluster& value);
128#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
129void to_json(nlohmann::json& j,
const ProtoCluster& value);
Definition CalorimeterHit.h:46
Definition MutableProtoCluster.h:35
Definition ProtoClusterCollectionData.h:31
Definition ProtoClusterCollection.h:91
Definition ProtoClusterCollection.h:36
Definition ProtoCluster.h:43
const podio::ObjectID getObjectID() const
Definition ProtoCluster.cc:144
friend class ProtoClusterCollection
Definition ProtoCluster.h:46
friend class MutableProtoCluster
Definition ProtoCluster.h:45
bool operator==(const ProtoCluster &other) const
Definition ProtoCluster.h:100
bool operator<(const ProtoCluster &other) const
Definition ProtoCluster.h:107
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:113
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:104
podio::ObjectID id() const
Definition ProtoCluster.h:109
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
static constexpr auto typeName
Definition ProtoCluster.h:79
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:103
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:98
podio::RelationRange< float > getWeights() const
Definition ProtoCluster.cc:128
Definition ProtoClusterObj.h:20
Definition CalorimeterHit.cc:17
std::ostream & operator<<(std::ostream &o, const CalorimeterHit &value)
Definition CalorimeterHit.cc:103
Definition CalorimeterHit.h:31
OrderKey getOrderKey(const edm4eic::CalorimeterHit &obj)
Definition CalorimeterHit.cc:150