|
ATLAS Offline Software
|
Go to the documentation of this file.
4 #ifndef TargetBuffer_t_H
5 #define TargetBuffer_t_H
15 template <
typename T_BaseType,
typename T_BufferType=const T_BaseType,
typename T_VectorType=const std::vector<T_BaseType> >
24 template <
typename T1,
typename T2,
typename T3>
friend class BufferBase_t;
40 template <
typename T1,
typename T2,
typename T3>
51 template <
typename T1,
typename T2,
typename T3>
66 typename std::vector<T_BaseType>::size_type max_idx [[maybe_unused]],
67 const std::vector<double> & full_vector [[maybe_unused]])
79 const T_BaseType &
operator [](
typename std::vector<T_BaseType>::size_type
idx)
const {
90 typename std::vector<T_BaseType>::size_type
optionalRangeCheck(
typename std::vector<T_BaseType>::size_type
idx)
const {
98 typename std::vector<T_BaseType>::size_type
optionalRangeCheck(
typename std::vector<T_BaseType>::size_type
idx)
const {
128 Buffer_t(
double *
buffer,
typename std::vector<double>::size_type max_idx,
const std::vector<double> & full_vector)
166 void clear(
unsigned int max_buffer) {
172 std::vector<double>::size_type max_idx=
m_buffer.size()/2;
181 std::vector<double>
releaseData(std::vector<double>::size_type final_size,
unsigned int fold_idx) {
182 if (fold_idx%2 !=0 ) {
183 std::vector<double>::size_type max_idx=
m_buffer.size()/2;
184 std::vector<double>::const_iterator first_iter(
m_buffer.begin()+max_idx);
185 std::vector<double>::const_iterator last_iter(first_iter+max_idx);
196 m_buffer.resize(max_buffer,
double{});
std::vector< double > releaseData(std::vector< double >::size_type final_size, unsigned int fold_idx)
move the final result to its destination
char data[hepevt_bytes_allocation_ATLAS]
std::vector< T_BaseType >::size_type optionalRangeCheck(typename std::vector< T_BaseType >::size_type idx) const
BufferBase_t & operator=(const BufferBase_t< T1, T2, T3 > &buffer)
BufferBase_t(T_VectorType &buffer)
const T_BaseType * m_bufferStart
void resize(unsigned int max_buffer)
bool const RAWDATA *ch2 const
double & operator[](typename std::vector< double >::size_type idx)
double & upper_bound_at(typename std::vector< double >::size_type idx)
ConstBuffer_t(const std::vector< double > &buffer)
Buffer_t operator[](unsigned int fold_idx)
void clear(unsigned int max_buffer)
Reference to one of the halves provided by the DoubleBuffer_t.
const T_BaseType * m_bufferEnd
const T_BaseType & operator[](typename std::vector< T_BaseType >::size_type idx) const
ConstBuffer_t(const Buffer_t &buffer)
Buffer_t(std::vector< double > &buffer)
Read only reference to one of the halves provided by the DoubleBuffer_t.
void fill(H5::Group &out_file, size_t iterations)
BufferBase_t(T_BufferType *buffer, typename std::vector< T_BaseType >::size_type max_idx[[maybe_unused]], const std::vector< double > &full_vector[[maybe_unused]])
void throwRangeError(typename std::vector< T_BaseType >::size_type idx) const
std::vector< T_BaseType >::size_type m_maxIndex
The temporary buffer for internal computations which is split into two halves.
std::vector< T_BaseType >::size_type optionalRangeCheckUpperBound(typename std::vector< T_BaseType >::size_type idx) const
Helper class which adds a range check to an array access if NDEBUG is not defined.
ConstBuffer_t & operator=(const Buffer_t &buffer)
BufferBase_t(const BufferBase_t< T1, T2, T3 > &buffer)
std::vector< double > m_buffer
const T_BaseType & upper_bound_at(typename std::vector< T_BaseType >::size_type idx) const
Buffer_t(double *buffer, typename std::vector< double >::size_type max_idx, const std::vector< double > &full_vector)