1 |
#ifndef inputbins_h
|
2 |
#define inputbins_h
|
3 |
// InputStrings.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 |
#include <string>
|
11 |
|
12 |
using std::vector;
|
13 |
using std::string;
|
14 |
|
15 |
struct InputStrings
|
16 |
{
|
17 |
vector<string> vbins;
|
18 |
int nbins;
|
19 |
|
20 |
InputStrings() {}
|
21 |
InputStrings( int n, vector<string> v ):nbins(n), vbins(v){}
|
22 |
InputStrings( const InputStrings& orig ) : nbins(orig.nbins), vbins(orig.vbins) {}
|
23 |
|
24 |
InputStrings& operator=( const InputStrings& orig )
|
25 |
{ nbins = orig.nbins; vbins = orig.vbins; return *this; }
|
26 |
};
|
27 |
|
28 |
std::ostream& operator<<( std::ostream& os, const InputStrings& t );
|
29 |
std::istream& operator>>( std::istream& is, InputStrings& t );
|
30 |
|
31 |
#endif
|