Changeset 12430
- Timestamp:
- 11/06/11 18:32:12 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/DataWriteFits.cc
r12269 r12430 48 48 fFile.AddColumn('S', "StartCellData", NPIX); 49 49 fFile.AddColumn('S', "StartCellTimeMarker", NTMARK); 50 fFile.AddColumn('S', "Data", h->NPix*h->Nroi); 51 fFile.AddColumn('S', "TimeMarker", h->NTm*h->NroiTM); 50 fFile.AddColumn('S', "Data", h->NPix*h->Nroi); 51 52 int16_t realRoiTM = (h->NroiTM > h->Nroi) ? h->Nroi : 0; 53 fFile.AddColumn('S', "TimeMarker", h->NTm*realRoiTM);//ETIENNE TM); 52 54 53 55 // Write length of physical pipeline (1024) … … 55 57 fConv = new Converter(Converter::ToFormat(fFile.GetColumnTypes())); 56 58 57 const size_t sz = (h->NPix*h->Nroi + h->NTm* h->NroiTM)*2;59 const size_t sz = (h->NPix*h->Nroi + h->NTm*realRoiTM)*2;//ETIENNE TM)*2; 58 60 if (fConv->GetSize()-sz+4!=sizeof(EVENT)) 59 61 { … … 90 92 fFile.WriteKey("NTMARK", h->NTm, "Number of Time marks"); 91 93 fFile.WriteKey("NROI", h->Nroi, "Number of slices per pixels"); 92 fFile.WriteKey("NROITM", h->NroiTM, "Number of slices per time-marker"); 94 fFile.WriteKey("NROITM", realRoiTM, "Number of slices per time-marker"); //ETIENNE from NroiTMm to Nroi 95 int realOffset = (h->NroiTM > h->Nroi) ? h->NroiTM - 2*h->Nroi : 0; 96 fFile.WriteKey("OFFSET", realOffset, "Offset between pixels ROI and TM ROi"); //ETIENNE added 93 97 94 98 //FIXME should we also put the start and stop time of the received data ? … … 181 185 if (!fFile.AddRow()) 182 186 return false; 183 184 const size_t sz = sizeof(EVENT) + sizeof(e->StartPix)*e->Roi+sizeof(e->StartTM)* e->RoiTM;187 int realRoiTM = (e->RoiTM > e->Roi) ? e->Roi : 0; 188 const size_t sz = sizeof(EVENT) + sizeof(e->StartPix)*e->Roi+sizeof(e->StartTM)*realRoiTM; //ETIENNE from RoiTm to Roi 185 189 186 190 const vector<char> data = fConv->ToFits(reinterpret_cast<char*>(e)+4, sz-4);
Note:
See TracChangeset
for help on using the changeset viewer.