Changeset 9531 for trunk


Ignore:
Timestamp:
12/21/09 10:06:41 (15 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r9530 r9531  
    2424     - allow unprescaled Calibration instead of requiring it (needed
    2525       for MCs)
     26     - changed the default for "no pattern" so that events with file
     27       format <5 are correctly treated. This might result in a small
     28       bias in the case newer files miss the calibration pattern, but
     29       that's unavoidable
     30
     31   * mtrigger/MTriggerPatternDecode.cc:
     32     - decode trigger pattern for files older than format version 5
     33       according to the file type
    2634
    2735   * resources/calibration_spline.rc:
    2836     - added dummy periods up to 89
     37
     38   * mmc/MMcFadcHeader.hxx:
     39     - changed version to 10 (got a warning for newer MCs)
    2940
    3041
  • trunk/MagicSoft/Mars/mtrigger/MTriggerPatternDecode.cc

    r9490 r9531  
    2929//  Decodes the trigger pattern from MRawEvtData into MTriggerPattern.
    3030//
    31 // For files before file version 5 the trigger pattern is set to 00000000.
    32 // This can be changed using the information about the file-type.
     31// For files before file version 5 the trigger pattern is set according
     32// to the file type
    3333//
    3434// For more details see: MTriggerPattern
     
    7070Int_t MTriggerPatternDecode::PreProcess(MParList *pList)
    7171{
    72     fRunHeader = (MRawRunHeader*)pList->FindCreateObj("MRawRunHeader");
     72    fRunHeader = (MRawRunHeader*)pList->FindObject("MRawRunHeader");
    7373    if (!fRunHeader)
    7474    {
     
    7777    }
    7878
    79     fEvtHeader = (MRawEvtHeader *)pList->FindObject("MRawEvtHeader");
     79    fEvtHeader = (MRawEvtHeader*)pList->FindObject("MRawEvtHeader");
    8080    if (!fEvtHeader)
    8181    {
     
    8686    fPattern = (MTriggerPattern*)pList->FindCreateObj("MTriggerPattern");
    8787    if (!fPattern)
    88     {
    89         *fLog << err << "MRawEvtHeader not found... abort." << endl;
    9088        return kFALSE;
    91     }
    9289
    9390    return kTRUE;
     
    9693// --------------------------------------------------------------------------
    9794//
    98 // For files before file version 5 the trigger pattern is set to 00000000.
    99 // This can be changed using the information about the file-type.
    10095//
    10196Int_t MTriggerPatternDecode::Process()
    10297{
    103     // No setting necessary because MTriggerPattern::reset() has
    104     // been called just before
    10598    if (fRunHeader->GetFormatVersion()<5)
     99    {
     100        switch (fRunHeader->GetRunType()&0xff)
     101        {
     102        case MRawRunHeader::kRTData:
     103            fPattern->fPrescaled   = MTriggerPattern::kTriggerLvl1;
     104            fPattern->fUnprescaled = MTriggerPattern::kTriggerLvl1;
     105            return kTRUE;
     106
     107        case MRawRunHeader::kRTPedestal:
     108            fPattern->fPrescaled   = MTriggerPattern::kPedestal;
     109            fPattern->fUnprescaled = MTriggerPattern::kPedestal;
     110            return kTRUE;
     111
     112        case MRawRunHeader::kRTCalibration:
     113            fPattern->fPrescaled   = MTriggerPattern::kCalibration;
     114            fPattern->fUnprescaled = MTriggerPattern::kCalibration;
     115            return kTRUE;
     116        }
    106117        return kTRUE;
     118    }
    107119
    108120    const UInt_t pattern = ~fEvtHeader->GetTriggerID();
  • trunk/MagicSoft/include-Classes/MMcFormat/MMcFadcHeader.hxx

    r8325 r9531  
    133133  void   DrawPixelContent(Int_t num) const { }
    134134
    135   ClassDef(MMcFadcHeader, 9)  //Stores Montecarlo Information describing the FADC behaviour
     135  ClassDef(MMcFadcHeader, 10)  //Stores Montecarlo Information describing the FADC behaviour
    136136};
    137137
Note: See TracChangeset for help on using the changeset viewer.