Changeset 13030 for trunk/FACT++
- Timestamp:
- 03/09/12 16:49:23 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/DataWriteFits2.cc
r12997 r13030 12 12 fFile.AddColumnInt("EventNum", "uint32", "FAD board event counter"); 13 13 fFile.AddColumnInt("TriggerNum", "uint32", "FTM board trigger counter"); 14 fFile.AddColumnShort("TriggerType", "uint16" );15 fFile.AddColumnInt("NumBoards", "uint32" );16 fFile.AddColumnByte(4, "Errors" );17 fFile.AddColumnInt("SoftTrig" );14 fFile.AddColumnShort("TriggerType", "uint16", "FTM board trigger type"); 15 fFile.AddColumnInt("NumBoards", "uint32", "Number of connected boards"); 16 fFile.AddColumnByte(4, "Errors", "Communication error counters"); 17 fFile.AddColumnInt("SoftTrig", "(not yet implemented)"); 18 18 fFile.AddColumnInt(2, "UnixTimeUTC", "uint32", "Unix time seconds and microseconds"); 19 fFile.AddColumnInt(NBOARDS, "BoardTime", "uint32" );19 fFile.AddColumnInt(NBOARDS, "BoardTime", "uint32", "Board internal time counter"); 20 20 fFile.AddColumnShort(NPIX, "StartCellData", "uint32", "DRS4 start cell of readout"); 21 21 fFile.AddColumnShort(NTMARK, "StartCellTimeMarker", "uint32", "DRS4 start cell of readout time marker"); 22 fFile.AddColumnShort(h->NPix*h->Nroi, "Data", "int16" );23 fFile.AddColumnShort(h->NTm*realRoiTM, "TimeMarker", "int16" );22 fFile.AddColumnShort(h->NPix*h->Nroi, "Data", "int16", "Digitized data"); 23 fFile.AddColumnShort(h->NTm*realRoiTM, "TimeMarker", "int16", "Digitized time marker - if available"); 24 24 25 25 const size_t sz = (h->NPix*h->Nroi + h->NTm*realRoiTM)*2; … … 46 46 fFile.SetStr( "TIMESYS", "UTC", "Time system"); 47 47 fFile.SetStr( "TIMEUNIT", "d", "Time given in days w.r.t. to MJDREF"); 48 fFile.SetInt( "MJDREF", 40587, " Store times in UNIX time (for convenience,seconds since 1970/1/1)");48 fFile.SetInt( "MJDREF", 40587, "MJD to UNIX time (seconds since 1970/1/1)"); 49 49 //WriteKey("CONTACT", PACKAGE_BUGREPORT, "Current package maintainer"); 50 50 //WriteKey("URL", PACKAGE_URL, "Current repositiory location"); … … 61 61 62 62 const uint16_t realOffset = (h->NroiTM > h->Nroi) ? h->NroiTM - 2*h->Nroi : 0; 63 fFile.SetInt("TMSHIFT", realOffset, "Shift of the start of the time marker readout wrtto data");63 fFile.SetInt("TMSHIFT", realOffset, "Shift of marker readout w.r.t. to data"); 64 64 65 65 //FIXME should we also put the start and stop time of the received data ? 66 66 //now the events header related variables 67 fFile.SetStr("CAMERA", "MGeomCamFACT", " ");68 fFile.SetStr("DAQ", "DRS4", " ");67 fFile.SetStr("CAMERA", "MGeomCamFACT", "MARS camera geometry class"); 68 fFile.SetStr("DAQ", "DRS4", "Data acquisition type"); 69 69 fFile.SetInt("ADCRANGE", 2000, "Dynamic range in mV"); 70 70 fFile.SetInt("ADC", 12, "Resolution in bits"); … … 242 242 } 243 243 244 ostringstream str; 245 str << "fstream::write() failed for '" << fFileName << "': " << strerror(errno) << " [errno=" << errno << "]"; 246 Error(str); 247 248 return false; 244 if (!fFile) 245 { 246 ostringstream str; 247 str << "fstream::write() failed for '" << fFileName << "': " << strerror(errno) << " [errno=" << errno << "]"; 248 Error(str); 249 return false; 250 } 251 252 return true; 249 253 } 250 254 … … 258 262 259 263 fFile.SetInt("TSTARTI", uint32_t(floor(start.UnixDate())), 260 "Time when first ev ent received (integral part)");264 "Time when first evt received (integral part)"); 261 265 fFile.SetFloat("TSTARTF", fmod(start.UnixDate(), 1), 262 "Time when first ev ent received (fractional part)");266 "Time when first evt received (fractional part)"); 263 267 fFile.SetInt("TSTOPI", uint32_t(floor(stop.UnixDate())), 264 "Time when last ev ent received (integral part)");268 "Time when last evt received (integral part)"); 265 269 fFile.SetFloat("TSTOPF", fmod(stop.UnixDate(), 1), 266 "Time when last ev ent received (fractional part)");270 "Time when last evt received (fractional part)"); 267 271 fFile.SetStr("DATE-OBS", start.Iso(), 268 272 "Time when first event received"); … … 270 274 "Time when last event received"); 271 275 272 fFile.SetInt("NTRG", fTriggerCounter[0], "N umberof physics triggers written");273 fFile.SetInt("NTRGPED", fTriggerCounter[1], "N umberof pure pedestal triggers written");274 fFile.SetInt("NTRGLPE", fTriggerCounter[2], "N umberof external light pulser triggers written");275 fFile.SetInt("NTRGTIM", fTriggerCounter[3], "N umberof time calibration triggers written");276 fFile.SetInt("NTRGLPI", fTriggerCounter[4], "N umberof internal light pulser triggers written");277 fFile.SetInt("NTRGEXT1", fTriggerCounter[5], "N umberof triggers from ext1 written");278 fFile.SetInt("NTRGEXT2", fTriggerCounter[6], "N umberof triggers from ext2 written");279 fFile.SetInt("NTRGMISC", fTriggerCounter[7], "N umber of triggers belonging to no other category written");276 fFile.SetInt("NTRG", fTriggerCounter[0], "No of physics triggers written"); 277 fFile.SetInt("NTRGPED", fTriggerCounter[1], "No of pure pedestal triggers written"); 278 fFile.SetInt("NTRGLPE", fTriggerCounter[2], "No of external light pulser triggers written"); 279 fFile.SetInt("NTRGTIM", fTriggerCounter[3], "No of time calibration triggers written"); 280 fFile.SetInt("NTRGLPI", fTriggerCounter[4], "No of internal light pulser triggers written"); 281 fFile.SetInt("NTRGEXT1", fTriggerCounter[5], "No of triggers from ext1 written"); 282 fFile.SetInt("NTRGEXT2", fTriggerCounter[6], "No of triggers from ext2 written"); 283 fFile.SetInt("NTRGMISC", fTriggerCounter[7], "No of all other triggers"); 280 284 } 281 285
Note:
See TracChangeset
for help on using the changeset viewer.