Changeset 11448 for trunk


Ignore:
Timestamp:
07/18/11 16:50:27 (13 years ago)
Author:
tbretz
Message:
Added setter to init fact data and to set the format values.
Location:
trunk/Mars/mraw
Files:
2 edited

Legend:

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

    r9542 r11448  
    12781278}
    12791279
     1280void MRawRunHeader::InitFact(UShort_t num, UShort_t pix, UShort_t samples)
     1281{
     1282    fNumCrates     = num;
     1283    fNumPixInCrate = pix;
     1284    fCameraVersion = 0xfac7;
     1285    fFadcType      = 0xfac7;
     1286
     1287    fPixAssignment->Set(num*pix);
     1288
     1289    for (int i=0; i<num*pix; i++)
     1290        (*fPixAssignment)[i] = i+1;
     1291
     1292    fNumSamplesHiGain  = samples;
     1293    fNumSamplesLoGain  = 0;
     1294    fNumBytesPerSample = 2;      // number of bytes per sample
     1295    fSamplingFrequency = 2000;   // Sampling Frequency [MHz]
     1296    fFadcResolution    = 12;     // number of significant bits
     1297}
     1298
    12801299// --------------------------------------------------------------------------
    12811300//
  • trunk/Mars/mraw/MRawRunHeader.h

    r9606 r11448  
    2929        kRTPointRun    = 0x0007,
    3030        kRTMonteCarlo  = 0x0100,
     31        kRTFact        = 0xfac7,
    3132        kRTNone        = 0xffff
    3233    };
     
    107108    void InitCamera(UShort_t type, UShort_t pix=0);
    108109    void InitPixels(UShort_t pix) { InitCamera((UShort_t)-1, pix); }
     110    void InitFact(UShort_t num, UShort_t pix, UShort_t samples);
    109111    void SetRunType(UShort_t type) { fRunType=type; }
    110112    void SetRunInfo(UShort_t tel, UInt_t run, UInt_t file=0);
     
    116118    void SetNumEvents(UInt_t num);
    117119    void SetValidMagicNumber() { fMagicNumber=kMagicNumber; }
     120    void SetFormat(UShort_t file, UShort_t soft) { fFormatVersion=file; fSoftVersion=soft; }
    118121
    119122    // This is to get the numbers...
Note: See TracChangeset for help on using the changeset viewer.