- Timestamp:
- 06/02/13 15:50:15 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/EventBuilder.cc
r16569 r16584 57 57 bool runOpen(const EVT_CTRL2 &evt); 58 58 bool runWrite(const EVT_CTRL2 &evt); 59 void runClose( );59 void runClose(RUN_CTRL2 &run); 60 60 void applyCalib(const EVT_CTRL2 &evt, const size_t &size); 61 61 void factOut(int severity, const char *message); … … 104 104 max_inuse = inuse; 105 105 106 void *mem = NULL;107 108 106 if (memory.empty()) 109 107 { 110 108 // No free slot available, allocate a new one 111 109 allocated += MAX_TOT_MEM; 112 mem = new char[MAX_TOT_MEM]; 113 } 114 else 115 { 116 // Get the next free slot from the stack and return it 117 const std::lock_guard<std::mutex> lock(mtx); 118 mem = memory.front(); 119 memory.pop_front(); 120 } 121 122 memset(mem, 0, MAX_HEAD_MEM); 110 return new char[MAX_TOT_MEM]; 111 } 112 113 // Get the next free slot from the stack and return it 114 const std::lock_guard<std::mutex> lock(mtx); 115 116 void *mem = memory.front(); 117 memory.pop_front(); 123 118 return mem; 124 119 }; … … 595 590 } 596 591 597 // count for inconsistencies598 if (evt->trgNum != rd.H.trigger_id)599 evt->Errors[0]++;600 if (evt->trgTyp != rd.H.trigger_type)601 evt->Errors[2]++;602 603 592 // It is maybe not likely, but the header of this board might have 604 593 // arrived earlier. (We could also update the run-info, but … … 852 841 return; 853 842 854 runClose( );843 runClose(run); 855 844 run.fileStat = kFileClosed; 856 845 … … 892 881 event->NumBoards = evt->nBoard; 893 882 894 event->Errors[0] = evt->Errors[0]; 895 event->Errors[1] = evt->Errors[1]; 896 event->Errors[2] = evt->Errors[2]; 897 event->Errors[3] = evt->Errors[3]; 898 899 event->PCTime = evt->time.tv_sec; 900 event->PCUsec = evt->time.tv_usec; 883 event->PCTime = evt->time.tv_sec; 884 event->PCUsec = evt->time.tv_usec; 901 885 902 886 for (int ib=0; ib<NBOARDS; ib++)
Note:
See TracChangeset
for help on using the changeset viewer.