8#ifndef COLUMNAR_CORE_OPT_OBJECT_ID_H
9#define COLUMNAR_CORE_OPT_OBJECT_ID_H
24 template<ContainerIdConcept CI,
typename CM>
class OptObjectId;
43 :
m_object (&val_object.getXAODObjectNoexcept())
54 explicit operator bool ()
const noexcept {
62 throw std::bad_optional_access();
71 throw std::bad_optional_access();
93 template<ContainerIdConcept CI>
96 return lhs.getXAODObjectNoexcept() == rhs.getXAODObjectNoexcept();
99 template<ContainerIdConcept CI>
102 return lhs.getXAODObjectNoexcept() != rhs.getXAODObjectNoexcept();
108 template<ContainerIdConcept CI,ColumnarArrayMode CM>
class OptObjectId<
CI,CM> final
130 throw std::logic_error (
"can't call xAOD function in columnar mode");
142 throw std::logic_error (
"can't call xAOD function in columnar mode");}
144 explicit operator bool ()
const noexcept {
152 throw std::bad_optional_access();
157 throw std::bad_optional_access();
161 return m_index == that.m_index;}
169 explicit OptObjectId (
void **val_dataArea,
int val_index) noexcept
173 explicit OptObjectId (
void **val_dataArea,
unsigned val_index) noexcept
177 explicit OptObjectId (
void **val_dataArea, std::size_t val_index) noexcept
197 template<ContainerIdConcept CI, ColumnarArrayMode CM>
200 return lhs.getIndex() == rhs.getIndex();
203 template<ContainerIdConcept CI, ColumnarArrayMode CM>
206 return lhs.getIndex() != rhs.getIndex();
xAOD::MissingET_v1 operator*(const xAOD::MissingET_v1 &met, float scale)
Create new MET object from source with scaled (weighted) kinematics.
#define ATLAS_THREAD_SAFE
a class representing a single object (electron, muons, etc.)
OptObjectId(void **val_dataArea, unsigned val_index) noexcept
ObjectId< CI, CM > value() const
bool has_value() const noexcept
void ** getDataArea() const noexcept
xAODObject * getXAODObject() const
std::size_t getIndex() const noexcept
OptObjectId(ObjectId< CI, CM > val_object) noexcept
OptObjectId(void **val_dataArea, int val_index) noexcept
OptObjectId() noexcept=default
OptObjectId(void **val_dataArea, std::size_t val_index) noexcept
typename CI::xAODObjectIdType xAODObject
OptObjectId(xAODObject *)
OptObjectId(const OptObjectId< CI, CM > &that) noexcept=default
ObjectId< CI, ColumnarModeXAOD > value() const
bool has_value() const noexcept
OptObjectId(const OptObjectId< CI, ColumnarModeXAOD > &that) noexcept=default
OptObjectId() noexcept=default
OptObjectId(ObjectId< CI, ColumnarModeXAOD > val_object) noexcept
OptObjectId(xAODObject *val_object) noexcept
xAODObject * getXAODObjectNoexcept() const noexcept
xAODObject * getXAODObject() const noexcept
typename CI::xAODObjectIdType xAODObject
a class representing a single optional object (electron, muons, etc.)
bool operator==(const ObjectId< CI, ColumnarModeXAOD > &lhs, const ObjectId< CI, ColumnarModeXAOD > &rhs)
bool operator!=(const ObjectId< CI, ColumnarModeXAOD > &lhs, const ObjectId< CI, ColumnarModeXAOD > &rhs)
constexpr ColumnarOffsetType invalidObjectIndex
the value for an invalid element index
std::map< std::string, HypoJetVector >::const_iterator CI