Changeset 12040 for trunk/FACT++/src/EventBuilderWrapper.h
- Timestamp:
- 09/08/11 21:48:27 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/EventBuilderWrapper.h
r11968 r12040 136 136 if (access((name+"drs.fits").c_str(), F_OK) == 0) 137 137 break; 138 138 139 } 139 140 … … 166 167 167 168 fPath = path; 169 170 fDimWriteStats.SetCurrentFolder(fPath); 168 171 169 172 return InitRunNumber(); … … 199 202 200 203 memset(fNumEvts, 0, sizeof(fNumEvts)); 201 202 204 fDimEvents.Update(fNumEvts); 203 205 … … 287 289 288 290 g_runStat = kModeRun; 291 g_maxProc = 3; 289 292 290 293 fMsg.Message("Starting EventBuilder thread"); … … 401 404 int GetNumConnected(int i) const { return gi_NumConnect[i]; } 402 405 406 /* 407 bool IsConnected(int i) const { return gi_NumConnect[i]>0; } 408 bool IsConnecting(int i) const { return !IsConnected(i) && !IsDisconnected(i); } 409 bool IsDisconnected(int i) const { return gi_NumConnect[i]<=0 && g_port[i].sockDef==0; } 410 int GetNumConnected(int i) const { return gi_NumConnect[i]; } 411 */ 412 403 413 void SetIgnore(int i, bool b) const { if (g_port[i].sockDef!=0) g_port[i].sockDef=b?-1:1; } 404 414 bool IsIgnored(int i) const { return g_port[i].sockDef==-1; } … … 564 574 } 565 575 566 int runWrite(FileHandle_t handler, EVENT *e, size_t )576 int runWrite(FileHandle_t handler, EVENT *e, size_t sz) 567 577 { 568 578 DataProcessorImp *file = reinterpret_cast<DataProcessorImp*>(handler); … … 870 880 break; 871 881 882 /* 872 883 // FIXME: Time limit?! 873 /*874 884 static Time oldt(boost::date_time::neg_infin); 875 885 Time newt; 876 886 877 887 // FIXME: Only send events if the have newer run-numbers 878 if (newt<oldt+boost::posix_time:: seconds(1))879 return 0;888 if (newt<oldt+boost::posix_time::milliseconds(100)) 889 return; 880 890 881 891 oldt = newt; … … 883 893 884 894 // FIXME: Check event type here 885 return;886 895 887 896 const size_t sz = sizeof(EVENT)+event->Roi*2*1440; … … 894 903 DataCalib::Apply(vec, event->Adc_Data, event->StartPix, event->Roi); 895 904 896 vector<float> data2(1440); // Mean, RMS, Max, Pos 897 CalibData::GetPixelMax(data2.data(), vec, event->Roi, 0, event->Roi); 898 905 vector<float> data2(1440); // Mean, RMS, Max, Pos, first, last 906 CalibData::GetPixelMax(data2.data(), vec, event->Roi, 0, event->Roi-1); 907 908 // dim_lock(); 899 909 fDimFeedbackData.Update(data2); 910 // dim_unlock(); 900 911 } 901 912
Note:
See TracChangeset
for help on using the changeset viewer.