Changeset 18630 for trunk/FACT++/src
- Timestamp:
- 09/18/16 19:10:43 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/EventBuilderWrapper.h
r18617 r18630 92 92 DimDescribedService fDimIncomplete; 93 93 94 struct EventData 95 { 96 uint32_t runNum; 97 uint32_t evNum; 98 float data[4*1440]; 99 } __attribute__((__packed__)); 100 94 101 Queue<pair<Time,GUI_STAT>> fQueueStatistics1; 95 102 Queue<tuple<Time,bool,FAD::EventHeader>> fQueueProcHeader; … … 98 105 Queue<pair<Time,array<uint16_t,2>>> fQueueRoi; 99 106 Queue<vector<char>> fQueueRawData; 100 Queue<tuple<Time,uint32_t, array<float,1440*4>>> fQueueEventData;107 Queue<tuple<Time,uint32_t,EventData/*array<float,1440*4>*/>> fQueueEventData; 101 108 Queue<tuple<Time, array<uint32_t,40>, array<int16_t,160>>> fQueueTempRefClk; 102 109 … … 107 114 108 115 array<uint16_t,2> fVecRoi; 109 pair<float, array<float, 1440*4>> fMaxEvent; // Maximum event from applyCalib116 pair<float,EventData/*array<float, 1440*4>*/> fMaxEvent; // Maximum event from applyCalib 110 117 111 118 protected: … … 240 247 "|start_tm[int16]:start sample of time marker channels" 241 248 "|adc[int16]:adc data"), 242 fDimEventData ("FAD_CONTROL/EVENT_DATA", " F:1440;F:1440;F:1440;F:1440", "|avg:|rms:|max:|pos"),249 fDimEventData ("FAD_CONTROL/EVENT_DATA", "I:1;I:1;F:1440;F:1440;F:1440;F:1440", "|run:|evt:|avg:|rms:|max:|pos"), 243 250 fDimFeedbackData("FAD_CONTROL/FEEDBACK_DATA", "F:1440", ""), 244 251 fDimFwVersion ("FAD_CONTROL/FIRMWARE_VERSION", "F:42", … … 297 304 fQueueTempRefClk( std::bind(&EventBuilderWrapper::UpdateDimTempRefClk, this, placeholders::_1)), 298 305 fNightAsInt(0), fRunInProgress(-1), 299 fMaxEvent(make_pair(-FLT_MAX, array<float,1440*4>()))306 fMaxEvent(make_pair(-FLT_MAX, EventData()/*array<float,1440*4>()*/)) 300 307 { 301 308 if (This) … … 965 972 } 966 973 967 bool UpdateDimEventData(const tuple<Time,uint32_t, array<float, 1440*4>> &tup)974 bool UpdateDimEventData(const tuple<Time,uint32_t,EventData/*array<float, 1440*4>*/> &tup) 968 975 { 969 976 fDimEventData.setQuality(get<1>(tup)); … … 1032 1039 1033 1040 // If this is a cosmic event 1034 array<float, 1440*4> stats; // Mean, RMS, Max, Pos 1035 const float max = DrsCalibrate::GetPixelStats(stats.data(), vec.data(), roi, 15, 5); 1041 EventData edat; 1042 edat.runNum = evt.runNum; 1043 edat.evNum = evt.evNum; 1044 //array<float, 1440*4> stats; // Mean, RMS, Max, Pos 1045 const float max = DrsCalibrate::GetPixelStats(edat.data, vec.data(), roi, 15, 5); 1036 1046 if (evt.trgTyp==0 && max>fMaxEvent.first) 1037 fMaxEvent = make_pair(max, stats);1047 fMaxEvent = make_pair(max, edat); 1038 1048 1039 1049 // ------------------ Update dim service (statistics) --------------------- … … 1041 1051 if (fQueueEventData.empty() && now>fLastDimEventData+boost::posix_time::milliseconds(4999)) 1042 1052 { 1043 fQueueEventData.emplace(evt.time, evt.trgTyp, evt.trgTyp==0 ? fMaxEvent.second : stats); 1053 edat.evNum = evt.evNum; 1054 edat.runNum = evt.runNum; 1055 1056 fQueueEventData.emplace(evt.time, evt.trgTyp, evt.trgTyp==0 ? fMaxEvent.second : edat); 1044 1057 if (evt.trgTyp==0) 1045 1058 fMaxEvent.first = -FLT_MAX;
Note:
See TracChangeset
for help on using the changeset viewer.