CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Grid3D.cc
Go to the documentation of this file.
1 #include "Grid3D.h"
2 #include <iostream>
3 
4 
5 /*
6 Grid3D::Grid3D( const Grid1D& ga, const Grid1D& gb, const Grid1D& gc,
7  std::vector<ValueType> const & data) :
8  grida_(ga), gridb_(gb), gridc_(gc) {
9  data_.reserve(data.size());
10  //FIXME use a std algo
11  for (size_t i=0; i<=data.size(); ++i)
12  data_.push_back(ValueType(data[i].x(),data[i].y(),data[i].z()));
13  stride1_ = gridb_.nodes() * gridc_.nodes();
14  stride2_ = gridc_.nodes();
15 }
16 */
17 
18 void Grid3D::dump() const
19 {
20  for (int j=0; j<gridb().nodes(); ++j) {
21  for (int k=0; k<gridc().nodes(); ++k) {
22  for (int i=0; i<grida().nodes(); ++i) {
23  std::cout << grida().node(i) << " " << gridb().node(j) << " " << gridc().node(k) << " "
24  << operator()(i,j,k) << std::endl;
25  }
26  }
27  }
28 }
29 
30 
int i
Definition: DBlmapReader.cc:9
const Grid1D & grida() const
Definition: Grid3D.h:67
void dump() const
Definition: Grid3D.cc:18
Scalar node(int i) const
Definition: Grid1D.h:27
ValueType operator()(int i) const
Definition: Grid3D.h:59
int nodes() const
Definition: Grid1D.h:24
const Grid1D & gridc() const
Definition: Grid3D.h:69
int j
Definition: DBlmapReader.cc:9
int k[5][pyjets_maxn]
tuple cout
Definition: gather_cfg.py:121
const Grid1D & gridb() const
Definition: Grid3D.h:68