8#ifndef COLUMNAR_CORE_OBJECT_ID_H
9#define COLUMNAR_CORE_OBJECT_ID_H
19 template<ContainerIdConcept CI,
typename CM>
class ObjectId;
39 template<ContainerIdConcept CI2>
requires (CI2::isMutable && std::is_same_v<typename CI2::constId,CI>)
41 :
m_object (&that.getXAODObjectNoexcept())
61 template<
typename Acc,
typename...
Args>
62 requires std::invocable<Acc,ObjectId<CI,ColumnarModeXAOD>,
Args...>
63 [[nodiscard]]
decltype(
auto)
operator() (Acc& acc,
Args&&... args)
const {
64 return acc (*
this, std::forward<Args> (args)...);}
75 template<ContainerIdConcept CI>
78 return str << &obj.getXAODObjectNoexcept() <<
"/" << obj.getXAODObjectNoexcept().index();
81 template<ContainerIdConcept CI>
84 return &lhs.getXAODObjectNoexcept() == &rhs.getXAODObjectNoexcept();
87 template<ContainerIdConcept CI>
90 return &lhs.getXAODObjectNoexcept() != &rhs.getXAODObjectNoexcept();
111 throw std::logic_error (
"can't call xAOD function in columnar mode");
116 template<ContainerIdConcept CI2>
requires (CI2::isMutable && std::is_same_v<typename CI2::constId,CI>)
128 throw std::logic_error (
"can't call xAOD function in columnar mode");}
130 template<
typename Acc,
typename...
Args>
131 requires std::invocable<Acc,ObjectId<CI,ColumnarModeArray>,
Args...>
132 [[nodiscard]]
decltype(
auto)
operator() (Acc& acc,
Args&&... args)
const {
133 return acc (*
this, std::forward<Args> (args)...);}
141 explicit ObjectId (
void **val_data, std::size_t val_index) noexcept
161 template<ContainerIdConcept CI>
164 return str << CI::idName <<
"/" << obj.getIndex();
167 template<ContainerIdConcept CI>
170 return lhs.getIndex() == rhs.getIndex();
173 template<ContainerIdConcept CI>
176 return lhs.getIndex() != rhs.getIndex();
Define macros for attributes used to control the static checker.
#define ATLAS_THREAD_SAFE
void ** getData() const noexcept
xAODObject & getXAODObject() const
std::size_t getIndex() const noexcept
ObjectId(const ObjectId< CI, ColumnarModeArray > &that) noexcept=default
ObjectId(void **val_data, std::size_t val_index) noexcept
typename CI::xAODObjectIdType xAODObject
ObjectId(xAODObject &val_object) noexcept
ObjectId(const ObjectId< CI, ColumnarModeXAOD > &that) noexcept=default
typename CI::xAODObjectIdType xAODObject
xAODObject & getXAODObjectNoexcept() const noexcept
xAODObject & getXAODObject() const noexcept
a class representing a single 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)
std::ostream & operator<<(std::ostream &str, const ObjectId< CI, ColumnarModeXAOD > &obj)
std::map< std::string, HypoJetVector >::const_iterator CI