CMS 3D CMS Logo

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

◆ grid1d_t()

int grid1d_t ( )

Definition at line 34 of file gridTesters.cc.

34  {
35  bool ok = true;
36  Grid1D grid(-10., 10., 11);
37 
38  print(grid, 7.2);
39  print(grid, 10.);
40  print(grid, -10.2);
41  print(grid, 10.2);
42 
43  ok &= testGrid1D(grid);
44 
45  assert(ok ? 0 : 1);
46  return ok ? 0 : 1;
47 }

References cms::cuda::assert(), getRunAppsInfo::grid, convertSQLiteXML::ok, and print().

◆ grid3d_t()

int grid3d_t ( )

Definition at line 72 of file gridTesters.cc.

72  {
73  Grid3D const* grid = factory();
74 
76 
77  std::cout << inter.interpolate(7.5, 7.2, -3.4) << std::endl;
78  std::cout << inter.interpolate(-0.5, 10.2, -3.4) << std::endl;
79 
80  delete grid;
81  return 0;
82 }

References gather_cfg::cout, getRunAppsInfo::grid, and inter.

LinearGridInterpolator3D
Definition: LinearGridInterpolator3D.h:22
gather_cfg.cout
cout
Definition: gather_cfg.py:144
getRunAppsInfo.grid
grid
Definition: getRunAppsInfo.py:92
cms::cuda::assert
assert(be >=bs)
convertSQLiteXML.ok
bool ok
Definition: convertSQLiteXML.py:98
Grid3D
Definition: Grid3D.h:28
Grid1D
Definition: Grid1D.h:7
print
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:46
inter
int inter
Definition: CascadeWrapper.h:27