8#ifndef COLUMNAR_VARIANT_VARIANT_OPT_OBJECT_ID_H
9#define COLUMNAR_VARIANT_VARIANT_OPT_OBJECT_ID_H
33 :
m_object (&val_object.getXAODObjectNoexcept())
40 template<ContainerIdConcept CI2>
41 requires (CI::template isValidContainer<CI2>())
43 :
m_object (&val_object.getXAODObjectNoexcept())
46 template<ContainerIdConcept CI2>
47 requires (CI::template isValidContainer<CI2>())
49 :
m_object (val_object.getXAODObjectNoexcept())
56 explicit operator bool ()
const noexcept {
64 throw std::bad_optional_access();
73 throw std::bad_optional_access();
98 return str << &obj.getXAODObjectNoexcept() <<
"/" << obj.getXAODObjectNoexcept().index();
101 template<ContainerIdConcept... CIList>
104 return &lhs.getXAODObjectNoexcept() == &rhs.getXAODObjectNoexcept();
107 template<ContainerIdConcept... CIList>
110 return &lhs.getXAODObjectNoexcept() != &rhs.getXAODObjectNoexcept();
135 template<ContainerIdConcept CI2>
136 requires (CI::template isValidContainer<CI2>())
141 template<ContainerIdConcept CI2>
142 requires (CI::template isValidContainer<CI2>())
144 :
m_data (val_object.getData())
146 if (val_object.has_value())
163 throw std::logic_error (
"can't call xAOD function in columnar mode");
175 throw std::logic_error (
"can't call xAOD function in columnar mode");}
177 explicit operator bool ()
const noexcept {
185 throw std::bad_optional_access();
190 throw std::bad_optional_access();
204 explicit OptObjectId (
void **val_data, std::size_t val_variantIndex, std::size_t val_objectIndex) noexcept
232 return str << CI::idNameArray.at(obj.getVariantIndex()) <<
"/" << obj.getObjectIndex();
235 template<ContainerIdConcept... CIList>
238 return lhs.getVariantIndex() == rhs.getVariantIndex() && lhs.getObjectIndex() == rhs.getObjectIndex();
241 template<ContainerIdConcept... CIList>
244 return lhs.getVariantIndex() != rhs.getVariantIndex() || lhs.getObjectIndex() != rhs.getObjectIndex();
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(const OptObjectId< CI, ColumnarModeArray > &that) noexcept=default
std::size_t m_variantIndex
ObjectId< CI, ColumnarModeArray > value() const
typename CI::xAODObjectIdType xAODObject
std::size_t m_objectIndex
OptObjectId() noexcept=default
void ** getData() const noexcept
OptObjectId(ObjectId< CI, ColumnarModeArray > val_object) noexcept
std::size_t getObjectIndex() const noexcept
std::size_t getVariantIndex() const noexcept
bool has_value() const noexcept
xAODObject * getXAODObject() const
static constexpr std::size_t invalidVariantIndex
OptObjectId(void **val_data, std::size_t val_variantIndex, std::size_t val_objectIndex) noexcept
VariantContainerId< CIList... > CI
OptObjectId(xAODObject *)
typename CI::xAODObjectIdType xAODObject
bool has_value() const noexcept
VariantContainerId< CIList... > CI
xAODObject * getXAODObject() const noexcept
OptObjectId(const ObjectId< CI, ColumnarModeXAOD > &val_object) noexcept
ObjectId< CI, ColumnarModeXAOD > value() const
xAODObject * getXAODObjectNoexcept() const noexcept
OptObjectId(const OptObjectId< CI, ColumnarModeXAOD > &that) noexcept=default
OptObjectId(xAODObject *val_object) noexcept
OptObjectId() noexcept=default
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)
constexpr ColumnarOffsetType invalidObjectIndex
the value for an invalid element index
std::ostream & operator<<(std::ostream &str, const ObjectId< CI, ColumnarModeXAOD > &obj)
static constexpr std::size_t numVariants
typename CIBase::xAODObjectIdType xAODObjectIdType
std::map< std::string, HypoJetVector >::const_iterator CI