Changeset 11442


Ignore:
Timestamp:
07/18/11 16:23:36 (13 years ago)
Author:
tbretz
Message:
Replaced DimEventData by EVENT
File:
1 edited

Legend:

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

    r11419 r11442  
    10721072    }
    10731073
    1074     struct DimEventData
    1075     {
    1076         uint16_t Roi ;            // #slices per pixel (same for all pixels and tmarks)
    1077         uint32_t EventNum ;       // EventNumber as from FTM
    1078         uint16_t TriggerType ;    // Trigger Type from FTM
    1079 
    1080         uint32_t PCTime ;         // when did event start to arrive at PC
    1081         uint32_t BoardTime;       //
    1082 
    1083         int16_t StartPix;         // First Channel per Pixel (Pixels sorted according Software ID)  ; -1 if not filled
    1084         int16_t StartTM;          // First Channel for TimeMark (sorted Hardware ID) ; -1 if not filled
    1085 
    1086          int16_t Adc_Data[];     // final length defined by malloc ....
    1087 
    1088     } __attribute__((__packed__));;
    1089 
    1090     DimEventData *fEventData;
     1074    EVENT *fEventData;
    10911075
    10921076    void DisplayEventData()
     
    11261110        str << "   Trigger type = " << fEventData->TriggerType;
    11271111        str << "   Board time = " << fEventData->BoardTime;
    1128         str << "   (" << Time(fEventData->PCTime, 0) << ")";
     1112        str << "   (" << Time(fEventData->PCTime[0], fEventData->PCTime[1]) << ")";
    11291113        h->SetTitle(str.str().c_str());
    11301114        str.str("");
     
    11671151            return;
    11681152
    1169         const DimEventData &dat = d.ref<DimEventData>();
    1170 
    1171         if (d.size()<sizeof(DimEventData))
    1172         {
    1173             cout << "Size mismatch in " << d.name << ": Found=" << d.size() << " Expected=" << sizeof(DimEventData) << endl;
    1174             return;
    1175         }
    1176 
    1177         if (d.size()!=sizeof(DimEventData)+dat.Roi*2*1440)
    1178         {
    1179             cout << "Size mismatch in " << d.name << ": Found=" << d.size() << " Expected=" << dat.Roi*2+sizeof(DimEventData) << endl;
     1153        const EVENT &dat = d.ref<EVENT>();
     1154
     1155        if (d.size()<sizeof(EVENT))
     1156        {
     1157            cout << "Size mismatch in " << d.name << ": Found=" << d.size() << " Expected>=" << sizeof(EVENT) << endl;
     1158            return;
     1159        }
     1160
     1161        if (d.size()!=sizeof(EVENT)+dat.Roi*2*1440)
     1162        {
     1163            cout << "Size mismatch in " << d.name << ": Found=" << d.size() << " Expected=" << dat.Roi*2*1440+sizeof(EVENT) << endl;
    11801164            return;
    11811165        }
    11821166
    11831167        delete fEventData;
    1184         fEventData = reinterpret_cast<DimEventData*>(new char[d.size()]);
     1168        fEventData = reinterpret_cast<EVENT*>(new char[d.size()]);
    11851169        memcpy(fEventData, d.ptr<void>(), d.size());
    11861170
Note: See TracChangeset for help on using the changeset viewer.