Changeset 11199
- Timestamp:
- 06/27/11 15:06:10 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/EventBuilderWrapper.h
r11188 r11199 23 23 extern int CloseRunFile(uint32_t runId, uint32_t closeTime); 24 24 } 25 26 namespace ba = boost::asio; 27 namespace bs = boost::system; 28 29 using ba::ip::tcp; 25 30 26 31 class DataFileImp … … 718 723 DimDescribedService fDimRuns; 719 724 DimDescribedService fDimEvents; 720 DimDescribedService fDimCurrentEvent;725 // DimDescribedService fDimCurrentEvent; 721 726 DimDescribedService fDimEventData; 722 727 DimDescribedService fDimFwVersion; … … 739 744 fDimRuns ("FAD_CONTROL/RUNS", "I:1", ""), 740 745 fDimEvents ("FAD_CONTROL/EVENTS", "I:2", ""), 741 fDimCurrentEvent("FAD_CONTROL/CURRENT_EVENT", "I:1", ""),746 // fDimCurrentEvent("FAD_CONTROL/CURRENT_EVENT", "I:1", ""), 742 747 fDimEventData ("FAD_CONTROL/EVENT_DATA", "S:1;I:1;S:1;I:2;S:1;S", ""), 743 748 fDimFwVersion ("FAD_CONTROL/FIRMWARE_VERSION", "F:43", ""), … … 755 760 756 761 fDimRuns.Update(uint32_t(0)); 757 fDimCurrentEvent.Update(uint32_t(0));762 // fDimCurrentEvent.Update(uint32_t(0)); 758 763 fDimEvents.Update(fNumEvts); 759 764 … … 876 881 877 882 bool IsConnected(int i) const { return gi_NumConnect[i]==7; } 878 bool IsDisconnected(int i) const { return gi_NumConnect[i]<=0; } 883 bool IsConnecting(int i) const { return !IsConnected(i) && !IsDisconnected(i); } 884 bool IsDisconnected(int i) const { return gi_NumConnect[i]<=0 && g_port[i].sockDef==0; } 879 885 int GetNumConnected(int i) const { return gi_NumConnect[i]; } 880 886 … … 971 977 fDimRuns.Update(fMaxRun); 972 978 fDimEvents.Update(fNumEvts); 973 fDimCurrentEvent.Update(uint32_t(0));979 // fDimCurrentEvent.Update(uint32_t(0)); 974 980 } 975 981 … … 988 994 if (file->GetRunId()==fMaxRun) 989 995 { 990 fDimCurrentEvent.Update(e->EventNum);996 //fDimCurrentEvent.Update(e->EventNum); 991 997 fNumEvts[kCurrent]++; 992 998 } 993 999 994 1000 fNumEvts[kTotal]++; 995 fDimEvents.Update(fNumEvts); 1001 1002 static Time oldt; 1003 Time newt; 1004 if (newt>oldt+boost::posix_time::seconds(1)) 1005 { 1006 fDimEvents.Update(fNumEvts); 1007 oldt = newt; 1008 } 996 1009 997 1010 // ===> SignalEvtWritten(runid); … … 1135 1148 1136 1149 } __attribute__((__packed__));; 1137 1150 /* 1138 1151 template<typename T> 1139 1152 vector<T> CheckVals(const PEVNT_HEADER *fadhd, const T *val, bool &rc) … … 1158 1171 return vec; 1159 1172 } 1160 /* 1173 1161 1174 template<typename T> 1162 1175 vector<uint8_t> CheckBits(const PEVNT_HEADER *fadhd, const T &val, T &rc) … … 1185 1198 int eventCheck(PEVNT_HEADER *fadhd, EVENT *event) 1186 1199 { 1200 1201 return 0; 1202 1187 1203 /* 1188 1204 fadhd[i] ist ein array mit den 40 fad-headers … … 1466 1482 vector<uint> con(gi_NumConnect, gi_NumConnect+40); 1467 1483 1468 bool changed = con!=fNumConnected ;1484 bool changed = con!=fNumConnected || !IsThreadRunning(); 1469 1485 1470 1486 fNumConnected = con; … … 1566 1582 void debugHead(int socket, void *buf) 1567 1583 { 1568 EventBuilderWrapper::This->debugHead(socket, FAD::EventHeader(vector<uint16_t>(reinterpret_cast<uint16_t*>(buf), 1569 reinterpret_cast<uint16_t*>(buf)+sizeof(FAD::EventHeader)/2))); 1584 const uint16_t *ptr = reinterpret_cast<uint16_t*>(buf); 1585 1586 EventBuilderWrapper::This->debugHead(socket, FAD::EventHeader(ptr)); 1570 1587 } 1571 1588 … … 1577 1594 void debugRead(int isock, int ibyte, int32_t event, int32_t ftmevt, int32_t runno, int state, uint32_t tsec, uint32_t tusec) 1578 1595 { 1579 returnEventBuilderWrapper::This->debugRead(isock, ibyte, event, ftmevt, runno, state, tsec, tusec);1596 EventBuilderWrapper::This->debugRead(isock, ibyte, event, ftmevt, runno, state, tsec, tusec); 1580 1597 } 1581 1598
Note:
See TracChangeset
for help on using the changeset viewer.