- Timestamp:
- 06/03/13 11:22:04 (11 years ago)
- Location:
- trunk/FACT++/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/EventBuilder.cc
r16618 r16619 74 74 75 75 size_t g_maxMem; //maximum memory allowed for buffer 76 77 uint16_t g_evtTimeout; // timeout (sec) for one event 76 78 77 79 FACT_SOCK g_port[NBOARDS]; // .addr=string of IP-addr in dotted-decimal "ddd.ddd.ddd.ddd" … … 1365 1367 // The first event is the oldest. If the first event within the 1366 1368 // timeout window was received, we can stop searchinf further. 1367 if (evt->time.tv_sec >=actTime - 30)1369 if (evt->time.tv_sec+g_evtTimeout>=actTime) 1368 1370 break; 1369 1371 -
trunk/FACT++/src/EventBuilder.h
r16579 r16619 19 19 extern int g_reset ; //>0 = reset different levels of eventbuilder 20 20 extern size_t g_maxMem ; //maximum memory allowed for buffer 21 extern uint16_t g_evtTimeout; //timeout (sec) for one event 21 22 22 23 extern FACT_SOCK g_port[NBOARDS] ; // .port = baseport, .addr=string of IP-addr in dotted-decimal "ddd.ddd.ddd.ddd" -
trunk/FACT++/src/EventBuilderWrapper.h
r16612 r16619 225 225 "|roi:Region of interest of secondary baseline" 226 226 "|run:Run numbers of DRS runs (0=none)"), 227 fDimStatistics1 ("FAD_CONTROL/STATISTICS1", "I:5;X:3;I:1;I:2;C:40;I:40; X:40",227 fDimStatistics1 ("FAD_CONTROL/STATISTICS1", "I:5;X:3;I:1;I:2;C:40;I:40;I:40", 228 228 "Event Builder status for GUI display" 229 229 "|bufferInfo[int]:Events in buffer, incomp., comp., write, proc., tot." … … 232 232 "|rateNew[int]:Number of new start events received" 233 233 "|numConn[int]:Number of connections per board" 234 "|rateBytes[int]:Bytes read this cycle"235 "| totBytes[int]:Bytes read (counter)"),234 "|rateBytes[int]:Bytes read during last cylce" 235 "|relBytes[int]:Relative number of total bytes received (received - released)"), 236 236 fDimFileFormat("FAD_CONTROL/FILE_FORMAT", "S:1", "|format[int]:Current file format"), 237 237 fDimIncomplete("FAD_CONTROL/INCOMPLETE", "X:1", "|incomplete[bits]:One bit per board"), … … 307 307 { 308 308 g_maxMem = size_t(mb)*1000000; 309 } 310 void SetEventTimeout(uint16_t to) const 311 { 312 g_evtTimeout = to; 309 313 } 310 314 -
trunk/FACT++/src/fadctrl.cc
r16532 r16619 804 804 805 805 SetMaxMemory(mem); 806 807 return T::GetCurrentState(); 808 } 809 810 int SetEventTimeoutSec(const EventImp &evt) 811 { 812 if (!CheckEventSize(evt.GetSize(), "SetEventTimeoutSec", 2)) 813 return T::kSM_FatalError; 814 815 const int16_t sec = evt.GetShort(); 816 817 if (sec<=0) 818 { 819 ostringstream msg; 820 msg << hex << "Value " << sec << " out of range."; 821 T::Error(msg); 822 return T::GetCurrentState(); 823 } 824 825 SetEventTimeout(sec); 806 826 807 827 return T::GetCurrentState(); … … 1749 1769 "|memory[short]:Buffer size in Mega-bytes."); 1750 1770 1771 T::AddEvent("SET_EVENT_TIMEOUT", "S:1") 1772 (bind(&StateMachineFAD::SetEventTimeoutSec, this, placeholders::_1)) 1773 ("Set the timeout after which an event expires which was not completely received yet." 1774 "|timeout[sec]:Timeout in seconds [1;32767]"); 1775 1751 1776 T::AddEvent("SET_REGISTER", "I:2", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kRunInProgress) 1752 1777 (bind(&StateMachineFAD::SetRegister, this, placeholders::_1)) … … 1978 2003 // ---------- Setup event builder --------- 1979 2004 SetMaxMemory(conf.Get<unsigned int>("max-mem")); 2005 SetEventTimeout(conf.Get<uint16_t>("event-timeout")); 1980 2006 1981 2007 if (!InitRunNumber(conf.Get<string>("destination-folder"))) … … 2163 2189 builder.add_options() 2164 2190 ("max-mem,m", var<unsigned int>(100), "Maximum memory the event builder thread is allowed to consume for its event buffer") 2191 ("event-timeout", var<uint16_t>(30), "After how many seconds is an event considered to be timed out? (<=0: disabled)") 2165 2192 ("destination-folder", var<string>(""), "Destination folder (base folder) for the event builder binary data files.") 2166 2193 ;
Note:
See TracChangeset
for help on using the changeset viewer.