Changeset 7640
- Timestamp:
- 04/21/06 16:39:46 (19 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r7639 r7640 18 18 19 19 -*-*- END OF LINE -*-*- 20 21 2006/04/13 Thomas Bretz 22 23 * mraw/MRawRunHeader.[h,cc]: 24 - adapted to new DAQ format version 6 25 - increased class version number 26 27 20 28 21 29 2006/04/13 Thomas Bretz -
trunk/MagicSoft/Mars/mraw/MRawRunHeader.cc
r7615 r7640 35 35 // Format Version 5: 36 36 // ----------------- 37 // - added fCameraVersion 38 // - added fTelescopeNumber 39 // - changed length of fProjectName to 101 40 // - changed length of fSourceName to 81 41 // 42 // Format Version 6: 43 // ----------------- 37 44 // - now the sub millisecond information of the time is valid and decoded 38 45 // which enhances the precision from 51.2us to 200ns … … 89 96 90 97 const UShort_t MRawRunHeader::kMagicNumber = 0xc0c0; 91 const Byte_t MRawRunHeader::kMaxFormatVersion = 5;98 const Byte_t MRawRunHeader::kMaxFormatVersion = 6; 92 99 93 100 // -------------------------------------------------------------------------- … … 105 112 fFormatVersion=0; 106 113 fSoftVersion=0; 114 fTelescopeNumber=0; 115 fCameraVersion=0; 107 116 fRunType=kRTNone; // use 0xffff for invalidation, 0 means: Data run 108 117 fRunNumber=0; 109 memset(fProjectName, 0, 23); 110 memset(fSourceName, 0, 13); 118 memset(fProjectName, 0, 101); 119 memset(fSourceName, 0, 81); 120 memset(fObservationMode, 0, 61); 111 121 fSourceEpochChar[0]=0; 112 122 fSourceEpochDate=0; … … 256 266 Byte_t dummy[16]; 257 267 258 fin.read((char*)&fFormatVersion, 2); // Total=4 268 // ----- File format version ----- 269 fin.read((char*)&fFormatVersion, 2); // Total=4 259 270 if (fFormatVersion>kMaxFormatVersion) 260 271 { … … 263 274 } 264 275 265 fin.read((char*)&fSoftVersion, 2); // Total=6 266 fin.read((char*)&fRunType, 2); // Total=8 267 fin.read((char*)&fRunNumber, 4); // Total=12 268 fin.read((char*)&fProjectName, 22); // Total=34 269 fin.read((char*)&fSourceName, 12); // Total=46 270 fin.read((char*)dummy, 4); // was RA (moved to tracking system) 271 fin.read((char*)dummy, 4); // was DEC (moved to tracking system) 276 // ----- DAQ software format version ----- 277 fin.read((char*)&fSoftVersion, 2); // Total=6 278 279 // ----- Camera geometry and telescope number ----- 280 if (fFormatVersion>5) 281 { 282 fin.read((char*)&fCameraVersion, 2); // (+2) 283 fin.read((char*)&fTelescopeNumber, 2); // (+2) 284 } 285 286 // ----- Run information ----- 287 fin.read((char*)&fRunType, 2); // Total=8 288 fin.read((char*)&fRunNumber, 4); // Total=12 289 fin.read((char*)&fProjectName, fFormatVersion>5?100:22); // Total=34 (+78) 290 fin.read((char*)&fSourceName, fFormatVersion>5? 80:12); // Total=46 (+58) 291 292 if (fFormatVersion>5) 293 fin.read((char*)fObservationMode, 60); // (+60) 294 295 // ----- Source position ----- 296 fin.read((char*)dummy, 4); // F32 SourceRA; Total=48 297 fin.read((char*)dummy, 4); // F32 SourceDEC; Total=52 298 if (fFormatVersion>5) 299 { 300 fin.read((char*)dummy, 4); // F32 TelescopeRA; (+4) 301 fin.read((char*)dummy, 4); // F32 TelescopeDEC; (+4) 302 } 272 303 fin.read((char*)&fSourceEpochChar, 2); // Total=56 273 304 fin.read((char*)&fSourceEpochDate, 2); // Total=58 305 306 // ----- Old Start time ----- 274 307 if (fFormatVersion<2) // Total += 10 275 308 { … … 281 314 fRunStart.Set(y, m, d, 0, 0, 0, 0); 282 315 } 316 317 // ----- Data Geometry ----- 283 318 fin.read((char*)&fNumCrates, 2); // Total=60 284 319 fin.read((char*)&fNumPixInCrate, 2); // Total=62 285 320 fin.read((char*)&fNumSamplesLoGain, 2); // Total=64 286 321 fin.read((char*)&fNumSamplesHiGain, 2); // Total=66 322 323 // ----- Number of events ----- 287 324 fin.read((char*)&fNumEvents, 4); // Total=70 325 326 // ----- Start/Stop time ----- 288 327 if (fFormatVersion>1) 289 328 { … … 298 337 fPixAssignment->Set(nPixel); 299 338 339 // ----- Pixel Assignement ----- 300 340 fin.read((char*)fPixAssignment->GetArray(), nPixel*2); 301 341 fin.read((char*)&dummy, 16); 342 343 Print(); 302 344 303 345 return FixAssignment(); … … 348 390 *fLog << "Version: " << dec << "Format=" << fFormatVersion << " "; 349 391 *fLog << "Software=" << fSoftVersion << endl; 392 if (fFormatVersion>5) 393 *fLog << "Telescope: " << fTelescopeNumber << " (Camera #" << fCameraVersion << ")" <<endl; 350 394 *fLog << "RunNumber: " << fRunNumber << " (Type=" << GetRunTypeStr() << ")" << endl; 351 395 *fLog << "ProjectName: '" << fProjectName << "'" << endl; 396 if (fFormatVersion>5) 397 *fLog << "Observation: '" << fObservationMode << "'" << endl; 352 398 *fLog << "Source: '" << fSourceName << "' " << " "; 353 399 *fLog << fSourceEpochChar << dec << fSourceEpochDate << endl; … … 492 538 return 80+fNumCrates*fNumPixInCrate*2+16; 493 539 case 2: 540 case 3: 541 case 4: 542 case 5: 494 543 return 84+fNumCrates*fNumPixInCrate*2+16; 544 case 6: 545 return 84+fNumCrates*fNumPixInCrate*2+16 +4+78+58+60+8; 495 546 } 496 547 return 0; -
trunk/MagicSoft/Mars/mraw/MRawRunHeader.h
r7441 r7640 41 41 UShort_t fFormatVersion; 42 42 UShort_t fSoftVersion; 43 UShort_t fCameraVersion; 44 UShort_t fTelescopeNumber; 43 45 UShort_t fRunType; 44 46 UInt_t fRunNumber; 45 Char_t fProjectName[23]; 46 Char_t fSourceName[13]; 47 Char_t fProjectName[101];//23]; 48 Char_t fSourceName[81]; //13]; 49 Char_t fObservationMode[61]; 47 50 Char_t fSourceEpochChar[2]; 48 51 UShort_t fSourceEpochDate;
Note:
See TracChangeset
for help on using the changeset viewer.