npstat is hosted by Hepforge, IPPP Durham
NPStat  5.10.0
AbsArrayProjector.hh
Go to the documentation of this file.
1 #ifndef NPSTAT_ABSARRAYPROJECTOR_HH_
2 #define NPSTAT_ABSARRAYPROJECTOR_HH_
3 
4 /*!
5 // \file AbsArrayProjector.hh
6 //
7 // \brief Interface definition for functors used to make array projections
8 //
9 // Author: I. Volobouev
10 //
11 // March 2010
12 */
13 
14 namespace npstat {
15  /**
16  // Interface class for piecemeal processing of array data and coordinates.
17  // Intended for making multidimensional array projections.
18  */
19  template <typename Input, typename Result>
21  {
22  virtual ~AbsArrayProjector() {}
23 
24  /** Clear all accumulated results */
25  virtual void clear() = 0;
26 
27  /** Process one array point */
28  virtual void process(const unsigned *index, unsigned indexLen,
29  unsigned long linearIndex,
30  const Input& value) = 0;
31 
32  /** Return the result at the end of array processing */
33  virtual Result result() = 0;
34  };
35 }
36 
37 #endif // ABSARRAYPROJECTOR_HH_
Definition: AbsArrayProjector.hh:14
Definition: AbsArrayProjector.hh:21
virtual void clear()=0
virtual void process(const unsigned *index, unsigned indexLen, unsigned long linearIndex, const Input &value)=0
virtual Result result()=0