Changeset 17148 for trunk/Mars/mfileio
- Timestamp:
- 09/09/13 12:39:18 (11 years ago)
- Location:
- trunk/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars
-
Property svn:mergeinfo
set to
/branches/Mars_MC merged eligible
-
Property svn:mergeinfo
set to
-
trunk/Mars/mfileio/MWriteFitsFile.cc
r15277 r17148 15 15 #include "MWriteFitsFile.h" 16 16 #include "MFitsArray.h" 17 18 #include "MTime.h" 17 19 18 20 //for find … … 337 339 return kTRUE; 338 340 } 341 342 void MWriteFitsFile::SetupHeaderKeys(MRawRunHeader &header) 343 { 344 const MTime now(-1); 345 SetHeaderKey("ISMC",true,"Bool if File is Montecarlo File"); 346 SetHeaderKey("TELESCOP", "FACT", ""); 347 SetHeaderKey("PACKAGE", "MARS Cheobs", ""); 348 SetHeaderKey("VERSION", "1.0", ""); 349 SetHeaderKey("CREATOR", "Ceres", ""); 350 SetHeaderKey("EXTREL", 1., ""); 351 SetHeaderKey("COMPILED", __DATE__" "__TIME__, ""); 352 //SetHeaderKey("REVISION", "0", ""); 353 SetHeaderKey("ORIGIN", "FACT", ""); 354 SetHeaderKey("DATE", now.GetStringFmt("%Y-%m-%dT%H:%M:%S").Data(), ""); 355 SetHeaderKey("NIGHT", now.GetNightAsInt(), ""); 356 SetHeaderKey("TIMESYS", "UTC", ""); 357 SetHeaderKey("TIMEUNIT", "d", ""); 358 SetHeaderKey("MJDREF", 40587, ""); 359 //SetHeaderKey("BLDVER", 1, ""); 360 SetHeaderKey("RUNID", header.GetRunNumber(), ""); 361 SetHeaderKey("NBOARD", 40, ""); 362 SetHeaderKey("NPIX", header.GetNumPixel(), ""); 363 SetHeaderKey("NROI", header.GetNumSamplesHiGain(), ""); 364 SetHeaderKey("NROITM", 0, ""); 365 SetHeaderKey("TMSHIFT", 0, ""); 366 SetHeaderKey("CAMERA", "MGeomCamFACT", "Montecarlo File"); 367 SetHeaderKey("DAQ", "DRS4", "Montecarlo File"); 368 369 // FTemme: ADCRANGE and ADC have to be calculated, using the values for 370 // the fadctype. 371 // SetHeaderKey("ADCRANGE", 2000, "Dynamic range in mV"); 372 // SetHeaderKey("ADC", 12, "Resolution in bits"); 373 374 switch(header.GetRunType()) 375 { 376 case MRawRunHeader::kRTData|MRawRunHeader::kRTMonteCarlo: 377 SetHeaderKey("RUNTYPE", "data", ""); 378 break; 379 case MRawRunHeader::kRTPedestal|MRawRunHeader::kRTMonteCarlo: 380 SetHeaderKey("RUNTYPE", "pedestal", ""); 381 break; 382 case MRawRunHeader::kRTCalibration|MRawRunHeader::kRTMonteCarlo: 383 SetHeaderKey("RUNTYPE", "calibration", ""); 384 break; 385 } 386 // SetHeaderKey("ID", 777, "Board 0: Board ID"); 387 // SetHeaderKey("FMVER", 532, "Board 0: Firmware Version"); 388 // SetHeaderKey("DNA", "0", ""); 389 // SetHeaderKey("BOARD", 0, ""); 390 // SetHeaderKey("PRESC", 40, ""); 391 // SetHeaderKey("PHASE", 0, ""); 392 // SetHeaderKey("DAC0", 26500, ""); 393 // SetHeaderKey("DAC1", 0, ""); 394 // SetHeaderKey("DAC2", 0, ""); 395 // SetHeaderKey("DAC3", 0, ""); 396 // SetHeaderKey("DAC4", 28800, ""); 397 // SetHeaderKey("DAC5", 28800, ""); 398 // SetHeaderKey("DAC6", 28800, ""); 399 // SetHeaderKey("DAC7", 28800, ""); 400 SetHeaderKey("REFCLK", header.GetFreqSampling(), ""); 401 SetHeaderKey("DRSCALIB", false, ""); 402 // SetHeaderKey("TSTARTI", 0, ""); 403 // SetHeaderKey("TSTARTF", 0., ""); 404 // SetHeaderKey("TSTOPI", 0, ""); 405 // SetHeaderKey("TSTOPF", 0., ""); 406 // SetHeaderKey("DATE-OBS", "1970-01-01T00:00:00", ""); 407 // SetHeaderKey("DATE-END", "1970-01-01T00:00:00", ""); 408 // SetHeaderKey("NTRG", 0, ""); 409 // SetHeaderKey("NTRGPED", 0, ""); 410 // SetHeaderKey("NTRGLPE", 0, ""); 411 // SetHeaderKey("NTRGTIM", 0, ""); 412 // SetHeaderKey("NTRGLPI", 0, ""); 413 // SetHeaderKey("NTRGEXT1", 0, ""); 414 // SetHeaderKey("NTRGEXT2", 0, ""); 415 // SetHeaderKey("NTRGMISC", 0, ""); 416 } 417 339 418 template<> 340 419 std::string MWriteFitsFile::GetFitsString(const double& value) … … 1127 1206 return kFALSE; 1128 1207 1208 1209 MRawRunHeader* header = (MRawRunHeader*)pList->FindObject("MRawRunHeader"); 1210 SetupHeaderKeys(*header); 1211 1129 1212 if (GetContainer(pList) == kFALSE) 1130 1213 return kFALSE; -
trunk/Mars/mfileio/MWriteFitsFile.h
r15277 r17148 19 19 #include "MFitsArray.h" 20 20 #endif 21 22 #ifndef MARS_MRawRunHeader 23 #include "MRawRunHeader.h" 24 #endif 25 26 class MRawRunHeader; 21 27 22 28 /////////////////////////////////////////////////////////////////////////////// … … 137 143 Int_t PreProcess(MParList *pList); 138 144 Int_t PostProcess(); 145 146 void SetupHeaderKeys(MRawRunHeader &header); 139 147 140 148 //Header keys related stuff
Note:
See TracChangeset
for help on using the changeset viewer.