Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:19:17

0001 #ifndef NPSTAT_ABSARRAYPROJECTOR_HH_
0002 #define NPSTAT_ABSARRAYPROJECTOR_HH_
0003 
0004 /*!
0005 // \file AbsArrayProjector.h
0006 //
0007 // \brief Interface definition for functors used to make array projections
0008 //
0009 // Author: I. Volobouev
0010 //
0011 // March 2010
0012 */
0013 
0014 namespace npstat {
0015   /**
0016     // Interface class for piecemeal processing of array data and coordinates.
0017     // Intended for making multidimensional array projections.
0018     */
0019   template <typename Input, typename Result>
0020   struct AbsArrayProjector {
0021     virtual ~AbsArrayProjector() {}
0022 
0023     /** Clear all accumulated results */
0024     virtual void clear() = 0;
0025 
0026     /** Process one array point */
0027     virtual void process(const unsigned* index, unsigned indexLen, unsigned long linearIndex, const Input& value) = 0;
0028 
0029     /** Return the result at the end of array processing */
0030     virtual Result result() = 0;
0031   };
0032 }  // namespace npstat
0033 
0034 #endif  // ABSARRAYPROJECTOR_HH_