Skip to content
Snippets Groups Projects
Commit 6f336671 authored by Rene Brun's avatar Rene Brun
Browse files

From Axel:

- Added missing class header docs.


git-svn-id: http://root.cern.ch/svn/root/trunk@21401 27541ba8-7e3a-0410-8455-c3a389f83636
parent d85f1a96
No related branches found
No related tags found
No related merge requests found
...@@ -227,6 +227,38 @@ class THnSparse: public TNamed { ...@@ -227,6 +227,38 @@ class THnSparse: public TNamed {
ClassDef(THnSparse, 1); // Interfaces of sparse n-dimensional histogram ClassDef(THnSparse, 1); // Interfaces of sparse n-dimensional histogram
}; };
//______________________________________________________________________________
//
// Templated implementation of the abstract base THnSparse.
// All functionality and the interfaces to be used are in THnSparse!
//
// THnSparse does not know how to store any bin content itself. Instead, this
// is delegated to the derived, templated class: the template parameter decides
// what the format for the bin content is. In fact it even defines the array
// itself; possible implementations probably derive from TArray.
//
// Typedefs exist for template parematers with ROOT's generic types:
//
// Templated name Typedef Bin content type
// THnSparseT<TArrayC> THnSparseC Char_r
// THnSparseT<TArrayS> THnSparseS Short_t
// THnSparseT<TArrayI> THnSparseI Int_t
// THnSparseT<TArrayL> THnSparseL Long_t
// THnSparseT<TArrayF> THnSparseF Float_t
// THnSparseT<TArrayD> THnSparseD Double_t
//
// We recommend to use THnSparseC wherever possible, and to map its value space
// of 256 possible values to e.g. float values outside the class. This saves an
// enourmous amount of memory. Only if more than 256 values need to be
// distinguished should e.g. THnSparseS or even THnSparseF be chosen.
//
// Implementation detail: the derived, templated class is kept extremely small
// on purpose. That way the (templated thus inlined) uses of this class will
// only create a small amount of machine code, in contrast to e.g. STL.
//______________________________________________________________________________
template <class CONT> template <class CONT>
class THnSparseT: public THnSparse { class THnSparseT: public THnSparse {
public: public:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment