Changeset 5760 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
01/10/05 10:45:07 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r5759 r5760  
    2020
    2121                                                 -*-*- END OF LINE -*-*-
    22 
    2322 2005/01/10 Markus Gaug
    2423
     
    3534
    3635
    37  2005/01/10 Wolfgang Wittek
     36
     37 2005/01/10 Thomas Bretz
    3838
    3939   * mhvstime/MHVsTime.cc:
    4040     - fixed a compiler error for gcc 2.95.3, see Mantis bug # 157
     41
     42   * callisto.cc:
     43     - changed such, that the calculated pedestal is not random
     44       anymore
     45     - added code to calculate the pedestal also with randomization,
     46       but this code is for the moment commented out.
     47
     48   * callisto.rc:
     49     - fixed naming of pedestal calculation
     50
     51   * mbadpixels/MBadPixelsCalc.cc:
     52     - added a second check which compares the pedestal rms with
     53       the variance of the pedestal rms in the same sector
     54
     55   * mjobs/MJCalibrateSignal.[h,cc]:
     56     - changed to calculate the pedestal from extractor without
     57       randomization
     58     - added code to calculate the pedestal also with randomization,
     59       but this code is for the moment commented out.
     60
     61   * mjobs/MJCalibration.cc:
     62     - made sure that pedcam always has the correct name
     63       (FIXM? Print a warning if it has the wrong name)
     64
     65   * mjobs/MJPedestal.[h,cc]:
     66     - changed such, that it allows the calculation of pedestals
     67       in three different ways (fundamental, fromextractor,
     68       fromextractorrndm)
     69     - therefor removed SetExtractorResolution and added
     70       + void SetExtractionFundamental()
     71       + void SetExtractionWithExtractorRndm()
     72       + void SetExtractionWithExtractor()
     73
     74   * mjobs/MJStar.cc:
     75     - changed/fixed the input name of the MPedPhotCam used in the
     76       image cleaning
     77
    4178
    4279
  • trunk/MagicSoft/Mars/NEWS

    r5725 r5760  
    2727   - new classes to deal with the interleaved calibration events:
    2828     MTriggerPattern, MTriggerPatternDecode and MFTriggerPattern
     29
     30   - changed callisto to calculate two kinds of pedestals and pedestal rms:
     31     + fundamental pedestal (MPedPhotFundamental): extracted directly from
     32       the slices by statistics                             
     33     + pedestal from extractor (MPedPhotFromExtractor): extracted with the
     34       signal extractor without randomization
     35     The thir kind of pedestal is not yet implemented (for speed reasons) as
     36     long as nobody really needs it:
     37     + pedestal from extractor with randomizatiuon (MPedPhotFromExtractorRndm):
     38       extracted with the signal extractor with randomization
    2939
    3040
  • trunk/MagicSoft/Mars/callisto.cc

    r5570 r5760  
    296296        job1.SetOverwrite(kOverwrite);
    297297        job1.SetPathData(kInpathD);
     298
     299        job1.SetExtractionFundamental();
    298300        // job1.SetPathOut(kOutpathC); // not yet needed
    299301        // job1.SetPathIn(kInpathC);   // not yet needed
     
    325327        // job1.SetPathIn(kInpathC);   // not yet needed
    326328
    327         job2.SetExtractorResolution();
     329        //job2.SetExtractorResolution();
     330        job2.SetExtractionWithExtractorRndm();
    328331        job2.SetExtractor(job1.GetExtractor());
    329332        job2.SetPedestals(job1.GetPedestalCam());
     
    390393        //job1.SetPathOut(kOutpathY);   // not yet needed
    391394        job1.SetUseData();
     395        job1.SetExtractionFundamental();
    392396
    393397        if (!job1.ProcessFile())
    394398        {
    395             gLog << err << "Calculation of pedestal failed." << endl << endl;
     399            gLog << err << "Calculation of fundamentan pedestal failed." << endl << endl;
    396400            return -1;
    397401        }
     
    414418        job2.SetOverwrite(kOverwrite);
    415419        job2.SetPathData(kInpathD);
    416         job1.SetPathIn(kInpathY);
     420        job2.SetPathIn(kInpathY);
    417421        // job1.SetPathOut(kOutpathC); // not yet needed
    418422        // job1.SetPathIn(kInpathC);   // not yet needed
    419423
    420424        job2.SetUseData();
    421         job2.SetExtractorResolution();
     425        job2.SetExtractionWithExtractor();
    422426        job2.SetExtractor(job1.GetExtractor());
    423427        job2.SetPedestals(job1.GetPedestalCam());
     
    426430        if (!job2.ProcessFile())
    427431        {
    428             gLog << err << "Calculation of pedestal resolution failed." << endl << endl;
     432            gLog << err << "Calculation of pedestal from extrtactor (random) failed." << endl << endl;
    429433            return -1;
    430434        }
     
    435439            return 1;
    436440        }
    437 
    438         //
    439         // Extract signal and calibrate it
    440         //
    441         MJCalibrateSignal job3(Form("MJCalibrateSignal #%d", seq.GetSequence()));
     441        /*
     442        //
     443        // Calculate pedestal and pedestal resolution
     444        //
     445        MJPedestal job3(Form("MJPedestalY3 #%d", seq.GetSequence()));
     446        job3.SetNoStorage();
    442447        job3.SetSequence(seq);
    443         job3.SetDisplay(d);;
    444448        job3.SetEnv(kConfig);
    445449        job3.SetEnvDebug(kDebugEnv);
     450        job3.SetDisplay(d);;
    446451        job3.SetOverwrite(kOverwrite);
     452        job3.SetPathData(kInpathD);
    447453        job3.SetPathIn(kInpathY);
    448         job3.SetPathOut(kOutpathY);
    449         job3.SetPathData(kInpathD);
     454        // job1.SetPathOut(kOutpathC); // not yet needed
     455        // job1.SetPathIn(kInpathC);   // not yet needed
     456
     457        job3.SetUseData();
     458        job3.SetExtractionWithExtractorRndm();
     459        job3.SetExtractor(job1.GetExtractor());
     460        job3.SetPedestals(job1.GetPedestalCam());
     461        job3.SetBadPixels(job1.GetBadPixels());
     462
     463        if (!job3.ProcessFile())
     464        {
     465            gLog << err << "Calculation of pedestal from extractor failed." << endl << endl;
     466            return -1;
     467        }
     468
     469        if (!job3.GetDisplay())
     470        {
     471            gLog << warn << "Display closed by user... execution aborted." << endl << endl;
     472            return 1;
     473        }
     474        */
     475        //
     476        // Extract signal and calibrate it
     477        //
     478        MJCalibrateSignal job4(Form("MJCalibrateSignal #%d", seq.GetSequence()));
     479        job4.SetSequence(seq);
     480        job4.SetDisplay(d);;
     481        job4.SetEnv(kConfig);
     482        job4.SetEnvDebug(kDebugEnv);
     483        job4.SetOverwrite(kOverwrite);
     484        job4.SetPathIn(kInpathY);
     485        job4.SetPathOut(kOutpathY);
     486        job4.SetPathData(kInpathD);
    450487
    451488        // Where to search for calibration files
    452         if (!job3.ProcessFile(job1.GetPedestalCam(), job2.GetPedestalCam()))
    453             return -1;
    454 
    455         if (!job3.GetDisplay())
     489        if (!job4.ProcessFile(job1.GetPedestalCam(), job2.GetPedestalCam()/*, job3.GetPedestalCam()*/))
     490            return -1;
     491
     492        if (!job4.GetDisplay())
    456493        {
    457494            gLog << warn << "Display closed by user... execution aborted." << endl << endl;
  • trunk/MagicSoft/Mars/callisto.rc

    r5601 r5760  
    219219# Setup pedestal extractor for running through data
    220220# -------------------------------------------------------------------------
    221 #MJCalibrateSignal.MPedCalcMeanFromLoGain.PedestalUpdate:   yes
    222 #MJCalibrateSignal.MPedCalcMeanFromLoGain.NumEventsDump:   1500
    223 #MJCalibrateSignal.MPedCalcMeanFromLoGain.ExtractWinFirst:  15
    224 #MJCalibrateSignal.MPedCalcMeanFromLoGain.ExtractWinSize:    6
    225 #MJCalibrateSignal.MPedCalcMeanFromLoGain.CheckWinFirst:     0
    226 #MJCalibrateSignal.MPedCalcMeanFromLoGain.CheckWinSize:     29
    227 #MJCalibrateSignal.MPedCalcMeanFromLoGain.MaxHiGainVar:     40
    228 
    229 #MJCalibrateSignal.MPedCalcRmsFromLoGain.PedestalUpdate:   yes
    230 #MJCalibrateSignal.MPedCalcRmsFromLoGain.NumEventsDump:   1500
    231 #MJCalibrateSignal.MPedCalcRmsFromLoGain.ExtractWinFirst:  15
    232 #MJCalibrateSignal.MPedCalcRmsFromLoGain.ExtractWinSize:    6
    233 #MJCalibrateSignal.MPedCalcRmsFromLoGain.CheckWinFirst:     0
    234 #MJCalibrateSignal.MPedCalcRmsFromLoGain.CheckWinSize:     29
    235 #MJCalibrateSignal.MPedCalcRmsFromLoGain.MaxHiGainVar:     40
     221#MJCalibrateSignal.MPedCalcFundamental.PedestalUpdate:   yes
     222#MJCalibrateSignal.MPedCalcFundamental.NumEventsDump:   1500
     223#MJCalibrateSignal.MPedCalcFundamental.ExtractWinFirst:  15
     224#MJCalibrateSignal.MPedCalcFundamental.ExtractWinSize:    6
     225#MJCalibrateSignal.MPedCalcFundamental.CheckWinFirst:     0
     226#MJCalibrateSignal.MPedCalcFundamental.CheckWinSize:     29
     227#MJCalibrateSignal.MPedCalcFundamental.MaxHiGainVar:     40
     228
     229#MJCalibrateSignal.MPedCalcFromExtractor.PedestalUpdate:   yes
     230#MJCalibrateSignal.MPedCalcFromExtractor.NumEventsDump:   1500
     231#MJCalibrateSignal.MPedCalcFromExtractor.ExtractWinFirst:  15
     232#MJCalibrateSignal.MPedCalcFromExtractor.ExtractWinSize:    6
     233#MJCalibrateSignal.MPedCalcFromExtractor.CheckWinFirst:     0
     234#MJCalibrateSignal.MPedCalcFromExtractor.CheckWinSize:     29
     235#MJCalibrateSignal.MPedCalcFromExtractor.MaxHiGainVar:     40
    236236
    237237# -------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc

    r5732 r5760  
    180180}
    181181
    182 Bool_t MJCalibrateSignal::ProcessFile(MPedestalCam &pedcamab, MPedestalCam &pedcam)
     182Bool_t MJCalibrateSignal::ProcessFile(MPedestalCam &pedcamab, MPedestalCam &pedcam2/*, MPedestalCam &pedcam*/)
    183183{
    184184    if (!fSequence.IsValid())
     
    276276    plist.AddToList(this); // take care of fDisplay!
    277277    plist.AddToList(&badcam);
    278     plist.AddToList(&pedcam);
    279278    plist.AddToList(&calibcont);
    280279
     
    323322    MBadPixelsMerge        merge(&badpix);
    324323
    325     MPedCalcFromLoGain     pedlo1("MPedCalcMeanFromLoGain");
     324    // Make sure that pedcamab has the correct name
     325    pedcamab.SetName("MPedestalFundamental");
     326    //pedcam.SetName("MPedestalFromExtractorRndm");
     327    pedcam2.SetName("MPedestalFromExtractor");
     328    //plist.AddToList(&pedcam);
     329    plist.AddToList(&pedcam2);
     330    plist.AddToList(&pedcamab);
     331
     332    MPedCalcFromLoGain     pedlo1("MPedCalcFundamental");
    326333    pedlo1.SetPedestalUpdate(kTRUE);
    327     pedlo1.SetPedestalsOut(&pedcamab);
    328 
    329     MPedCalcFromLoGain     pedlo2("MPedCalcRmsFromLoGain");
    330     pedlo2.SetPedestalUpdate(kTRUE);
    331     pedlo2.SetPedestalsIn(&pedcamab);
     334    pedlo1.SetNamePedestalCamOut("MPedestalFundamental");
     335    /*
     336     MPedCalcFromLoGain     pedlo2("MPedCalcWithExtractorRndm");
     337     pedlo2.SetPedestalUpdate(kTRUE);
     338     pedlo2.SetRandomCalculation(kTRUE);
     339     pedlo2.SetNamePedestalCamIn("MPedestalFundamental");
     340     pedlo2.SetNamePedestalCamOut("MPedestalFromExtractorRndm");
     341     */
     342
     343    MPedCalcFromLoGain     pedlo3("MPedCalcWithExtractor");
     344    pedlo3.SetPedestalUpdate(kTRUE);
     345    pedlo3.SetRandomCalculation(kFALSE);
     346    pedlo3.SetNamePedestalCamIn("MPedestalFundamental");
     347    pedlo3.SetNamePedestalCamOut("MPedestalFromExtractor");
    332348
    333349    if (extractor1)
     
    336352        const Float_t win = extractor1->GetNumHiGainSamples();
    337353        pedlo1.SetExtractWindow(15, (UShort_t)TMath::Nint(win));
    338         pedlo2.SetExtractWindow(15, (UShort_t)TMath::Nint(win));
     354        //pedlo2.SetExtractWindow(15, (UShort_t)TMath::Nint(win));
     355        pedlo3.SetExtractWindow(15, (UShort_t)TMath::Nint(win));
    339356
    340357        if (extractor1->InheritsFrom("MExtractTimeAndCharge"))
    341358        {
    342             pedlo2.SetExtractor((MExtractTimeAndCharge*)extractor1);
     359            //pedlo2.SetExtractor((MExtractTimeAndCharge*)extractor1);
     360            pedlo3.SetExtractor((MExtractTimeAndCharge*)extractor1);
    343361            extractor1->SetPedestals(&pedcamab);
    344362        }
     
    355373        calib.SetCalibrationMode(MCalibrateData::kFfactor);
    356374        calib.SetPedestalFlag(MCalibrateData::kRun);
     375        // FIXME: What to do for MC files???
     376        calib.AddPedestal("MPedestalCam", "MPedPhotFundamental");
     377        calib.AddPedestal("MPedestalCam", "MPedPhotFromExtractor");
     378        //calib.AddPedestal("MPedestalCam", "MPedPhotFromExtractorRndm");
    357379    }
    358380    else
    359381    {
    360         calib.AddPedestal("MPedestalCam", "MPedPhotFromExtractorRndm");
    361382        calib.AddPedestal("Fundamental");
     383        calib.AddPedestal("FromExtractor");
     384        //calib.AddPedestal("FromExtractorRndm");
    362385        calib.SetPedestalFlag(MCalibrateData::kEvent);
    363386    }
     
    366389    MBadPixelsCalc         bpcal;
    367390    MBadPixelsTreat        treat;
     391
     392    bpcal.SetNamePedPhotCam("MPedPhotFromExtractor");
     393    treat.AddNamePedPhotCam("MPedPhotFundamental");
     394    treat.AddNamePedPhotCam("MPedPhotFromExtractor");
     395    //treat.AddNamePedPhotCam("MPedPhotFromExtractorRndm");
     396
    368397
    369398    MHCamEvent evt0(0, "PedFLG",      "Pedestal from Lo Gain;;P [fadc/sl]");
     
    383412    evt7.EnableVariance();
    384413
    385     MFillH fill0(&evt0, &pedcamab,             "FillPedFLG");
    386     MFillH fill1(&evt1, "MPedestalCam",        "FillPedRmsFLG");
    387     MFillH fill2(&evt2, "MExtractedSignalCam", "FillExtracted");
    388     MFillH fill3(&evt3, "MPedPhotCam",         "FillPedPhot");
    389     MFillH fill4(&evt4, "MPedPhotFromExtractorRndm", "FillPedRMS");
    390     MFillH fill5(&evt5, "MCerPhotEvt",         "FillInterpolated");
    391     MFillH fill6(&evt6, "MBadPixelsCam",       "FillUnsuitable");
    392     MFillH fill7(&evt7, "MArrivalTime",        "FillTimes");
     414    MFillH fill0(&evt0, "MPedestalFundamental",   "FillPedFLG");
     415    MFillH fill1(&evt1, "MPedestalFromExtractor", "FillPedRmsFLG");
     416    MFillH fill2(&evt2, "MExtractedSignalCam",    "FillExtracted");
     417    MFillH fill3(&evt3, "MPedPhotFundamental",    "FillPedPhot");
     418    MFillH fill4(&evt4, "MPedPhotFromExtractor", "FillPedRMS");
     419    MFillH fill5(&evt5, "MCerPhotEvt",            "FillInterpolated");
     420    MFillH fill6(&evt6, "MBadPixelsCam",          "FillUnsuitable");
     421    MFillH fill7(&evt7, "MArrivalTime",           "FillTimes");
    393422
    394423    // The second rule is for the case reading raw-files!
    395424    MWriteRootFile write(2, Form("%s{s/_D_/_Y_}{s/.raw$/.root}", fPathOut.Data()), fOverwrite);
    396425    // Run Header
    397     write.AddContainer("MRawRunHeader",       "RunHeaders");
    398     write.AddContainer("MBadPixelsCam",       "RunHeaders");
    399     write.AddContainer("MGeomCam",            "RunHeaders");
     426    write.AddContainer("MRawRunHeader",             "RunHeaders");
     427    write.AddContainer("MBadPixelsCam",             "RunHeaders");
     428    write.AddContainer("MGeomCam",                  "RunHeaders");
    400429    // Monte Carlo Headers
    401     write.AddContainer("MMcTrigHeader",       "RunHeaders", kFALSE);
    402     write.AddContainer("MMcConfigRunHeader",  "RunHeaders", kFALSE);
    403     write.AddContainer("MMcCorsikaRunHeader", "RunHeaders", kFALSE);
     430    write.AddContainer("MMcTrigHeader",             "RunHeaders", kFALSE);
     431    write.AddContainer("MMcConfigRunHeader",        "RunHeaders", kFALSE);
     432    write.AddContainer("MMcCorsikaRunHeader",       "RunHeaders", kFALSE);
    404433    // Monte Carlo
    405     write.AddContainer("MMcEvt",              "Events", kFALSE);
    406     write.AddContainer("MMcTrig",             "Events", kFALSE);
     434    write.AddContainer("MMcEvt",                    "Events",    kFALSE);
     435    write.AddContainer("MMcTrig",                   "Events",    kFALSE);
    407436    // Data
    408     write.AddContainer("MCerPhotEvt",         "Events");
    409     write.AddContainer("MPedPhotCam",         "Events");
    410     write.AddContainer("MPedPhotFromExtractorRndm", "Events");
    411     write.AddContainer("MTime",               "Events", kFALSE);
    412     write.AddContainer("MRawEvtHeader",       "Events");
    413     write.AddContainer("MArrivalTime",        "Events");
     437    write.AddContainer("MCerPhotEvt",               "Events");
     438    write.AddContainer("MPedPhotFundamental",       "Events");
     439    write.AddContainer("MPedPhotFromExtractor",     "Events");
     440    //write.AddContainer("MPedPhotFromExtractorRndm", "Events");
     441    write.AddContainer("MTime",                     "Events",     kFALSE);
     442    write.AddContainer("MRawEvtHeader",             "Events");
     443    write.AddContainer("MArrivalTime",              "Events");
    414444    // Slow-Control: Current
    415     write.AddContainer("MTimeCurrents",       "Currents", kFALSE);
    416     write.AddContainer("MCameraDC",           "Currents", kFALSE);
    417     write.AddContainer("MReportCurrents",     "Currents", kFALSE);
     445    write.AddContainer("MTimeCurrents",             "Currents",  kFALSE);
     446    write.AddContainer("MCameraDC",                 "Currents",  kFALSE);
     447    write.AddContainer("MReportCurrents",           "Currents",  kFALSE);
    418448    // Slow-Control: Camera
    419     write.AddContainer("MReportCamera",       "Camera", kFALSE);
    420     write.AddContainer("MTimeCamera",         "Camera", kFALSE);
    421     write.AddContainer("MCameraAUX",          "Camera", kFALSE);
    422     write.AddContainer("MCameraCalibration",  "Camera", kFALSE);
    423     write.AddContainer("MCameraCooling",      "Camera", kFALSE);
    424     write.AddContainer("MCameraHV",           "Camera", kFALSE);
    425     write.AddContainer("MCameraLV",           "Camera", kFALSE);
    426     write.AddContainer("MCameraLids",         "Camera", kFALSE);
     449    write.AddContainer("MReportCamera",             "Camera",    kFALSE);
     450    write.AddContainer("MTimeCamera",               "Camera",    kFALSE);
     451    write.AddContainer("MCameraAUX",                "Camera",    kFALSE);
     452    write.AddContainer("MCameraCalibration",        "Camera",    kFALSE);
     453    write.AddContainer("MCameraCooling",            "Camera",    kFALSE);
     454    write.AddContainer("MCameraHV",                 "Camera",    kFALSE);
     455    write.AddContainer("MCameraLV",                 "Camera",    kFALSE);
     456    write.AddContainer("MCameraLids",               "Camera",    kFALSE);
    427457    // Slow-Control: Trigger
    428     write.AddContainer("MReportTrigger",      "Trigger", kFALSE);
    429     write.AddContainer("MTimeTrigger",        "Trigger", kFALSE);
     458    write.AddContainer("MReportTrigger",            "Trigger",    kFALSE);
     459    write.AddContainer("MTimeTrigger",              "Trigger",    kFALSE);
    430460    // Slow-Control: Drive
    431     write.AddContainer("MPointingPos",        "Drive", kFALSE);
    432     write.AddContainer("MReportDrive",        "Drive", kFALSE);
    433     write.AddContainer("MTimeDrive",          "Drive", kFALSE);
     461    write.AddContainer("MPointingPos",              "Drive",      kFALSE);
     462    write.AddContainer("MReportDrive",              "Drive",      kFALSE);
     463    write.AddContainer("MTimeDrive",                "Drive",      kFALSE);
    434464    // Slow-Control: Central Control
    435     write.AddContainer("MReportCC",           "CC", kFALSE);
    436     write.AddContainer("MTimeCC",             "CC", kFALSE);
     465    write.AddContainer("MReportCC",                 "CC",        kFALSE);
     466    write.AddContainer("MTimeCC",                   "CC",        kFALSE);
    437467
    438468    // Now setup tasklist for events
     
    445475    {
    446476        tlist2.AddToList(&pedlo1);
    447         tlist2.AddToList(&pedlo2);
     477        //tlist2.AddToList(&pedlo2);
     478        tlist2.AddToList(&pedlo3);
    448479    }
    449480    tlist2.AddToList(&fill0);
  • trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.h

    r5570 r5760  
    3434    MJCalibrateSignal(const char *name=NULL, const char *title=NULL);
    3535
    36     Bool_t ProcessFile(MPedestalCam &camab, MPedestalCam &cam);
     36    Bool_t ProcessFile(MPedestalCam &camab, MPedestalCam &cam2/*, MPedestalCam &cam2*/);
    3737
    3838    ClassDef(MJCalibrateSignal, 0) // Tool to create a pedestal file (MPedestalCam)
  • trunk/MagicSoft/Mars/mjobs/MJCalibration.cc

    r5570 r5760  
    15631563    // Input containers
    15641564    //
     1565    pedcam.SetName("MPedestalCam");
    15651566    plist.AddToList(&pedcam);
    15661567    plist.AddToList(&fBadPixels);
  • trunk/MagicSoft/Mars/mjobs/MJPedestal.cc

    r5570 r5760  
    113113MJPedestal::MJPedestal(const char *name, const char *title)
    114114    : fRuns(0), fExtractor(NULL), fDisplayType(kNormalDisplay),
    115       fDataCheck(kFALSE), fExtractType(kUsePedRun)
     115      fDataCheck(kFALSE), fExtractType(kUsePedRun), fExtractionType(kFundamental)
    116116{
    117117    fName  = name  ? name  : "MJPedestal";
     
    121121    SetUsePedRun();
    122122    SetPathIn("");
    123     SetExtractorResolution(kFALSE);
    124123}
    125124
     
    298297      }
    299298   
    300     if (fExtractorResolution)
     299    if (fExtractionType!=kFundamental/*fExtractorResolution*/)
    301300      {
    302301        for (UInt_t i=0;i<geomcam.GetNumPixels();i++)
     
    338337    // Display data
    339338    //
    340     if (fDisplayType != kDataCheckDisplay && fExtractType != kUseHists && !fExtractorResolution)
     339    if (fDisplayType != kDataCheckDisplay && fExtractType != kUseHists && fExtractionType==kFundamental/*fExtractorResolution*/)
    341340      {
    342341        TCanvas &c3 = fDisplay->AddTab("Pedestals");
     
    381380      {
    382381
    383         TCanvas &c3 = fDisplay->AddTab(fExtractorResolution ? "PedExtrd" : "Ped");
     382        TCanvas &c3 = fDisplay->AddTab(fExtractionType!=kFundamental/*fExtractorResolution*/ ? "PedExtrd" : "Ped");
    384383        c3.Divide(2,3);
    385384       
     
    391390        // for the datacheck, fix the ranges!!
    392391        //
    393         if (!fExtractorResolution)
     392        if (fExtractionType==kFundamental/*!fExtractorResolution*/)
    394393          {
    395394            obj1->SetMinimum(fgPedestalMin);
     
    535534      }
    536535   
    537     if (fExtractorResolution)
     536    if (fExtractionType!=kFundamental/*fExtractorResolution*/)
    538537      {
    539538           
     
    674673void MJPedestal::SetExtractor(MExtractor* ext)
    675674{
    676     if (fExtractor)
    677         delete fExtractor;
    678     fExtractor = ext ? (MExtractor*)ext->Clone(ext->GetName()) : NULL;
     675    if (ext)
     676    {
     677        if (fExtractor)
     678            delete fExtractor;
     679        fExtractor = ext ? (MExtractor*)ext->Clone(ext->GetName()) : NULL;
     680    }
     681    else
     682        fExtractor = 0;
    679683}
    680684
     
    709713            fExtractType = kUseHists;
    710714
    711     SetExtractorResolution(GetEnv("ExtractorResolution", fExtractorResolution));
     715    //fExtractorResolution = GetEnv("ExtractionType", fExtractorResolution);
    712716
    713717    SetNoStorage(GetEnv("DisableOutput", IsNoStorage()));
     
    784788        return kTRUE;
    785789
    786     if (!fExtractorResolution || !fExtractor->InheritsFrom("MExtractTimeAndCharge"))
     790    if (fExtractionType==kFundamental || !fExtractor->InheritsFrom("MExtractTimeAndCharge"))
    787791        return kFALSE;
    788792
    789793    extped.SetPedestalsIn(&fPedestalCamIn);
    790794    extped.SetExtractor((MExtractTimeAndCharge*)fExtractor);
     795    extped.SetRandomCalculation(fExtractionType==kWithExtractorRndm);
    791796
    792797    return kTRUE;
  • trunk/MagicSoft/Mars/mjobs/MJPedestal.h

    r5557 r5760  
    5959    Extract_t fExtractType;                              // Chosen extractor type
    6060
    61     Bool_t fExtractorResolution;                         // Flag if the extractor is used to calculate the pedestals
     61    enum Extraction { kFundamental, kWithExtractorRndm, kWithExtractor };
     62    Int_t fExtractionType;                         // Flag if the extractor is used to calculate the pedestals
    6263
    6364    MExtractor *ReadCalibration() const;
     
    102103    void SetDataCheckDisplay()                  { fDisplayType = kDataCheckDisplay; }
    103104    void SetNormalDisplay()                     { fDisplayType = kNormalDisplay;    }
    104     void SetExtractorResolution(const Bool_t b=kTRUE) { fExtractorResolution = b;  }
     105
     106    void SetExtractionFundamental()       { fExtractionType=kFundamental; }
     107    void SetExtractionWithExtractorRndm() { fExtractionType=kWithExtractorRndm; }
     108    void SetExtractionWithExtractor()     { fExtractionType=kWithExtractor; }
    105109
    106110    MExtractor *GetExtractor() const { return fExtractor; }
  • trunk/MagicSoft/Mars/mjobs/MJStar.cc

    r5309 r5760  
    185185 */
    186186    //MBadPixelsMerge        merge(&badpix);
    187     MImgCleanStd           clean;
     187    MImgCleanStd           clean;
     188    clean.SetNamePedPhotCam("MPedPhotFromExtractor");
     189
    188190    MHillasCalc            hcalc;
    189191
Note: See TracChangeset for help on using the changeset viewer.