Changeset 11224
- Timestamp:
- 06/30/11 20:23:19 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/EventBuilderWrapper.h
r11207 r11224 742 742 } 743 743 744 745 int fRunNumber; 746 747 748 void InitRunNumber() 749 { 750 const int night = Time().NightAsInt(); 751 752 fRunNumber = 1000; 753 754 while (--fRunNumber>=0) 755 { 756 ostringstream name; 757 name << night << '.' << setfill('0') << setw(3) << fRunNumber; 758 759 if (access((name.str()+".bin").c_str(), F_OK) == 0) 760 break; 761 if (access((name.str()+".fits").c_str(), F_OK) == 0) 762 break; 763 } 764 765 fRunNumber++; 766 767 cout << "FOUND: " << night << '.' << setfill('0') << setw(3) << fRunNumber << endl; 768 } 769 744 770 public: 745 771 EventBuilderWrapper(MessageImp &imp) : fMsg(imp), … … 767 793 for (size_t i=0; i<40; i++) 768 794 ConnectSlot(i, tcp::endpoint()); 795 796 InitRunNumber(); 769 797 } 770 798 ~EventBuilderWrapper() … … 1184 1212 int eventCheck(PEVNT_HEADER *fadhd, EVENT *event) 1185 1213 { 1186 1187 return 0;1188 1189 1214 /* 1190 1215 fadhd[i] ist ein array mit den 40 fad-headers … … 1199 1224 */ 1200 1225 1201 /* 1202 uint16_t start_package_flag; 1203 uint16_t package_length; 1204 uint16_t version_no; 1205 uint16_t PLLLCK; 1206 1207 uint16_t trigger_crc; 1208 uint16_t trigger_type; 1209 uint32_t trigger_id; 1210 1211 uint32_t fad_evt_counter; 1212 uint32_t REFCLK_frequency; 1213 1214 uint16_t board_id; 1215 uint8_t zeroes; 1216 int8_t adc_clock_phase_shift; 1217 uint16_t number_of_triggers_to_generate; 1218 uint16_t trigger_generator_prescaler; 1219 1220 uint64_t DNA; 1221 1222 uint32_t time; 1223 uint32_t runnumber; 1224 1225 int16_t drs_temperature[NTemp]; 1226 1227 uint16_t dac[NDAC]; 1228 */ 1226 static Time oldt(boost::date_time::neg_infin); 1227 Time newt; 1228 1229 if (newt<oldt+boost::posix_time::seconds(1)) 1230 return 0; 1231 1232 oldt = newt; 1229 1233 1230 1234 static DimEventData *data = 0; … … 1481 1485 if (newt>oldt+boost::posix_time::seconds(1)) 1482 1486 { 1487 oldt = newt; 1488 1483 1489 const boost::array<int16_t,42> tmp[4] = 1484 1490 {
Note:
See TracChangeset
for help on using the changeset viewer.