Changeset 11869 for trunk/Mars/mraw


Ignore:
Timestamp:
08/09/11 23:52:20 (13 years ago)
Author:
tbretz
Message:
Implemented the possibility to set the pixel map in the run-header when initializing for fact data.
Location:
trunk/Mars/mraw
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/mraw/MRawRunHeader.cc

    r11554 r11869  
    12831283}
    12841284
    1285 void MRawRunHeader::InitFact(UShort_t num, UShort_t pix, UShort_t samples)
     1285void MRawRunHeader::InitFact(UShort_t num, UShort_t pix, UShort_t samples, UShort_t *map)
    12861286{
    12871287    fNumCrates     = num;
     
    12921292    fPixAssignment->Set(num*pix);
    12931293
    1294     for (int i=0; i<num*pix; i++)
    1295         (*fPixAssignment)[i] = i+1;
     1294    if (map)
     1295        for (int i=0; i<num*pix; i++)
     1296            (*fPixAssignment)[i] = map[i]+1;
     1297    else
     1298    {
     1299        for (int i=0; i<num*pix; i++)
     1300            (*fPixAssignment)[i] = i+1;
     1301    }
    12961302
    12971303    fNumSamplesHiGain  = samples;
  • trunk/Mars/mraw/MRawRunHeader.h

    r11554 r11869  
    109109    void InitCamera(UShort_t type, UShort_t pix=0);
    110110    void InitPixels(UShort_t pix) { InitCamera((UShort_t)-1, pix); }
    111     void InitFact(UShort_t num, UShort_t pix, UShort_t samples);
     111    void InitFact(UShort_t num, UShort_t pix, UShort_t samples, UShort_t *map=0);
    112112    void SetRunType(UShort_t type) { fRunType=type; }
    113113    void SetRunInfo(UShort_t tel, UInt_t run, UInt_t file=0);
     
    164164    UInt_t   GetMax() const { switch (fNumBytesPerSample) { case 1: return 0xff; case 2: return 0xffff; case 4: return 0xffffffff; } return 0; }
    165165
     166    const MArrayS &GetPixAssignment() const { return *fPixAssignment; }
     167
    166168    UInt_t GetNumSamplesPerCrate() const
    167169    {
Note: See TracChangeset for help on using the changeset viewer.