Changeset 17238
- Timestamp:
- 10/17/13 15:22:51 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/EventBuilderWrapper.h
r16956 r17238 25 25 26 26 #include "DataWriteFits2.h" 27 28 #include "queue.h"29 27 30 28 namespace ba = boost::asio; … … 150 148 break; 151 149 if (access((name+"fits").c_str(), F_OK) == 0) 150 break; 151 if (access((name+"fits.fz").c_str(), F_OK) == 0) 152 break; 153 if (access((name+"fits.gz").c_str(), F_OK) == 0) 152 154 break; 153 155 if (access((name+"drs.fits").c_str(), F_OK) == 0) … … 425 427 case FAD::kDebug: msg += "kDebug."; break; 426 428 case FAD::kFits: msg += "kFits."; break; 429 case FAD::kZFits: msg += "kZFits."; break; 427 430 case FAD::kCfitsio: msg += "kCfitsio"; break; 428 431 case FAD::kRaw: msg += "kRaw"; break; … … 485 488 shared_ptr<DataProcessorImp> fFile; 486 489 487 voidUpdateDimEvents(const pair<Time,array<uint32_t,4>> &stat)490 bool UpdateDimEvents(const pair<Time,array<uint32_t,4>> &stat) 488 491 { 489 492 fDimEvents.setData(stat.second.data(), sizeof(uint32_t)*4); 490 493 fDimEvents.Update(stat.first); 494 return true; 491 495 } 492 496 … … 503 507 // and associate it to the run control structure 504 508 evt.runCtrl->calib = make_shared<DrsCalibration>(DataCalib::GetCalibration()); 505 506 /*507 evt.runCtrl->calibInt.resize(1024*1440);508 509 const int16_t *off = evt.runCtrl->zcalib.data();510 int32_t *ptr = evt.runCtrl->calib.data();511 512 const uint64_t num = evt.runCtrl->calib.fNumOffset;513 for (int i=0; i<1024*1440)514 ptr[i] = off[i]/num;515 */516 517 // FIMXE: Check if file already exists...518 509 519 510 // Crate the file … … 525 516 case FAD::kCfitsio: file = new DataWriteFits(fPath, night, runid, fMsg); break; 526 517 case FAD::kFits: file = new DataWriteFits2(fPath, night, runid, fMsg); break; 518 case FAD::kZFits: file = new DataWriteFits2(fPath, night, runid, *evt.runCtrl->calib, fMsg); break; 527 519 case FAD::kRaw: file = new DataWriteRaw(fPath, night, runid, fMsg); break; 528 case FAD::kCalib: file = new DataCalib(fPath, night, runid, fDimDrsCalibration, fDimDrsRuns, fMsg); break;520 case FAD::kCalib: file = new DataCalib(fPath, night, runid, *evt.runCtrl->calib, fDimDrsCalibration, fDimDrsRuns, fMsg); break; 529 521 } 530 522 … … 653 645 virtual void CloseRun(uint32_t /*runid*/) { } 654 646 655 voidUpdateDimRoi(const pair<Time, array<uint16_t,2>> &roi)647 bool UpdateDimRoi(const pair<Time, array<uint16_t,2>> &roi) 656 648 { 657 649 fDimRoi.setData(roi.second.data(), sizeof(uint16_t)*2); 658 650 fDimRoi.Update(roi.first); 659 } 660 661 void UpdateDimTempRefClk(const tuple<Time, array<uint32_t,40>, array<int16_t,160>> &dat) 651 return true; 652 } 653 654 bool UpdateDimTempRefClk(const tuple<Time, array<uint32_t,40>, array<int16_t,160>> &dat) 662 655 { 663 656 const auto delay = boost::posix_time::seconds(5); … … 686 679 687 680 if (newt<oldt+delay) 688 return ;681 return true; 689 682 690 683 oldt = newt; … … 769 762 770 763 listtmp.clear(); 764 765 return true; 771 766 } 772 767 … … 883 878 Time fLastDimEventData; 884 879 885 voidUpdateDimRawData(const vector<char> &v)880 bool UpdateDimRawData(const vector<char> &v) 886 881 { 887 882 const EVENT *evt = reinterpret_cast<const EVENT*>(v.data()); … … 890 885 fDimRawData.setQuality(evt->TriggerType); 891 886 fDimRawData.Update(Time(evt->PCTime, evt->PCUsec)); 892 } 893 void UpdateDimEventData(const tuple<Time,uint32_t,array<float, 1440*4>> &tup) 887 888 return true; 889 } 890 891 bool UpdateDimEventData(const tuple<Time,uint32_t,array<float, 1440*4>> &tup) 894 892 { 895 893 fDimEventData.setQuality(get<1>(tup)); 896 894 fDimEventData.setData(get<2>(tup)); 897 895 fDimEventData.Update(get<0>(tup)); 896 897 return true; 898 898 } 899 899 … … 1146 1146 */ 1147 1147 1148 voidUpdateDimStatistics1(const pair<Time,GUI_STAT> &stat)1148 bool UpdateDimStatistics1(const pair<Time,GUI_STAT> &stat) 1149 1149 { 1150 1150 fDimStatistics1.setData(&stat.second, sizeof(GUI_STAT)); 1151 1151 fDimStatistics1.Update(stat.first); 1152 1153 return true; 1152 1154 } 1153 1155 … … 1272 1274 vector<uint> fNumConnected; 1273 1275 1274 voidprocHeader(const tuple<Time,bool,FAD::EventHeader> &dat)1276 bool procHeader(const tuple<Time,bool,FAD::EventHeader> &dat) 1275 1277 { 1276 1278 const Time &t = get<0>(dat); … … 1333 1335 Update(fDimDac, dacs, t); 1334 1336 } 1337 1338 return true; 1335 1339 } 1336 1340
Note:
See TracChangeset
for help on using the changeset viewer.