1 |
mschen |
1.1 |
#ifndef inputbins_h
|
2 |
|
|
#define inputbins_h
|
3 |
|
|
// InputBins.h
|
4 |
|
|
// read binning from config files
|
5 |
|
|
// Operators << and >> are defined to allow writing to and reading from files
|
6 |
|
|
// Mingshui Chen, 5 May 2010
|
7 |
|
|
|
8 |
|
|
#include <iostream>
|
9 |
|
|
#include <vector>
|
10 |
|
|
|
11 |
|
|
using std::vector;
|
12 |
|
|
|
13 |
|
|
struct InputBins
|
14 |
|
|
{
|
15 |
|
|
vector<double> vbins;
|
16 |
|
|
int nbins;
|
17 |
|
|
|
18 |
|
|
InputBins() {}
|
19 |
|
|
InputBins( int n, vector<double> v ):nbins(n), vbins(v){}
|
20 |
|
|
InputBins( const InputBins& orig ) : nbins(orig.nbins), vbins(orig.vbins) {}
|
21 |
|
|
|
22 |
|
|
InputBins& operator=( const InputBins& orig )
|
23 |
|
|
{ nbins = orig.nbins; vbins = orig.vbins; return *this; }
|
24 |
|
|
};
|
25 |
|
|
|
26 |
|
|
std::ostream& operator<<( std::ostream& os, const InputBins& t );
|
27 |
|
|
std::istream& operator>>( std::istream& is, InputBins& t );
|
28 |
|
|
|
29 |
|
|
#endif
|