1 |
mschen |
1.1 |
/*
|
2 |
|
|
* =====================================================================================
|
3 |
|
|
*
|
4 |
|
|
* Filename: inputbins.cc
|
5 |
|
|
*
|
6 |
|
|
* Description:
|
7 |
|
|
*
|
8 |
|
|
* Version: 1.0
|
9 |
|
|
* Created: 05/07/10 10:32:05 EDT
|
10 |
|
|
* Revision: none
|
11 |
|
|
* Compiler: gcc
|
12 |
|
|
*
|
13 |
|
|
* Author: Mingshui Chen (), Mingshui.Chen@cern.ch
|
14 |
|
|
* Company: Univsity of Florida
|
15 |
|
|
*
|
16 |
|
|
* =====================================================================================
|
17 |
|
|
*/
|
18 |
|
|
|
19 |
|
|
#include "inputbins.h"
|
20 |
|
|
std::ostream& operator<<( std::ostream& os, const InputBins& t )
|
21 |
|
|
{
|
22 |
|
|
// Save Binning to os
|
23 |
|
|
os << t.nbins << " ";
|
24 |
|
|
for(int i=0; i<t.nbins; i++)
|
25 |
|
|
os << t.vbins.at(i) << " ";
|
26 |
|
|
return os;
|
27 |
|
|
}
|
28 |
|
|
|
29 |
|
|
|
30 |
|
|
std::istream& operator>>( std::istream& is, InputBins& t )
|
31 |
|
|
{
|
32 |
|
|
// Load Binning from is
|
33 |
|
|
is >> t.nbins;
|
34 |
|
|
t.vbins.clear();
|
35 |
|
|
for(int i=0; i<t.nbins; i++){
|
36 |
|
|
double hi;
|
37 |
|
|
is >> hi;
|
38 |
|
|
t.vbins.push_back(hi);
|
39 |
|
|
}
|
40 |
|
|
return is;
|
41 |
|
|
}
|