Changeset 11898 for trunk


Ignore:
Timestamp:
08/12/11 11:28:20 (13 years ago)
Author:
lyard
Message:
oops forgot the header file...
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/gui/RawEventsViewer/RawEventsViewer.h

    r11809 r11898  
    3737#include <qwt-qt4/qwt_plot_zoomer.h>
    3838
    39 
    40 //#define __MARS__
    41 //#include "MFits.h"
     39#include <valarray>
     40
    4241#include <string>
    4342#include "externals/fits.h"
     
    103102    void mouseMoveEvent(QMouseEvent *event);
    104103    void mouseDoubleClickEvent(QMouseEvent *event);
    105 
    106 private:
    107104    void drawCamera(bool alsoWire);
    108     void drawPixelCurve();
    109105    void drawPatches();
    110106    int PixelAtPosition(const QPoint &pos);
     107    void drawHexagon(int index, bool solid);
     108    int selectedPixel;
     109    float *eventData;
     110    int16_t* rawEventData;
     111
     112private:
     113    void drawPixelCurve();
    111114    void updateNeighbors(int currentPixel);
    112115    void skipPixels(int start, int howMany);
    113116    void calculatePixelsCoords();
    114     void drawHexagon(int index, bool solid);
    115117    void setCorrectSlice(QMouseEvent* event);
    116118    void eventStepping(bool plus);
     
    123125    float viewSize;
    124126    int whichSlice;
    125     int selectedPixel;
    126127    float pixelSize;
    127128    float shownSizex;
     
    132133    bool loopCurrentEvent;
    133134    //allocate the maximum size for one event
    134     int16_t *eventData;
    135135    uint32_t boardTime[NBOARDS];
    136136    int16_t startPix[NPIX];
     
    186186    int verticesIndices[ACTUAL_NUM_PIXELS][6];
    187187    int numVertices;
     188};
     189
     190class Camera : public RawDataViewer
     191{
     192    Q_OBJECT
     193
     194    typedef pair<double, double> Position;
     195    typedef vector<Position> Positions;
     196
     197    Positions fGeom;
     198
     199    valarray<double> fData;
     200    vector<bool> fBold;
     201    vector<bool> fEnable;
     202
     203    int fWhite;
     204
     205    int64_t fMin;
     206    int64_t fMax;
     207
     208public:
     209    Camera(QWidget *pparent = 0);
     210    void Reset();
     211     void SetBold(int idx);
     212     void SetWhite(int idx);
     213     void SetEnable(int idx, bool b);
     214     void Toggle(int idx);
     215     double GetData(int idx);
     216     void SetMin(int64_t min);
     217     void SetMax(int64_t max);
     218     const char *GetName();
     219
     220     void Paint();
     221
     222     int GetIdx(float px, float py);
     223     char *GetObjectInfo(int px, int py);
     224
     225     void SetData(const valarray<double> &ddata);
     226
    188227};
    189228/*************************************************
Note: See TracChangeset for help on using the changeset viewer.