ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
CxxUtils
CxxUtils
Control/CxxUtils/CxxUtils/Arrayrep.h
Go to the documentation of this file.
1
// This file's extension implies that it's C, but it's really -*- C++ -*-.
2
3
/*
4
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
5
*/
12
13
#ifndef CXXUTILS_ARRAYREP_H
14
#define CXXUTILS_ARRAYREP_H
15
16
17
#include <string>
18
#include <vector>
19
20
21
// Presently has to be in CaloRec ns for backwards compatibility.
22
namespace
CaloRec
{
23
24
26
typedef
float
Arrayelt
;
27
28
61
struct
Arrayrep
62
{
68
Arrayrep
() {}
69
78
explicit
Arrayrep
(
const
std::string&
str
,
79
const
std::string&
context
=
""
);
80
88
explicit
Arrayrep
(
const
std::vector<unsigned int>& shape);
89
99
explicit
Arrayrep
(
const
unsigned
int
shape[],
unsigned
int
n);
100
102
std::vector<Arrayelt> m_data;
103
106
std::vector<unsigned int>
m_shape
;
107
110
std::vector<unsigned int>
m_sizes
;
111
122
void
init_sizes
(
bool
resize_data =
false
);
123
131
132
void
write_array
(std::ostream& stream)
const
;
133
142
143
void
write_subarray
(std::ostream& stream, std::vector<Arrayelt>::size_type& idx,
unsigned
dimIndex)
const
;
144
145
};
146
147
148
}
// namespace CaloRec
149
150
151
namespace
CxxUtils
{
152
using
CaloRec::Arrayrep
;
153
using
CaloRec::Arrayelt
;
154
}
155
156
157
#endif
// not CXXUTILS_ARRAYREP_H
CaloRec
Namespace for helper functions.
Definition
CaloCellPositionShift.h:23
CaloRec::Arrayelt
float Arrayelt
The type of an element of an Array.
Definition
Control/CxxUtils/CxxUtils/Arrayrep.h:26
CaloRec::init_sizes
init_sizes()
CaloRec::context
context
Definition
Arrayrep.cxx:217
CxxUtils
Definition
aligned_vector.h:29
str
Definition
BTagTrackIpAccessor.cxx:11
CaloRec::Arrayrep
Representation class for Array's.
Definition
Control/CxxUtils/CxxUtils/Arrayrep.h:62
CaloRec::Arrayrep::write_array
void write_array(std::ostream &stream) const
Creates a text representation of the array content.
Definition
Arrayrep.cxx:245
CaloRec::Arrayrep::write_subarray
void write_subarray(std::ostream &stream, std::vector< Arrayelt >::size_type &idx, unsigned dimIndex) const
Helper function for write_array.
Definition
Arrayrep.cxx:279
CaloRec::Arrayrep::Arrayrep
Arrayrep()
Default constructor.
Definition
Control/CxxUtils/CxxUtils/Arrayrep.h:68
CaloRec::Arrayrep::m_sizes
*Subarray for faster access See above *This member could be considered transient std::vector< unsigned int > m_sizes
Definition
Control/CxxUtils/CxxUtils/Arrayrep.h:110
CaloRec::Arrayrep::m_shape
*The array shape *One entry per giving the size of each dimension std::vector< unsigned int > m_shape
Definition
Control/CxxUtils/CxxUtils/Arrayrep.h:106
Generated on
for ATLAS Offline Software by
1.17.0