ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
TrkDetDescr
TrkDetDescrUtils
TrkDetDescrUtils
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
{
14
class
ObjectAccessor
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
())
32
,
m_inverseRetrieval
(
a
.second)
33
{}
34
35
ObjectAccessor::const_iterator
begin
()
const
{
return
m_begin
; }
36
ObjectAccessor::const_iterator
end
()
const
{
return
m_end
; }
37
38
bool
inverseRetrieval
()
const
{
return
m_inverseRetrieval
; }
39
40
private
:
41
ObjectAccessor::const_iterator
m_begin
;
42
ObjectAccessor::const_iterator
m_end
;
43
bool
m_inverseRetrieval
;
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
a
static Double_t a
Definition
LArPhysWaveHECTool.cxx:38
Trk::ObjectAccessor
Definition
ObjectAccessor.h:15
Trk::ObjectAccessor::ObjectAccessor
ObjectAccessor(const std::array< value_type, DIM > &a, bool is_reverse=false)
Definition
ObjectAccessor.h:22
Trk::ObjectAccessor::m_end
ObjectAccessor::const_iterator m_end
Definition
ObjectAccessor.h:42
Trk::ObjectAccessor::m_begin
ObjectAccessor::const_iterator m_begin
Definition
ObjectAccessor.h:41
Trk::ObjectAccessor::const_iterator
const value_type * const_iterator
Definition
ObjectAccessor.h:19
Trk::ObjectAccessor::value_type
int value_type
Definition
ObjectAccessor.h:17
Trk::ObjectAccessor::ObjectAccessor
ObjectAccessor(const std::pair< std::array< value_type, DIM >, bool > &a)
Definition
ObjectAccessor.h:29
Trk::ObjectAccessor::end
ObjectAccessor::const_iterator end() const
Definition
ObjectAccessor.h:36
Trk::ObjectAccessor::inverseRetrieval
bool inverseRetrieval() const
Definition
ObjectAccessor.h:38
Trk::ObjectAccessor::begin
ObjectAccessor::const_iterator begin() const
Definition
ObjectAccessor.h:35
Trk::ObjectAccessor::m_inverseRetrieval
bool m_inverseRetrieval
Definition
ObjectAccessor.h:43
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition
FakeTrackBuilder.h:9
Trk::operator<<
MsgStream & operator<<(MsgStream &sl, const AlignModule &alignModule)
overload of << operator for MsgStream for debug output
Definition
AlignModule.cxx:204
Generated on
for ATLAS Offline Software by
1.17.0