Changeset 4746 for trunk/MagicSoft


Ignore:
Timestamp:
08/26/04 15:39:16 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r4742 r4746  
    1919
    2020                                                 -*-*- END OF LINE -*-*-
    21   2004/08/26 : Wolfgang Wittek
    22 
    23     * mstarcam/MStarCamTrans.[h,cc]
    24       - include optical aberration when plotting the grid
    25 
    26     * mtemp/MTelAxisFromStars.[h,cc]
    27       - add member functions SetPointingPosition
    28                          and SetSourcePosition
     21 2004/08/26: Wolfgang Wittek
     22
     23   * mstarcam/MStarCamTrans.[h,cc]
     24     - include optical aberration when plotting the grid
     25
     26   * mtemp/MTelAxisFromStars.[h,cc]
     27     - add member functions SetPointingPosition and SetSourcePosition
     28
    2929
    3030
     
    3737   * macros/calibration.C
    3838     - adapt code to changes done in MJob
    39      
     39
     40
    4041
    4142 2004/08/26: Thomas Bretz
     
    6364     - added a new option --auto-time to get the time range for
    6465       cc and/or caco data from the run header of the raw data
     66
     67   * callisto.cc:
     68     - some additional checks
     69     - more comments
     70
     71   * mfileio/MReadReports.h:
     72     - overwrote GetFileName - otherwise CINT refuses to create an object
    6573
    6674
  • trunk/MagicSoft/Mars/callisto.cc

    r4734 r4746  
    11#include <TROOT.h>
    22#include <TClass.h>
     3#include <TSystem.h>
    34#include <TGClient.h>
    45#include <TApplication.h>
     
    5455    gLog << endl;
    5556    gLog << "   -f                        Force overwrite of existing files" << endl;
     57    gLog << "   -ff                       Force execution if not all files found" << endl;
    5658    gLog << "   --ind=path                Path where to search for the data files" << endl;
    5759    gLog << "                             [default=standard path in datacenter]" << endl;
     
    114116
    115117    const Bool_t  kOverwrite  = arg.HasOnlyAndRemove("-f");
     118    const Bool_t  kForceExec  = arg.HasOnlyAndRemove("-ff");
    116119
    117120    const TString kInpathD    = arg.GetStringAndRemove("--ind=",  "");
     
    167170    }
    168171
     172    //
     173    // Setup sequence file and check for its existance
     174    //
    169175    const TString kSequence = arg.GetArgumentStr(0);
    170176
    171     TApplication app("Callisto", &argc, argv);
    172     if (gROOT->IsBatch() || !gClient)
    173     {
    174         gLog << err << "Bombing... maybe your DISPLAY variable is not set correctly!" << endl;
    175         return 1;
    176     }
    177 
     177    if (gSystem->AccessPathName(kSequence, kFileExists))
     178    {
     179        gLog << err << "Sorry, sequence file '" << kSequence << "' doesn't exist." << endl;
     180        return -1;
     181    }
     182
     183    //
     184    // Setup sequence and check its validity
     185    //
    178186    MSequence seq(kSequence);
    179187    if (kPrintSeq)
     
    186194    if (!seq.IsValid())
    187195    {
    188         gLog << err << "Sequence invalid!" << endl << endl;
     196        gLog << err << "Sequence read but not valid!" << endl << endl;
    189197        return -1;
    190198    }
    191199
     200    //
     201    // Process print options
     202    //
    192203    if (kPrintFiles)
    193204    {
     
    209220    }
    210221
     222    //
     223    // Check for existance of all files
     224    //
     225    MDirIter iter;
     226    const Int_t n0 = seq.SetupAllRuns(iter, kInpathD);
     227    const Int_t n1 = seq.GetNumAllRuns();
     228    if (n0 != n1)
     229    {
     230        if (kForceExec)
     231            gLog << warn << "WARNING";
     232        else
     233            gLog << err << "ERROR";
     234        gLog << " - " << n1 << " files in sequence defined, but " << n0 << "found in ";
     235        gLog << (kInpathD.IsNull() ? "<defaultpath>" : kInpathD.Data()) << endl;
     236        if (!kForceExec)
     237            return -1;
     238    }
     239
    211240    if (kPrintOnly)
    212241        return 0;
    213242
     243    //
     244    // Initialize root
     245    //
    214246    MArray::Class()->IgnoreTObjectStreamer();
    215247    MParContainer::Class()->IgnoreTObjectStreamer();
     248
     249    TApplication app("Callisto", &argc, argv);
     250    if (gROOT->IsBatch() || !gClient)
     251    {
     252        gLog << err << "Bombing... maybe your DISPLAY variable is not set correctly!" << endl;
     253        return 1;
     254    }
    216255
    217256    //
     
    226265    if (kModeC)
    227266    {
     267        //
     268        // Calculate pedestal for calibration
     269        //
    228270        MJPedestal job1(Form("MJPedestalC #%d", seq.GetSequence()));
    229271        job1.SetSequence(seq);
     
    248290        }
    249291
     292        //
     293        // Do calibration
     294        //
    250295        MJCalibration job2(Form("MJCalibration #%d", seq.GetSequence()));
    251296        job2.SetSequence(seq);
     
    278323        d->Reset();
    279324
     325        //
     326        // Calculate starting pedestal for data extraction
     327        //
    280328        MJPedestal job1(Form("MJPedestalY #%d", seq.GetSequence()));
    281329        job1.SetSequence(seq);
     
    300348        }
    301349
     350        //
     351        // Extract signal and calibrate it
     352        //
    302353        MJCalibrateSignal job2(Form("MJCalibrateSignal #%d", seq.GetSequence()));
    303354        job2.SetSequence(seq);
  • trunk/MagicSoft/Mars/mfileio/MReadReports.h

    r3497 r4746  
    3131
    3232    UInt_t  GetEntries() { return 0; }
     33    TString GetFileName() const { return "<MReadReports>"; };
    3334
    3435    Int_t   PreProcess(MParList *plist);
Note: See TracChangeset for help on using the changeset viewer.