3#ifndef EDM4EIC_MutableRawCALOROCHit_H
4#define EDM4EIC_MutableRawCALOROCHit_H
12#include "podio/RelationRange.h"
16#include "podio/utilities/MaybeSharedPtr.h"
20#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
21#include "nlohmann/json_fwd.hpp"
51 MutableRawCALOROCHit(
const std::uint64_t cellID,
const std::int32_t samplePhase,
const std::int32_t timeStamp);
82 void setCellID(
const std::uint64_t cellID);
101 std::vector<edm4eic::CALOROC1ASample>::const_iterator
aSamples_begin()
const;
102 std::vector<edm4eic::CALOROC1ASample>::const_iterator
aSamples_end()
const;
103 podio::RelationRange<edm4eic::CALOROC1ASample>
getASamples()
const;
107 std::vector<edm4eic::CALOROC1BSample>::const_iterator
bSamples_begin()
const;
108 std::vector<edm4eic::CALOROC1BSample>::const_iterator
bSamples_end()
const;
109 podio::RelationRange<edm4eic::CALOROC1BSample>
getBSamples()
const;
116 void unlink() { m_obj = podio::utils::MaybeSharedPtr<RawCALOROCHitObj>{
nullptr}; }
131 friend std::hash<MutableRawCALOROCHit>;
135 swap(a.m_obj, b.m_obj);
142 podio::utils::MaybeSharedPtr<RawCALOROCHitObj> m_obj{
new RawCALOROCHitObj{}, podio::utils::MarkOwned};
145#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
155struct std::hash<
edm4eic::MutableRawCALOROCHit> {
157 return std::hash<edm4eic::RawCALOROCHitObj*>{}(obj.m_obj.get());
Definition CALOROC1ASample.h:20
Definition CALOROC1BSample.h:20
Definition MutableRawCALOROCHit.h:37
podio::RelationRange< edm4eic::CALOROC1BSample > getBSamples() const
Definition MutableRawCALOROCHit.cc:122
friend class RawCALOROCHit
Definition MutableRawCALOROCHit.h:41
MutableRawCALOROCHit & operator=(MutableRawCALOROCHit other) &&=delete
MutableRawCALOROCHit(const MutableRawCALOROCHit &other)=default
copy constructor
constexpr bool operator!=(const MutableRawCALOROCHit &other) const
Definition MutableRawCALOROCHit.h:121
const podio::ObjectID getObjectID() const
Definition MutableRawCALOROCHit.cc:139
void unlink()
disconnect from RawCALOROCHitObj instance
Definition MutableRawCALOROCHit.h:116
std::size_t bSamples_size() const
Definition MutableRawCALOROCHit.cc:111
bool operator!=(const RawCALOROCHit &other) const
Definition MutableRawCALOROCHit.h:122
void setCellID(const std::uint64_t cellID)
Set the Detector specific (geometrical) cell id.
Definition MutableRawCALOROCHit.cc:50
std::size_t aSamples_size() const
Definition MutableRawCALOROCHit.cc:75
bool operator<(const MutableRawCALOROCHit &other) const
Definition MutableRawCALOROCHit.h:125
bool isAvailable() const
check whether the object is actually available
Definition MutableRawCALOROCHit.cc:135
std::vector< edm4eic::CALOROC1BSample >::const_iterator bSamples_end() const
Definition MutableRawCALOROCHit.cc:105
std::vector< edm4eic::CALOROC1ASample >::const_iterator aSamples_begin() const
Definition MutableRawCALOROCHit.cc:63
friend class RawCALOROCHitMutableCollectionIterator
Definition MutableRawCALOROCHit.h:40
podio::ObjectID id() const
Definition MutableRawCALOROCHit.h:127
std::uint64_t getCellID() const
Access the Detector specific (geometrical) cell id.
Definition MutableRawCALOROCHit.cc:45
void setTimeStamp(const std::int32_t timeStamp)
Set the [TDC counts].
Definition MutableRawCALOROCHit.cc:54
~MutableRawCALOROCHit()=default
destructor
void addToASamples(const edm4eic::CALOROC1ASample &)
Definition MutableRawCALOROCHit.cc:58
MutableRawCALOROCHit clone(bool cloneRelations=true) const
Definition MutableRawCALOROCHit.cc:29
constexpr bool operator==(const MutableRawCALOROCHit &other) const
Definition MutableRawCALOROCHit.h:118
friend void swap(MutableRawCALOROCHit &a, MutableRawCALOROCHit &b)
Definition MutableRawCALOROCHit.h:133
RawCALOROCHitCollection collection_type
Definition MutableRawCALOROCHit.h:45
friend class RawCALOROCHitCollection
Definition MutableRawCALOROCHit.h:39
std::vector< edm4eic::CALOROC1BSample >::const_iterator bSamples_begin() const
Definition MutableRawCALOROCHit.cc:99
std::int32_t getSamplePhase() const
Access the Phase of samples in [# samples], for synchronizing across chips.
Definition MutableRawCALOROCHit.cc:46
podio::RelationRange< edm4eic::CALOROC1ASample > getASamples() const
Definition MutableRawCALOROCHit.cc:86
std::int32_t getTimeStamp() const
Access the [TDC counts].
Definition MutableRawCALOROCHit.cc:47
MutableRawCALOROCHit & operator=(MutableRawCALOROCHit other) &
copy-assignment operator
Definition MutableRawCALOROCHit.cc:24
std::vector< edm4eic::CALOROC1ASample >::const_iterator aSamples_end() const
Definition MutableRawCALOROCHit.cc:69
RawCALOROCHit object_type
Definition MutableRawCALOROCHit.h:44
void setSamplePhase(const std::int32_t samplePhase)
Set the Phase of samples in [# samples], for synchronizing across chips.
Definition MutableRawCALOROCHit.cc:52
void addToBSamples(const edm4eic::CALOROC1BSample &)
Definition MutableRawCALOROCHit.cc:94
MutableRawCALOROCHit()=default
default constructor
Definition RawCALOROCHitCollection.h:139
Definition RawCALOROCHit.h:45
Definition RawCALOROCHitObj.h:21
Definition ArrowMapper.cc:61
OrderKey getOrderKey(const edm4eic::CalorimeterHit &obj)
Definition CalorimeterHit.cc:146
std::size_t operator()(const edm4eic::MutableRawCALOROCHit &obj) const
Definition MutableRawCALOROCHit.h:156