CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
gridTesters.cc File Reference
#include "Grid1D.h"
#include "Grid3D.h"
#include <cassert>
#include <iostream>
#include <cstdlib>
#include <cstdio>
#include "LinearGridInterpolator3D.h"

Go to the source code of this file.

Functions

int grid1d_t ()
 
int grid3d_t ()
 

Function Documentation

int grid1d_t ( )

Definition at line 36 of file gridTesters.cc.

References reco::print().

36  {
37 
38  bool ok=true;
39  Grid1D grid(-10.,10.,11);
40 
41  print(grid, 7.2);
42  print(grid, 10.);
43  print(grid, -10.2);
44  print(grid, 10.2);
45 
46  ok &= testGrid1D(grid);
47 
48  assert(ok? 0 : 1);
49  return ok ? 0 : 1;
50 
51 }
std::string print(const Track &, edm::Verbosity=edm::Concise)
Track print utility.
Definition: print.cc:8
Definition: Grid1D.h:7
int grid3d_t ( )

Definition at line 83 of file gridTesters.cc.

References gather_cfg::cout, inter, and LinearGridInterpolator3D::interpolate().

83  {
84 
85  Grid3D const * grid = factory();
86 
88 
89  std::cout << inter.interpolate(7.5,7.2,-3.4) << std::endl;
90  std::cout << inter.interpolate(-0.5,10.2,-3.4) << std::endl;
91 
92 
93  delete grid;
94  return 0;
95 }
Definition: Grid3D.h:17
int inter
tuple cout
Definition: gather_cfg.py:121