EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MgridDirection.cxx
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file MgridDirection.cxx
1 /* -------------------------------------------------------------------------- */
2 /* MgridDirection.cc */
3 /* */
4 /* A.Kisselev, PNPI, St.Petersburg, Russia. */
5 /* e-mail: kisselev@hermes.desy.de */
6 /* -------------------------------------------------------------------------- */
7 
8 #include <cassert>
9 #include <cstring>
10 
11 #include <MgridDirection.h>
12 
13 /* ========================================================================== */
14 
15 MgridDirection::MgridDirection(int _dim, double _min, double _max)
16 {
17  memset(this, 0x00, sizeof(MgridDirection));
18 
19  // Few sanity checks;
20  assert(_dim > 0 && _min <= _max);
21 
22  dim = _dim;
23  min = _min;
24  max = _max;
25 
26  // Well, may be 0;
27  step = (max - min)/dim;
28 } /* MgridDirection::MgridDirection */
29 
30 /* ========================================================================== */