fdhwlib  2.0.25
/home/kopmann/git-mirror/fdhwlib/fdhwlib/Hw/SltPattern.h
Go to the documentation of this file.
00001 /***************************************************************************
00002     SltPattern.h  -  description
00003 
00004     begin                : Tue Sep 27 2001
00005     copyright            : (C) 2001 by Andreas Kopmann
00006     email                : kopmann@ipe.fzk.de
00007  ***************************************************************************/
00008 
00009 
00010 #ifndef SLTPATTERN_H
00011 #define SLTPATTERN_H
00012 
00013 #include <cstdio>
00014 
00015 #include <Hw/SltDef.h>
00016 
00017 
00029 class SltPattern {
00030 public: 
00031 
00032     SltPattern();
00033         ~SltPattern();
00034 
00035 
00048   void display(unsigned long *mem, int n, int iFirst=0, FILE *fout=stdout, int fLen=150);
00049 
00050 
00055         int getPatternId(unsigned long mem);
00056 
00057 
00072         int getTriggered(unsigned long *mem, int n);
00073 
00081   int getFirstTrigger(unsigned long *mem, int n);
00082 
00083 
00091   void getFltIntervall(unsigned long *mem, int n, int t0[][22], int t1[][22]);
00092 
00093 
00101   void getSltIntervall(unsigned long *mem, int n, int *t0, int *t1);
00102 
00122          void getPixelList(int patternId, int col, int row, 
00123                  int *colList, int *rowList, int nList=4);
00124 
00125 
00150          int getPixelList(unsigned long *mem, int n, int *iTrigger,
00151                  int *colList, int *rowList, int nList=4);
00152 
00153 
00160          int checkPixelList(unsigned long *mem, int n, 
00161                  int *colList, int *rowList, int nList = 4);
00162 
00163 
00167          int findPixelList(unsigned long *mem, int n,
00168                  int iPattern, int patternId, int firstRow,
00169                  int *colList, int *rowList, int nList = 4);
00170 
00171 
00172 
00181          int insertByProjection(int col, int row, 
00182                  int *colList, int *rowList, int nList);
00183 
00189          int insertByDistance(int col, int row, 
00190                  int *colList, int *rowList, int nList);
00191 
00192 
00199          int getX(int col, int row);
00200 
00201          int getY(int col, int row);
00202 
00203 
00208    double getXFromSphericalCoordinates(double beta);
00209 
00214    double getYFromSphericalCoordinates(double alpha);
00215 
00219    double getAlpha(int y);
00220 
00224    double getBeta(int x);
00225 
00231    double getAlphaFromSkyCoordinates(double phi, double delta, double beta);
00232 
00238    double getBetaFromSkyCoordinates(double phi, double delta);
00239 
00240 
00249    double getAzimuth(double alpha, double beta, double delta);
00250 
00257    double getElevation(double alpha, double beta);
00258 
00259 
00260 
00261 
00268          float getR(int colRef, int rowRef, int col, int row); 
00269 
00270 
00273          int getR2(int colRef, int rowRef, int col, int row); 
00274 
00283          int getCircle(int colRef, int rowRef, int col, int row);
00284 
00285 
00287          int getScalarProd(int colRef, int rowRef, 
00288                  int col1, int row1, int col2, int row2);
00289 
00290 private:
00291 
00292 
00296         static int track[128][3];
00297 
00301         static int vectorEvenRow[19][2];
00302 
00306         static int vectorOddRow[19][2];
00307 
00308 
00309 };
00310 
00311 #endif
00312