BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
Sparse 1D histogram based on a map. More...
#include <HistSparse1D.hh>
Data Structures | |
struct | Bin |
struct | BinWorking |
Public Types | |
typedef std::map< T, BinWorking >::iterator | iterator |
Iterator mechanics. | |
typedef std::map< T, BinWorking >::const_iterator | const_iterator |
Public Member Functions | |
HistSparse1D () | |
Public constructor only for compatibility with ROOT - not intended for use. | |
HistSparse1D (const std::string &nameIn) | |
Use this constructor. | |
void | Fill (T x, double weight=1.0) |
long long int | Entries () const |
size_t | size () const |
std::map< T, Bin > | Result () const |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
bool | empty () const |
BinWorking & | operator[] (const long long int key) |
const BinWorking & | operator[] (const long long int key) const |
bool | HasAbscissa (T value) const |
ClassDef (HistSparse1D, 1) | |
Data Fields | |
std::string | name |
std::map< T, BinWorking > | data |
long long int | entries |
Sparse 1D histogram based on a map.
Simple implementation for what we need. ROOT's THnSparse is really complicated and couldn't get to work - overly complex for what we need. Boost histograms are better but we don't have a dependency on that yet, so for now a super simple one of our own.
This doesn't have any limits and just accumulates for each unique key forming a set of keys.
Definition at line 44 of file HistSparse1D.hh.
typedef std::map<T,BinWorking>::const_iterator HistSparse1D< T >::const_iterator |
Definition at line 106 of file HistSparse1D.hh.
typedef std::map<T,BinWorking>::iterator HistSparse1D< T >::iterator |
Iterator mechanics.
Definition at line 105 of file HistSparse1D.hh.
|
inlineexplicit |
Use this constructor.
Definition at line 51 of file HistSparse1D.hh.
|
virtual |
Definition at line 30 of file HistSparse1D.cc.
|
inline |
Definition at line 107 of file HistSparse1D.hh.
|
inline |
Definition at line 109 of file HistSparse1D.hh.
|
inline |
Definition at line 111 of file HistSparse1D.hh.
|
inline |
Definition at line 108 of file HistSparse1D.hh.
|
inline |
Definition at line 110 of file HistSparse1D.hh.
|
inline |
Definition at line 89 of file HistSparse1D.hh.
|
inline |
Definition at line 82 of file HistSparse1D.hh.
|
inline |
Definition at line 116 of file HistSparse1D.hh.
|
inline |
Definition at line 113 of file HistSparse1D.hh.
|
inline |
Definition at line 114 of file HistSparse1D.hh.
|
inline |
Definition at line 91 of file HistSparse1D.hh.
|
inline |
Definition at line 90 of file HistSparse1D.hh.
std::map<T, BinWorking> HistSparse1D< T >::data |
Definition at line 119 of file HistSparse1D.hh.
long long int HistSparse1D< T >::entries |
Definition at line 120 of file HistSparse1D.hh.
std::string HistSparse1D< T >::name |
Definition at line 118 of file HistSparse1D.hh.