Changeset 2200
- Timestamp:
- 06/18/03 18:04:46 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r2199 r2200 40 40 - default mode changed from UPDATE to RECREATE 41 41 - default compression level changed from 9 to 1 42 43 * mraw/MRawEvtData.[h,cc]: 44 - fixed to skip non connected pixels 45 46 * mraw/MRawRunHeader.[h,cc]: 47 - added GetNumConnectedPixels 48 42 49 43 50 -
trunk/MagicSoft/Mars/mraw/MRawEvtData.cc
r2178 r2200 170 170 { 171 171 *fLog << endl; 172 *fLog << " " << setfill(' ') << setw(3) << dec << i << ": "; 172 *fLog << " " << setfill(' ') << setw(3) << dec << i << " -"; 173 *fLog << " " << setfill(' ') << setw(3) << dec << (*fHiGainPixId)[i] << ": "; 173 174 *fLog << (manip?dec:hex) << flush; 174 175 … … 313 314 if (fRunHeader && flag) 314 315 { 315 const int npix = fRunHeader->GetNumCrates()*fRunHeader->GetNumPixInCrate(); 316 //const int npix = fRunHeader->GetNumCrates()*fRunHeader->GetNumPixInCrate(); 317 const int npix = fRunHeader->GetNumConnectedPixels(); 316 318 317 319 if (fArraySize == npix) 318 320 { 319 321 fPosInArray = 0; 322 fConnectedPixels = 0; 320 323 return; 321 324 } … … 347 350 if (flag && fRunHeader) 348 351 { 349 const int npix = fRunHeader->GetNumCrates()*fRunHeader->GetNumPixInCrate(); 352 //const int npix = fRunHeader->GetNumCrates()*fRunHeader->GetNumPixInCrate(); 353 const int npix = fRunHeader->GetNumConnectedPixels(); 350 354 351 355 fHiGainPixId = new MArrayS(npix); … … 367 371 368 372 fPosInArray = 0; 373 fConnectedPixels = 0; 369 374 } 370 375 … … 428 433 const UShort_t npos = npic*fPosInArray; 429 434 430 Byte_t *higainsam = fHiGainFadcSamples->GetArray()+nhi*npos; 431 Byte_t *logainsam = fLoGainFadcSamples->GetArray()+nlo*npos; 432 433 // UShort_t *hipixid = (UShort_t*)fHiGainPixId->GetArray()+npos; 434 // UShort_t *lopixid = (UShort_t*)fLoGainPixId->GetArray()+npos; 435 Byte_t *higainsam = fHiGainFadcSamples->GetArray()+nhi*fConnectedPixels; 436 Byte_t *logainsam = fLoGainFadcSamples->GetArray()+nlo*fConnectedPixels; 435 437 436 438 for (int i=0; i<npic; i++) 437 439 { 438 // 439 // get the spiral pixel number from the run header 440 // 440 fin.read((char*)higainsam, nhi); 441 fin.read((char*)logainsam, nlo); 442 443 // calc the spiral hardware pixel number 441 444 const UShort_t ipos = npos+i; 442 445 443 const UShort_t npix = fRunHeader->GetPixAssignment(ipos); 446 // -1 converts the hardware pixel Id into the software pixel index 447 const Int_t npix = fRunHeader->GetPixAssignment(ipos); 448 449 // Check whether the pixel is connected or not 450 if (npix==0) 451 continue; 444 452 445 453 // … … 448 456 // Add to lo gains if lflag = 1 449 457 // 450 fHiGainPixId->AddAt(npix, ipos); 451 fin.read((char*)higainsam, nhi); 458 fHiGainPixId->AddAt(npix, fConnectedPixels); 452 459 higainsam += nhi; 453 460 … … 455 462 //if (IsLoGainOn(i, j)) 456 463 //{ 457 fLoGainPixId->AddAt(npix, ipos); 458 fin.read((char*)logainsam, nlo); 464 fLoGainPixId->AddAt(npix, fConnectedPixels); 459 465 logainsam += nlo; 460 466 //} 467 468 fConnectedPixels++; 461 469 } 462 470 -
trunk/MagicSoft/Mars/mraw/MRawEvtData.h
r2180 r2200 30 30 MArrayB *fLoGainFadcSamples; // list of lo gain samples of all pixels (ordering: see fLoGainPixId) 31 31 32 Int_t fPosInArray; //! 33 Int_t fArraySize; //! 32 Int_t fPosInArray; //! 33 Int_t fConnectedPixels; //! 34 Int_t fArraySize; //! 34 35 35 36 void InitArrays(Bool_t flag=kFALSE); -
trunk/MagicSoft/Mars/mraw/MRawRunHeader.cc
r2173 r2200 173 173 } 174 174 175 UShort_t MRawRunHeader::GetNumConnectedPixels() const 176 { 177 const Int_t num = fPixAssignment->GetSize(); 178 179 UShort_t rc = 0; 180 for (int i=0; i<num; i++) 181 if (GetPixAssignment(i)>0) 182 rc++; 183 return rc; 184 } 185 175 186 // -------------------------------------------------------------------------- 176 187 // -
trunk/MagicSoft/Mars/mraw/MRawRunHeader.h
r2173 r2200 95 95 UInt_t GetNumEvents() const { return fNumEvents; } 96 96 UShort_t GetPixAssignment(UShort_t i) const; 97 UShort_t GetNumConnectedPixels() const; 97 98 98 99 UInt_t GetNumSamplesPerCrate() const
Note:
See TracChangeset
for help on using the changeset viewer.