Changeset 10979
- Timestamp:
- 06/10/11 11:58:49 (13 years ago)
- Location:
- trunk/FACT++/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/EventBuilder.c
r10963 r10979 262 262 263 263 264 needmem = sizeof(EVENT) + NPIX*nRoi*2 + NTMARK*nRoi*2 - 2 ; //-2 because of dummy adc_data[1]264 needmem = sizeof(EVENT) + NPIX*nRoi*2 + NTMARK*nRoi*2; 265 265 266 266 headmem = NBOARDS* sizeof(PEVNT_HEADER) ; -
trunk/FACT++/src/EventBuilderWrapper.h
r10967 r10979 161 161 enum 162 162 { 163 kEndOfFile = 0, 163 164 kIdentifier = 1, 164 165 kRunHeader, … … 202 203 } 203 204 205 // FIXME: Split this 204 206 const vector<char> block(sizeof(uint32_t)+sizeof(RUN_TAIL)); 205 207 WriteBlockHeader(kRunSummary, 1, 0, block.size()); … … 221 223 virtual bool Write(EVENT *evt) 222 224 { 223 const int sh = sizeof( PEVNT_HEADER)+(NPIX-1)*evt->Roi*2;225 const int sh = sizeof(EVENT)-2 + NPIX*evt->Roi*2; 224 226 225 227 WriteBlockHeader(kEvent, 1, fCounter++, sh); 226 fOut.write(reinterpret_cast<char*>(evt)+2, sh -2);228 fOut.write(reinterpret_cast<char*>(evt)+2, sh); 227 229 return true; 228 230 } 229 231 virtual bool Close(RUN_TAIL *tail= 0) 230 232 { 233 WriteBlockHeader(kEndOfFile, 0, 0, 0); 234 231 235 if (tail) 232 236 { … … 522 526 fNumRows++; 523 527 524 const int sh = sizeof( PEVNT_HEADER)+(NPIX-1)*e->Roi*2;528 const int sh = sizeof(EVENT)+NPIX*e->Roi*2; 525 529 526 530 // column size pointer -
trunk/FACT++/src/FAD.h
r10963 r10979 128 128 int16_t StartTM[NTMARK]; // First Channel for TimeMark (sorted Hardware ID) ; -1 if not filled 129 129 130 uint16_t Adc_Data[ 1]; // final length defined by malloc ....130 uint16_t Adc_Data[]; // final length defined by malloc .... 131 131 132 132 } EVENT ;
Note:
See TracChangeset
for help on using the changeset viewer.