8#ifndef COLUMNAR_VARIANT_VARIANT_OBJECT_ID_H
9#define COLUMNAR_VARIANT_VARIANT_OBJECT_ID_H
33 template<ContainerIdConcept CI2>
34 requires (CI::template isValidContainer<CI2>())
56 template<ContainerIdConcept CI2>
57 requires (CI::template isValidContainer<CI2>())
63 template<
typename Acc,
typename...
Args>
65 [[nodiscard]]
decltype(
auto)
operator() (Acc& acc,
Args&&... args)
const {
66 return acc (*
this, std::forward<Args> (args)...);}
89 return str << &obj.getXAODObjectNoexcept() <<
"/" << obj.getXAODObjectNoexcept().index();
92 template<ContainerIdConcept... CIList>
95 return &lhs.getXAODObjectNoexcept() == &rhs.getXAODObjectNoexcept();
98 template<ContainerIdConcept... CIList>
101 return &lhs.getXAODObjectNoexcept() != &rhs.getXAODObjectNoexcept();
123 throw std::logic_error (
"can't call xAOD function in columnar mode");
128 template<ContainerIdConcept CI2>
129 requires (CI2::regularObjectId && CI::template isValidContainer<CI2>())
141 throw std::logic_error (
"can't call xAOD function in columnar mode");}
143 template<ContainerIdConcept CI2>
144 requires (CI::template isValidContainer<CI2>())
153 template<
typename Acc,
typename...
Args>
155 [[nodiscard]]
decltype(
auto)
operator() (Acc& acc,
Args&&... args)
const {
156 return acc (*
this, std::forward<Args> (args)...);}
164 explicit ObjectId (
void **val_data, std::size_t val_variantIndex, std::size_t val_objectIndex) noexcept
192 return str << CI::idNameArray.at(obj.getVariantIndex()) <<
"/" << obj.getObjectIndex();
195 template<ContainerIdConcept... CIList>
198 return lhs.getVariantIndex() == rhs.getVariantIndex() && lhs.getObjectIndex() == rhs.getObjectIndex();
201 template<ContainerIdConcept... CIList>
204 return lhs.getVariantIndex() != rhs.getVariantIndex() || lhs.getObjectIndex() != rhs.getObjectIndex();
#define ATLAS_THREAD_SAFE
void ** getData() const noexcept
ObjectId(void **val_data, std::size_t val_variantIndex, std::size_t val_objectIndex) noexcept
xAODObject & getXAODObject() const
std::size_t getObjectIndex() const noexcept
std::size_t m_objectIndex
VariantContainerId< CIList... > CI
OptObjectId< CI2, CM > tryGetVariant() const
ObjectId(const ObjectId< VariantContainerId< CIList... >, ColumnarModeArray > &that) noexcept=default
std::size_t getVariantIndex() const noexcept
std::size_t m_variantIndex
typename CI::xAODObjectIdType xAODObject
typename CI::xAODObjectIdType xAODObject
xAODObject & getXAODObject() const noexcept
OptObjectId< CI2, CM > tryGetVariant() const
VariantContainerId< CIList... > CI
xAODObject & getXAODObjectNoexcept() const noexcept
ObjectId(xAODObject &val_object) noexcept
ObjectId(const ObjectId< VariantContainerId< CIList... >, ColumnarModeXAOD > &that) noexcept=default
ObjectId< typename CI::baseId, CM > getBaseObject() const
a class representing a single object (electron, muons, etc.)
a class representing a single optional object (electron, muons, etc.)
concept for a container id
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)
typename CIBase::xAODObjectIdType xAODObjectIdType
std::map< std::string, HypoJetVector >::const_iterator CI