EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
EicStlKey.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file EicStlKey.h
1 //
2 // AYK (ayk@bnl.gov), 2014/01/08; revamped in Oct'2017;
3 //
4 // EicRoot CAD manipulation routines; ordering key class;
5 //
6 
7 #include <cstring>
8 
9 #ifndef _EIC_STL_KEY_
10 #define _EIC_STL_KEY_
11 
16 class EicStlKey {
17  public:
22  EicStlKey(unsigned dim, const double *ptr) {
23  mDim = dim;
24  mData = new double[dim];
25  memcpy(mData, ptr, dim*sizeof(double));
26  };
29  ~EicStlKey() { delete [] mData; };
30 
33  unsigned GetDim() const { return mDim;};
36  const double *GetData() const { return mData;};
37 
38  private:
40  unsigned mDim;
41 
43  double *mData;
44 };
45 
46 bool EicStlKeyCompare(const EicStlKey *lh, const EicStlKey *rh);
47 bool EicStlKeyEqual(const EicStlKey *lh, const EicStlKey *rh);
48 
49 #endif