Changeset 12157 for trunk/FACT++


Ignore:
Timestamp:
09/29/11 10:40:03 (13 years ago)
Author:
lyard
Message:
changed PC time to human-readable
File:
1 edited

Legend:

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

    r12156 r12157  
    55 *      Author: lyard
    66 */
     7//FIXME replace with FACT++ Time class
     8#include <boost/date_time/local_time/local_time.hpp>
    79
    810
     
    2628#include "src/Configuration.h"
    2729#include "externals/fits.h"
     30
    2831
    2932using namespace std;
     
    729732        cout << "Missing column " << "SoftTrig" << " Aborting load..." << endl;
    730733        nRoi = nRows = 0;return;}
    731     if (!inputFile->SetPtrAddress("PCTime", &pcTime)){
     734    if (!inputFile->SetPtrAddress("PCTime", pcTime)){
    732735        cout << "Missing column " << "PCTime" << " Aborting load..." << endl;
    733736        nRoi = nRows = 0;return;}
     
    13141317    }
    13151318     autoScalePressed();
    1316         pixelChanged(viewer->selectedPixel);
     1319    pixelChanged(viewer->selectedPixel);
    13171320
    13181321}
     
    17041707        //retrieve the data that we want to display
    17051708    str.str("");
    1706     str << "PC Time: " << viewer->pcTime;
     1709    boost::posix_time::ptime hrTime( boost::gregorian::date(1970, boost::gregorian::Jan, 1),
     1710            boost::posix_time::seconds(viewer->pcTime[0]) +  boost::posix_time::microsec(viewer->pcTime[1]));
     1711//    cout <<  boost::posix_time::to_iso_extended_string(hrTime) << endl;
     1712    str << "PC Time: " << boost::posix_time::to_iso_extended_string(hrTime);
     1713 //   str << "PC Time: " << viewer->pcTime[0];
     1714 //   str << " " << viewer->pcTime[1];
    17071715    QString qstr = qstr.fromStdString(str.str());
    17081716    emit updateCurrentPCTime(qstr);
     
    21822190        return;
    21832191
    2184 //    if (hwID == pixel)
    2185 //        return;
     2192 //   if (hwID == pixel)
     2193 //       return;
    21862194    for (int i=0;i<viewer->nRoi;i++)
    21872195    {
Note: See TracChangeset for help on using the changeset viewer.