Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:31:45

0001 #ifndef BaseBinFinder_H
0002 #define BaseBinFinder_H
0003 
0004 /** \class BaseBinFinder
0005  * Abstract interface for a bin finder.
0006  *
0007  *  \author N. Amapane - INFN Torino
0008  */
0009 
0010 template <class T>
0011 class BaseBinFinder {
0012 public:
0013   BaseBinFinder(){};
0014 
0015   virtual ~BaseBinFinder() {}
0016 
0017   /// Return the index of bin at given position.
0018   virtual int binIndex(T pos) const = 0;
0019 
0020   /// Returns an index in the valid range
0021   virtual int binIndex(int i) const = 0;
0022 
0023   /// The middle of the ind-th bin
0024   virtual T binPosition(int ind) const = 0;
0025 
0026 private:
0027   //  int theNbins;
0028 };
0029 #endif