LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
lar::details::CounterBlock< COUNTER, NCounters > Class Template Reference

Type of block of counters (just a STL array until SUBCOUNTERS are in) More...

#include "CountersMap.h"

Inheritance diagram for lar::details::CounterBlock< COUNTER, NCounters >:

Public Types

using Counter_t = COUNTER
 
using Array_t = std::array< Counter_t, NCounters >
 type of base class More...
 
using value_type = typename Array_t::value_type
 

Public Member Functions

 CounterBlock ()
 Default constructor: initializes the array to 0. More...
 
 CounterBlock (size_t index, Counter_t value)
 Convenience constructor: initializes all counters to 0, except one. More...
 
void fill (const value_type &value)
 
void fill (size_t begin, size_t n, const value_type &value)
 

Public Attributes

elements
 STL member. More...
 

Detailed Description

template<typename COUNTER, std::size_t NCounters>
class lar::details::CounterBlock< COUNTER, NCounters >

Type of block of counters (just a STL array until SUBCOUNTERS are in)

Definition at line 36 of file CountersMap.h.

Member Typedef Documentation

template<typename COUNTER , std::size_t NCounters>
using lar::details::CounterBlock< COUNTER, NCounters >::Array_t = std::array<Counter_t, NCounters>

type of base class

Definition at line 40 of file CountersMap.h.

template<typename COUNTER , std::size_t NCounters>
using lar::details::CounterBlock< COUNTER, NCounters >::Counter_t = COUNTER

Definition at line 38 of file CountersMap.h.

template<typename COUNTER , std::size_t NCounters>
using lar::details::CounterBlock< COUNTER, NCounters >::value_type = typename Array_t::value_type

Definition at line 41 of file CountersMap.h.

Constructor & Destructor Documentation

template<typename COUNTER , std::size_t NCounters>
lar::details::CounterBlock< COUNTER, NCounters >::CounterBlock ( )
inline

Default constructor: initializes the array to 0.

Definition at line 44 of file CountersMap.h.

References trkf::fill().

44 : Array_t() { Array_t::fill(0); }
void fill(const art::PtrVector< recob::Hit > &hits, int only_plane)
std::array< Counter_t, NCounters > Array_t
type of base class
Definition: CountersMap.h:40
template<typename COUNTER , std::size_t NCounters>
lar::details::CounterBlock< COUNTER, NCounters >::CounterBlock ( size_t  index,
Counter_t  value 
)
inline

Convenience constructor: initializes all counters to 0, except one.

Definition at line 47 of file CountersMap.h.

References value.

47  : CounterBlock()
48  {
49  Array_t::operator[](index) = value;
50  }
CounterBlock()
Default constructor: initializes the array to 0.
Definition: CountersMap.h:44
double value
Definition: spectrum.C:18

Member Function Documentation

template<typename COUNTER , std::size_t NCounters>
void lar::details::CounterBlock< COUNTER, NCounters >::fill ( const value_type value)
inline

Definition at line 52 of file CountersMap.h.

References trkf::fill().

52 { Array_t::fill(value); }
void fill(const art::PtrVector< recob::Hit > &hits, int only_plane)
double value
Definition: spectrum.C:18
template<typename COUNTER , std::size_t NCounters>
void lar::details::CounterBlock< COUNTER, NCounters >::fill ( size_t  begin,
size_t  n,
const value_type value 
)
inline

Definition at line 53 of file CountersMap.h.

References trkf::fill().

54  {
55  std::fill(Array_t::data() + begin, Array_t::data() + begin + n, value);
56  }
void fill(const art::PtrVector< recob::Hit > &hits, int only_plane)
double value
Definition: spectrum.C:18
Char_t n[5]
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
Definition: StdUtils.h:69

Member Data Documentation

T std::array< T >::elements
inherited

STL member.


The documentation for this class was generated from the following file: