Functions
test_bufferedhistogram2d.cxx File Reference
#include "WireCellUtil/BufferedHistogram2D.h"
#include "WireCellUtil/Testing.h"
#include <vector>
#include <iostream>

Go to the source code of this file.

Functions

int main ()
 

Function Documentation

int main ( void  )

Definition at line 10 of file test_bufferedhistogram2d.cxx.

11 {
13  Assert(hist.popx().size() == 0);
14  Assert(false == hist.fill(-1,-1,0));
15  Assert(hist.xmin() == 0.0);
16  Assert(hist.ymin() == 0.0);
17 
18  cerr << "mins: " << hist.xmin() << " " << hist.ymin() << endl;
19 
20  Assert(hist.fill(0.5,3.5));
21  vector<double> dat = hist.popx();
22 
23  cerr << "dat size " << dat.size() << endl;
24 
25  Assert(dat.size() == 4);
26  Assert(dat[3] == 1.0);
27  Assert(hist.xmin() == 1.0);
28  Assert(hist.ymin() == 0.0);
29 
30 
31 }
bool fill(double x, double y, double v=1.0)
Add v to the bin holding x,y. Return false if point is out of bounds.
#define Assert
Definition: Testing.h:7
QTextStream & endl(QTextStream &s)