Ignore:
Timestamp:
08/18/15 10:09:13 (10 years ago)
Author:
ftemme
Message:
Merging trunk into MarsWobble branch
Location:
branches/MarsWobble/fact/analysis
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/MarsWobble/fact/analysis/callisto.C

    r18146 r18278  
    11#include "MLogManip.h"
    22
    3 int callisto(const char *seqfile="seq/2012/01/23/20120123_023.seq", const char *outpath = "output", const char *delays="resources/delays-20150217.txt")
     3int callisto(const char *seqfile="seq/2012/01/23/20120123_023.seq", const char *outpath = "output",
     4//             TString drstime = "/gpfs0/fact/processing/drs_time_calib/20111115.time.drs.fits",
     5             const char *drstime = "/gpfs0/fact/processing/drs_time_calib/20111115.time.drs.fits",
     6             const char *delays="resources/delays-20150217.txt")
    47{
    58    // ======================================================
     
    107110    }
    108111
    109     TString timfile = drs.GetFileName(0, MSequence::kFitsDat);
    110112    TString drs1024 = drs.GetFileName(0, MSequence::kFitsDrs);
    111113    TString pedfile = seq.GetFileName(0, MSequence::kFitsPed);
     
    115117    gLog << "DRS calib     300: " << drsfile << '\n';
    116118    gLog << "DRS calib    1024: " << drs1024 << "\n\n";
     119    gLog << "DRS calib    Time: " << drstime << "\n\n";
     120
     121    MDrsCalibrationTime drscalibtime;
     122    if (!drscalibtime.ReadFits(drstime)))
     123        return 5;
    117124
    118125    MDrsCalibration drscalib300;
    119126    if (!drscalib300.ReadFits(drsfile.Data()))
    120         return 5;
     127        return 6;
    121128
    122129    MDrsCalibration drscalib1024;
    123130    if (!drscalib1024.ReadFits(drs1024.Data()))
    124         return 6;
     131        return 7;
    125132
    126133    gLog << all;
    127     gLog << "Time calibration : " << timfile << '\n';
    128134    gLog << "Pedestal     file: " << pedfile << '\n';
    129135    gLog << "Light Pulser file: " << calfile << '\n' << endl;
     
    135141    {
    136142        gLog << err << "ERROR - Sequence valid but without files." << endl;
    137         return 7;
     143        return 8;
    138144    }
    139145    iter.Print();
     
    195201    // hrate.DefaultLabelY("ERROR");
    196202
    197     MDrsCalibrationTime timecam;
     203//    MDrsCalibrationTime timecam;
    198204
    199205    gStyle->SetOptFit(kTRUE);
    200206
    201207    // ======================================================
    202 
     208/*
    203209    gLog << endl;
    204210    gLog.Separator("Processing DRS timing calibration run");
     
    240246    if (!loop0.GetDisplay())
    241247        return 9;
    242 
     248*/
    243249    /*
    244250     MHDrsCalibrationT *t = (MHDrsCalibrationT*)plist4.FindObject("MHDrsCalibrationT");
     
    258264    plist1.AddToList(&drscalib300);
    259265    plist1.AddToList(&badpixels);
    260     plist1.AddToList(&timecam);
     266    plist1.AddToList(&drscalibtime);
    261267
    262268    MEvtLoop loop1("DetermineCalConst");
     
    348354    tlist1.AddToList(&fill1d);
    349355
    350     if (!loop1.Eventloop(max1))
    351         return 10;
    352 
    353     if (!loop1.GetDisplay())
    354         return 11;
     356    //if (!loop1.Eventloop(max1))
     357    //    return 10;
     358
     359    //if (!loop1.GetDisplay())
     360    //    return 11;
    355361
    356362    if (delays)
     
    363369        }
    364370
    365         timecam.SetDelays(g);
     371        drscalibtime.SetDelays(g);
    366372    }
    367373
     
    377383    plist3.AddToList(&drscalib300);
    378384    plist3.AddToList(&badpixels);
    379     plist3.AddToList(&timecam);
     385    plist3.AddToList(&drscalibtime);
    380386
    381387    MEvtLoop loop3("DetermineRndmPed");
     
    451457    plist4.AddToList(&drscalib300);
    452458    plist4.AddToList(&badpixels);
    453     plist4.AddToList(&timecam);
     459    plist4.AddToList(&drscalibtime);
    454460
    455461    MEvtLoop loop4("DetermineExtractedPed");
     
    519525    plist5.AddToList(&drscalib300);
    520526    plist5.AddToList(&badpixels);
    521     plist5.AddToList(&timecam);
     527    plist5.AddToList(&drscalibtime);
    522528
    523529    MEvtLoop loop5("CalibratingData");
  • branches/MarsWobble/fact/analysis/callisto_data.C

    r18147 r18278  
    9090    // -------------------------------------------------------
    9191
    92     TFile file(drstime);
    93     if (file.IsZombie())
     92    MDrsCalibrationTime timecam;
     93    if (!timecam.ReadFits(drstime))
    9494    {
    95         gLog << err << "ERROR - Could not open " << drstime << endl;
     95        gLog << err << "ERROR - Could not get MDrsCalibrationTime from " << drstime << endl;
    9696        return 21;
    9797    }
    9898
    99     MDrsCalibrationTime *timecam = 0;
    100     file.GetObject("MDrsCalibrationTime", timecam);
    101     if (!timecam)
     99    if (delays)
    102100    {
    103         gLog << err << "ERROR - Could not get MDrsCalibrationTime from " << drstime << endl;
    104         return 22;
     101        TGraph g(delays);
     102        if (g.GetN()!=1440)
     103        {
     104            gLog << err << "Error reading file " << delays << endl;
     105            return 22;
     106        }
     107
     108        timecam.SetDelays(g);
    105109    }
    106110
     
    203207    plist5.AddToList(&drscalib300);
    204208    plist5.AddToList(&badpixels);
    205     plist5.AddToList(timecam);
     209    plist5.AddToList(&timecam);
    206210
    207211    MEvtLoop loop5("CalibratingData");
Note: See TracChangeset for help on using the changeset viewer.