Changeset 12055


Ignore:
Timestamp:
09/09/11 10:12:06 (13 years ago)
Author:
tbretz
Message:
Added some const-qualifiers; fixed some compiler warings; removed a global namespace defintion from the header file; fixed the errornous includes (no path in Qt and Qwt includes -- the path is defined by the configure script); fixed a type from yesterday (mean not sum)
Location:
trunk/FACT++/gui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/gui/BasicGlCamera.cc

    r12052 r12055  
    66#include <sstream>
    77#include "src/tools.h"
     8
     9using namespace std;;
    810
    911const PixelMapEntry PixelMap::empty = { 0, 0, 0, 0, 0, 0 };
     
    268270    {
    269271    }
    270     void BasicGlCamera::assignPixelMap(PixelMap& map)
     272    void BasicGlCamera::assignPixelMap(const PixelMap& map)
    271273    {
    272274        fPixelMap = map;
     
    277279        }
    278280    }
    279     void BasicGlCamera::assignTriggerPatchesMap(vector<int>& pa)
     281    void BasicGlCamera::assignTriggerPatchesMap(const vector<int>& pa)
    280282    {
    281283        vector<vector<int> > intervec;
     
    296298
    297299        //now construct the correspondance between pixels and patches
    298         for (int i=0;i<NTMARK;i++)
     300        for (i=0;i<NTMARK;i++)
    299301            for (int j=0;j<9;j++)
    300302                pixelsPatch[softwareMapping[patches[i][j]]] = i;
    301303
    302         for (int i=0;i<1440;i++)
     304        for (i=0;i<1440;i++)
    303305            updateNeighbors(i);
    304306
     
    379381
    380382        mean /= ACTUAL_NUM_PIXELS;
    381         rms = sqrt(rms/ACTUAL_NUM_PIXELS - sum * sum);
     383        rms = sqrt(rms/ACTUAL_NUM_PIXELS - mean * mean);
    382384
    383385        multiset<double>::iterator it = medianSet.begin();
  • trunk/FACT++/gui/BasicGlCamera.h

    r12012 r12055  
    99#define ACTUAL_NUM_PIXELS 1440
    1010
     11#include <set>
     12#include <vector>
     13
    1114#include <QtOpenGL/QGLWidget>
    1215#include <QtGui/QMouseEvent>
    13 #include <vector>
    1416
    1517#include <QtGui/QRadioButton>
     
    1719#include <QtGui/QButtonGroup>
    1820
    19 #include <set>
    20 
    2121#include "src/PixelMap.h"
    2222
    23 using namespace std;
    2423//#include <QtGui/QMouseEvent>
    2524///structure for storing edges of hexagons (for blurry display)
     
    6968    GLfloat tooLowValueCoulour[3];
    7069
    71     string dataText;
    72     string unitsText;
    73     string titleText;
     70    std::string dataText;
     71    std::string unitsText;
     72    std::string titleText;
    7473
    75     void setUnits(const string& units);
    76     void setTitle(const string& title);
     74    void setUnits(const std::string& units);
     75    void setTitle(const std::string& title);
    7776    void SetWhite(int idx);
    7877    void SetMin(int64_t min);
     
    8079    void SetAutoRefresh(bool on);
    8180    void updateCamera();
    82     void assignPixelMap(PixelMap& );
    83     void assignTriggerPatchesMap(vector<int>& );
     81    void assignPixelMap(const PixelMap& );
     82    void assignTriggerPatchesMap(const std::vector<int>& );
    8483
    8584    float ss[5];// = {0.00, 0.25, 0.5, 0.75, 1.00};
     
    125124    int fPixelStride;
    126125    int fcSlice;
    127     vector<double>fData;
     126    std::vector<double>fData;
    128127
    129128 //   bool recalcColorPlease;
     
    133132    GLfloat pixelsColor[NPIX][3];
    134133    static  GLfloat verticesList[NPIX*6][2];
    135     static vector<edge> patchesIndices[160];
     134    static std::vector<edge> patchesIndices[160];
    136135    static int verticesIndices[NPIX][6];
    137136    static int pixelsPatch[NPIX];
Note: See TracChangeset for help on using the changeset viewer.