- Timestamp:
- 07/18/11 16:23:36 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/gui/FactGui.h
r11419 r11442 1072 1072 } 1073 1073 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; 1091 1075 1092 1076 void DisplayEventData() … … 1126 1110 str << " Trigger type = " << fEventData->TriggerType; 1127 1111 str << " Board time = " << fEventData->BoardTime; 1128 str << " (" << Time(fEventData->PCTime , 0) << ")";1112 str << " (" << Time(fEventData->PCTime[0], fEventData->PCTime[1]) << ")"; 1129 1113 h->SetTitle(str.str().c_str()); 1130 1114 str.str(""); … … 1167 1151 return; 1168 1152 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; 1180 1164 return; 1181 1165 } 1182 1166 1183 1167 delete fEventData; 1184 fEventData = reinterpret_cast< DimEventData*>(new char[d.size()]);1168 fEventData = reinterpret_cast<EVENT*>(new char[d.size()]); 1185 1169 memcpy(fEventData, d.ptr<void>(), d.size()); 1186 1170
Note:
See TracChangeset
for help on using the changeset viewer.