ATLAS Offline Software
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 
11 class MsgStream;
12 
13 namespace Trk {
15 {
16 public:
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())
33  {}
34 
37 
38  bool inverseRetrieval() const { return m_inverseRetrieval; }
39 
40 private:
44 };
45 
46 MsgStream&
47 operator<<(MsgStream& sl, const ObjectAccessor& oac);
48 std::ostream&
49 operator<<(std::ostream& sl, const ObjectAccessor& oac);
50 
51 }
52 #endif
python.SystemOfUnits.second
int second
Definition: SystemOfUnits.py:120
Trk::ObjectAccessor::ObjectAccessor
ObjectAccessor(const std::array< value_type, DIM > &a, bool is_reverse=false)
Definition: ObjectAccessor.h:22
Trk::ObjectAccessor::inverseRetrieval
bool inverseRetrieval() const
Definition: ObjectAccessor.h:38
Trk::ObjectAccessor::end
ObjectAccessor::const_iterator end() const
Definition: ObjectAccessor.h:36
Trk::ObjectAccessor::m_begin
ObjectAccessor::const_iterator m_begin
Definition: ObjectAccessor.h:41
Trk::ObjectAccessor::value_type
int value_type
Definition: ObjectAccessor.h:17
Trk::ObjectAccessor::m_inverseRetrieval
bool m_inverseRetrieval
Definition: ObjectAccessor.h:43
Trk::ObjectAccessor::ObjectAccessor
ObjectAccessor(const std::pair< std::array< value_type, DIM >, bool > &a)
Definition: ObjectAccessor.h:29
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::ObjectAccessor::const_iterator
const value_type * const_iterator
Definition: ObjectAccessor.h:19
Trk::ObjectAccessor::begin
ObjectAccessor::const_iterator begin() const
Definition: ObjectAccessor.h:35
Trk::ObjectAccessor
Definition: ObjectAccessor.h:15
a
TList * a
Definition: liststreamerinfos.cxx:10
Trk::operator<<
MsgStream & operator<<(MsgStream &sl, const AlignModule &alignModule)
overload of << operator for MsgStream for debug output
Definition: AlignModule.cxx:204
DeMoScan.first
bool first
Definition: DeMoScan.py:534
Trk::ObjectAccessor::m_end
ObjectAccessor::const_iterator m_end
Definition: ObjectAccessor.h:42