 |
ATLAS Offline Software
|
Go to the documentation of this file.
8 #ifndef COLUMNAR_CORE_OBJECT_RANGE_H
9 #define COLUMNAR_CORE_OBJECT_RANGE_H
19 template<ContainerIdConcept CI,
typename CM>
class ObjectRange;
36 : m_container (&val_container)
80 return m_container->empty();}
83 return m_container->size();}
88 template<
typename Acc,
typename...
Args>
89 requires std::invocable<Acc,ObjectRange<CI,ColumnarModeXAOD>,
Args...>
90 [[nodiscard]] decltype(
auto) operator() (Acc&
acc,
Args&&...
args)
const {
91 return acc (*
this, std::forward<Args> (
args)...);}
95 return obj.getXAODObjectNoexcept().index(); }
136 template<ContainerIdConcept CI>
137 requires (std::is_same_v<typename CI::xAODObjectRangeType,typename CI::xAODObjectIdType>)
144 using xAODContainer =
typename CI::xAODObjectRangeType;
177 template<
typename Acc,
typename...
Args>
178 requires std::invocable<Acc,ObjectRange<CI,ColumnarModeXAOD>,
Args...>
179 [[nodiscard]] decltype(
auto) operator() (Acc&
acc,
Args&&...
args)
const {
180 return acc (*
this, std::forward<Args> (
args)...);}
191 template<ContainerIdConcept CI>
class ObjectRangeIteratorXAODSinglet
final
244 return m_beginIndex;}
254 throw std::logic_error (
"can't call xAOD function in columnar mode");
258 return m_beginIndex == m_endIndex;}
261 return m_endIndex - m_beginIndex;}
268 throw std::logic_error (
"can't call xAOD function in columnar mode");}
274 template<
typename Acc,
typename...
Args>
275 requires std::invocable<Acc,ObjectRange<CI,ColumnarModeArray>,
Args...>
276 [[nodiscard]] decltype(
auto) operator() (Acc&
acc,
Args&&...
args)
const {
277 return acc (*
this, std::forward<Args> (
args)...);}
281 return obj.getIndex() - m_beginIndex; }
289 explicit ObjectRange (
void **val_data, std::size_t val_beginIndex,
290 std::size_t val_endIndex) noexcept
291 :
m_data (val_data), m_beginIndex (val_beginIndex), m_endIndex (val_endIndex)
304 std::size_t m_beginIndex = 0
u;
305 std::size_t m_endIndex = 0
u;
326 m_index += stepSize;
return *
this;}
329 return m_index == that.m_index;}
331 return m_index != that.m_index;}
xAODContainer & getXAODObject() const noexcept
ObjectId< CI, CM > operator*() const noexcept
auto end() const noexcept
XAODObjectType * m_object
bool operator!=(const ObjectRangeIteratorXAODSinglet< CI > &that) const noexcept
std::size_t size() const noexcept
ObjectRangeIteratorXAODSinglet< CI > & operator++() noexcept
xAODContainer & getXAODObject() const noexcept
ObjectRange(const xAODContainer &)
xAODContainer & getXAODObjectNoexcept() const noexcept
bool operator!=(const ObjectRangeIteratorXAODContainer< CI, IteratorType > &that) const noexcept
ObjectRangeIteratorArray< CI, stepSize > & operator++() noexcept
bool empty() const noexcept
bool const RAWDATA *ch2 const
a class representing a continuous sequence of objects (a.k.a. a container)
std::map< std::string, HypoJetVector >::const_iterator CI
ObjectRangeIteratorArray< CI, 1 > begin() const noexcept
bool operator==(const ObjectRangeIteratorArray< CI, stepSize > &that) const noexcept
@ u
Enums for curvilinear frames.
ObjectId< CI, CM > operator*() const noexcept
typename CI::xAODObjectRangeType xAODContainer
auto rend() const noexcept
ObjectRangeIteratorXAODContainer(IteratorType &&val_iterator) noexcept
typename CI::xAODObjectRangeType xAODContainer
std::size_t getIndexInRange(const ObjectId< CI, CM > &obj) const
get the index inside the given range
ObjectRangeIteratorArray< CI, 1 > end() const noexcept
std::size_t size() const noexcept
std::size_t getIndexInRange(const ObjectId< CI, CM > &obj) const
get the index inside the given range
void ** getData() const noexcept
an iterator over objects in an ObjectRange
std::size_t size() const noexcept
bool empty() const noexcept
ObjectRange(xAODContainer &val_singlet) noexcept
ObjectRangeIteratorArray(void **val_data, std::size_t val_index) noexcept
std::size_t beginIndex() const noexcept
auto begin() const noexcept
ObjectRangeIteratorXAODContainer< CI, IteratorType > & operator++() noexcept
xAODContainer & getXAODObjectNoexcept() const noexcept
a class representing a single object (electron, muons, etc.)
bool operator==(const ObjectRangeIteratorXAODContainer< CI, IteratorType > &that) const noexcept
ObjectId< CI, CM > operator[](std::size_t) const noexcept
auto rbegin() const noexcept
xAODContainer & getXAODObject() const
ObjectRangeIteratorArray< CI,-1 > rbegin() const noexcept
bool empty() const noexcept
auto begin() const noexcept
bool operator==(const ObjectRangeIteratorXAODSinglet< CI > &that) const noexcept
auto rend() const noexcept
auto end() const noexcept
ObjectRangeIteratorXAODSinglet(XAODObjectType *val_object) noexcept
ObjectRange(xAODContainer &val_container) noexcept
xAODContainer * m_singlet
ObjectRange(void **val_data, std::size_t val_beginIndex, std::size_t val_endIndex) noexcept
#define ATLAS_THREAD_SAFE
ObjectId< CI, CM > operator*() const noexcept
Define macros for attributes used to control the static checker.
auto rbegin() const noexcept
typename CI::xAODObjectIdType XAODObjectType
std::size_t endIndex() const noexcept
bool operator!=(const ObjectRangeIteratorArray< CI, stepSize > &that) const noexcept
ObjectRangeIteratorArray< CI,-1 > rend() const noexcept