ATLAS Offline Software
Loading...
Searching...
No Matches
ObjectAccessor.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3*/
4/* Dear emacs, this is -*-c++-*- */
5#ifndef _ObjectAccessor_H_
6#define _ObjectAccessor_H_
7
8#include <array>
9#include <ostream>
10
11class MsgStream;
12
13namespace Trk {
15{
16public:
17 typedef int value_type;
18 // @TODO ideally would use "using const_iterator std::array_base<value_type>::const_iterator" if it existed
19 typedef const value_type* const_iterator;
20
21 template<size_t DIM>
22 ObjectAccessor(const std::array<value_type, DIM>& a, bool is_reverse = false)
23 : m_begin(a.begin())
24 , m_end(a.end())
25 , m_inverseRetrieval(is_reverse)
26 {}
27
28 template<size_t DIM>
29 ObjectAccessor(const std::pair<std::array<value_type, DIM>, bool>& a)
30 : m_begin(a.first.begin())
31 , m_end(a.first.end())
32 , m_inverseRetrieval(a.second)
33 {}
34
37
38 bool inverseRetrieval() const { return m_inverseRetrieval; }
39
40private:
44};
45
46MsgStream&
47operator<<(MsgStream& sl, const ObjectAccessor& oac);
48std::ostream&
49operator<<(std::ostream& sl, const ObjectAccessor& oac);
50
51}
52#endif
static Double_t a
ObjectAccessor(const std::array< value_type, DIM > &a, bool is_reverse=false)
ObjectAccessor::const_iterator m_end
ObjectAccessor::const_iterator m_begin
const value_type * const_iterator
ObjectAccessor(const std::pair< std::array< value_type, DIM >, bool > &a)
ObjectAccessor::const_iterator end() const
bool inverseRetrieval() const
ObjectAccessor::const_iterator begin() const
Ensure that the ATLAS eigen extensions are properly loaded.
MsgStream & operator<<(MsgStream &sl, const AlignModule &alignModule)
overload of << operator for MsgStream for debug output