FEDRA emulsion software from the OPERA Collaboration
basematrix.h
Go to the documentation of this file.
1 
2 #ifndef _BASEMATRIX_H_
3 #define _BASEMATRIX_H_
4 
5 #include "TObject.h"
6 #include "TObjArray.h"
7 
8 //========================================================================
9 class MyPoint : public TObject {
10 public:
11  long x;
12  long y;
13  int height;
14  MyPoint(long xx, long yy, int h);
15  virtual ~MyPoint();
16 };
17 
18 //=================================================================
19 
20 class TBaseMatrix : public TObject {
21 protected:
22  long xSize; // dimension in BIN!
23  long ySize;
24  long byteSize; // size in Byte!
25 
26 // long cxSize; // dimension in BIN!
27 // long cySize;
28 // long cbyteSize; // size in Byte!
29 
30  unsigned char *mas;
31 // unsigned char *cmas;
32 
33  const unsigned char *GetPointer(void) {return mas;}
34 // const unsigned char *GetcPointer(void) {return cmas;}
35 
36  long shiftX;
37  long shiftY;
38 
39 // TObjArray *NonZeroPoints; // Array of MyPoints - non zero bit/byte
40 // long position; // Current position of this Array;
41 
42 // const TObjArray *GetP(void) {return NonZeroPoints;}
43 
44 public:
45  TBaseMatrix();
46  TBaseMatrix(long ix_size, long iy_size);
48  virtual ~TBaseMatrix();
49  void Init(long ix_size, long iy_size);
50  void ResetShift(void);
51  void Adopt(unsigned char* mas, long rows, long columns);
52 // int GetBit(long i, long j); //i - x, j - y
53 // void SetBit(long i, long j);
54 // void ClearBit(long i, long j);
55  long GetSize(long *ix_size = NULL, long *iy_size = NULL);
56 // long GetiSize(void) {return ibyteSize;}
57 // long GetcSize(long *cx_size = NULL, long *cy_size = NULL);
58 // long GetcSize(void) {return cbyteSize;}
59 
61 
62  virtual int GetElement(int type, long i, long j) = 0;
63 // virtual int GetcElement(long i, long j) = 0;
64 
65  void Print(int type);
66 // void cPrint(void);
67 /* void MoveMatrix2Left_Up(long up, long left);
68  void MoveMatrix2Right_Down(long d, long r);
69  void MoveMatrix2Right_Up(long up, long r);
70  void MoveMatrix2Left_Down(long d, long left);
71 */
72  void MoveMatrix(long ud, long lr); //down +;r +
73 
75 
76 // int FirstPoint(int type, long *i, long *j);
77 // int NextPoint(int type, long *i, long *j);
78 
79 
80 
81  ClassDef(TBaseMatrix,1)
82 };
83 
84 #endif
Definition: basematrix.h:9
long y
Definition: basematrix.h:12
MyPoint(long xx, long yy, int h)
Definition: basematrix.cxx:12
int height
Definition: basematrix.h:13
long x
Definition: basematrix.h:11
virtual ~MyPoint()
Definition: basematrix.cxx:19
Definition: basematrix.h:20
void Adopt(unsigned char *mas, long rows, long columns)
Definition: basematrix.cxx:144
long shiftX
Definition: basematrix.h:36
TBaseMatrix & operator=(TBaseMatrix &T)
Definition: basematrix.cxx:326
long ySize
Definition: basematrix.h:23
TBaseMatrix()
Definition: basematrix.cxx:25
void Print(int type)
Definition: basematrix.cxx:207
long shiftY
Definition: basematrix.h:37
long xSize
Definition: basematrix.h:22
const unsigned char * GetPointer(void)
Definition: basematrix.h:33
void ResetShift(void)
Definition: basematrix.cxx:130
long GetSize(long *ix_size=NULL, long *iy_size=NULL)
Definition: basematrix.cxx:190
virtual int GetElement(int type, long i, long j)=0
void Init(long ix_size, long iy_size)
Definition: basematrix.cxx:108
virtual ~TBaseMatrix()
Definition: basematrix.cxx:71
void MoveMatrix(long ud, long lr)
Definition: basematrix.cxx:313
unsigned char * mas
Definition: basematrix.h:30
long byteSize
Definition: basematrix.h:24
#define NULL
Definition: nidaqmx.h:84
Int_t type
Definition: testBGReduction_By_ANN.C:15