Changeset 3047 for trunk/MagicSoft/Mars/mraw
- Timestamp:
- 02/06/04 18:12:17 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/mraw
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mraw/MRawEvtData.cc
r2655 r3047 399 399 fHiGainFadcSamples = new MArrayB(npix*fRunHeader->GetNumSamplesHiGain()); 400 400 fLoGainFadcSamples = new MArrayB(npix*fRunHeader->GetNumSamplesLoGain()); 401 fABFlags = new TArrayC( (npix-1)/8+1);401 fABFlags = new TArrayC(fRunHeader->GetMaxPixId()); 402 402 403 403 fArraySize = npix; -
trunk/MagicSoft/Mars/mraw/MRawRunHeader.cc
r2984 r3047 235 235 } 236 236 237 // -------------------------------------------------------------------------- 238 // 239 // Return the number of pixel which are markes as connected in the 240 // pix assignment (>0) 241 // 237 242 UShort_t MRawRunHeader::GetNumConnectedPixels() const 238 243 { … … 241 246 UShort_t rc = 0; 242 247 for (int i=0; i<num; i++) 248 { 243 249 if (GetPixAssignment(i)>0) 244 250 rc++; 251 } 252 return rc; 253 } 254 255 // -------------------------------------------------------------------------- 256 // 257 // Return the maximum id which exists in the pix assignment 258 // 259 UShort_t MRawRunHeader::GetMaxPixId() const 260 { 261 const Int_t num = fPixAssignment->GetSize(); 262 263 UShort_t rc = 0; 264 for (int i=0; i<num; i++) 265 rc = TMath::Max(GetPixAssignment(i), rc); 266 245 267 return rc; 246 268 } -
trunk/MagicSoft/Mars/mraw/MRawRunHeader.h
r2984 r3047 93 93 const MTime &GetRunEnd() const { return fRunStop; } 94 94 UShort_t GetPixAssignment(UShort_t i) const; 95 UShort_t GetMaxPixId() const; 95 96 UShort_t GetNumConnectedPixels() const; 96 97
Note:
See TracChangeset
for help on using the changeset viewer.