Ignore:
Timestamp:
04/07/05 11:32:22 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc

    r6907 r6913  
    9292#include "MTriggerPatternDecode.h"
    9393#include "MFTriggerPattern.h"
     94#include "MFTriggerLvl1.h"
    9495#include "MGeomApply.h"
    9596//#include "MMcPedestalCopy.h"
     
    179180}
    180181
    181 Bool_t MJCalibrateSignal::ReadCalibration(TObjArray &l, MBadPixelsCam &cam, MExtractor* &ext1, MExtractor* &ext2, TString &geom) const
     182Bool_t MJCalibrateSignal::ReadCalibration(TObjArray &l, MBadPixelsCam &cam, MExtractor* &ext2, MExtractor* &ext3, TString &geom) const
    182183{
    183184
     
    193194    }
    194195
    195     if (!ext1)
    196     {
    197         TObject *o = file.Get("ExtractSignal");
    198         if (o && !o->InheritsFrom(MExtractor::Class()))
    199         {
    200             *fLog << err << dbginf << "ERROR - ExtractSignal read from " << fname << " doesn't inherit from MExtractor!" << endl;
    201             return kFALSE;
    202         }
    203         ext1 = o ? (MExtractor*)o->Clone() : NULL;
    204     }
    205 
    206     TObject *o = file.Get("ExtractTime");
     196    TObject *o = file.Get("ExtractSignal");
     197    if (o && !o->InheritsFrom(MExtractor::Class()))
     198    {
     199        *fLog << err << dbginf << "ERROR - ExtractSignal read from " << fname << " doesn't inherit from MExtractor!" << endl;
     200        return kFALSE;
     201    }
     202    ext3 = o ? (MExtractor*)o->Clone() : NULL;
     203
     204    o = file.Get("ExtractTime");
    207205    if (o && !o->InheritsFrom(MExtractor::Class()))
    208206    {
     
    211209    }
    212210    ext2 = o ? (MExtractor*)o->Clone() : NULL;
    213     if (!ext1 && !ext2)
     211    if (!ext3 && !ext2)
    214212    {
    215213        *fLog << err << dbginf << "ERROR - Neither ExtractSignal nor ExrtractTime found in " << fname << "!" << endl;
     
    385383    calibcont.Add(&tmcam);
    386384
    387     if (!ReadCalibration(calibcont, badpix, extractor1, extractor2, geom))
     385    if (!ReadCalibration(calibcont, badpix, extractor2, extractor3, geom))
    388386        return kFALSE;
    389387
     
    394392        *fLog << inf << "No Camera geometry found using default <MGeomCamMagic>" << endl;
    395393
     394    if (extractor3)
     395    {
     396        *fLog << underline << "Signal Extractor found in calibration file" << endl;
     397        extractor3->Print();
     398        *fLog << endl;
     399    }
     400    else
     401        *fLog << inf << "No Signal Extractor: ExtractSignal in file." << endl;
     402
     403
    396404    if (extractor1)
    397405    {
    398       *fLog << underline << "Signal Extractor found in calibration file" << endl;
     406      *fLog << underline << "Modified Signal Extractor set by user." << endl;
    399407      extractor1->Print();
    400408      *fLog << endl;
    401       extractor3 = (MExtractor*)extractor1->Clone();
    402409    }
    403410    else
    404       *fLog << inf << "No Signal Extractor: ExtractSignal in file." << endl;
     411    {
     412        *fLog << inf << "No modified Signal Extractor set by user... using ExtractSignal." << endl;
     413        extractor1 = extractor3 ? (MExtractor*)extractor3->Clone() : 0;
     414    }
    405415
    406416    if (extractor2)
     
    455465   
    456466    // Skips empty MC events (Not necessary, but faster!)
    457     MContinue contmc("MRawEvtData.GetNumPixels<0.5", "ContEmptyMC");
     467    MFTriggerLvl1 trigmc;
     468    MContinue contmc(&trigmc, "ContTrigMC");
     469    contmc.SetInverted();
    458470
    459471    MPointingPosInterpolate pextr;
     
    718730        pacalc.SetFilter(&fcalib);
    719731        filcam.SetFilter(&fcalib);
    720         filtme.SetFilter(&fcalib);
    721         filbnd.SetFilter(&fcalib);
    722         filpin.SetFilter(&fcalib);
     732        filtme.SetFilter(&fcalib);
     733        if (IsUseBlindPixel())
     734            filbnd.SetFilter(&fcalib);
     735        if (IsUsePINDiode())
     736            filpin.SetFilter(&fcalib);
    723737        chcalc.SetFilter(&fcalib);
    724738        recalc.SetFilter(&fcalib);
     
    775789    tlist.AddToList(read);
    776790    if (IsUseMC())
     791    {
    777792        tlist.AddToList(&writemc);
    778     tlist.AddToList(&contmc);
     793        tlist.AddToList(&contmc);
     794    }
    779795
    780796    if (IsUseRootData())
Note: See TracChangeset for help on using the changeset viewer.