Changeset 9607 for trunk/MagicSoft


Ignore:
Timestamp:
07/05/10 16:16:21 (14 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r9606 r9607  
    2424     - added missing SetFileNumber
    2525
     26   * mjobs/MSequence.cc:
     27     - added the missing file number to teh MC file names
     28
    2629
    2730
  • trunk/MagicSoft/Mars/mjobs/MSequence.cc

    r9441 r9607  
    1818!   Author(s): Thomas Bretz, 8/2004 <mailto:tbretz@astro.uni-wuerzburg.de>
    1919!
    20 !   Copyright: MAGIC Software Development, 2004-2008
     20!   Copyright: MAGIC Software Development, 2004-2010
    2121!
    2222!
     
    4747//   Sequence:     31015
    4848//
     49//   # Telescope number the sequence belongs to (if the resource is omitted
     50//   #  the default is 1)
     51//   Telescope:    1
     52//
    4953//   # Observation Period (not needed, calculated from Night)
    50 //   # Period:       18
     54//   # Period:     18
    5155//
    5256//   # Date of sunrise of the observation night - necessary if the path
     
    218222    }
    219223
    220     if (run<1000000 && file>0)
     224    if (!fMonteCarlo && run<1000000 && file>0)
    221225        *fLog << warn << "WARNING - Run number " << run << "<" << "1,000,000 but file " << file << ">0..." << endl;
    222226
     
    448452{
    449453    if (!night && type==kCorsika)
     454    {
     455        // /magic/simulated/ceres/001/000/0001/cer123456
    450456        return MString::Format("cer%06d", -run);
     457    }
    451458
    452459    const char *id="_";
     
    489496    // This is for MCs (FIXME!!!!)
    490497    if (run<0)
     498    {
    491499        n += MString::Format("%08d", -run);
     500        if (file>0)
     501            n += MString::Format(".%03d", file);
     502    }
    492503    else
    493504    {
     
    503514            n += MString::Format(".%03d", file);
    504515    }
     516
    505517
    506518    n += "_";
     
    536548TString MSequence::GetFileRegexp(UInt_t i, const TArrayI &arr, const TArrayI &sub, FileType_t type) const
    537549{
     550    // Entry doesn't exist
    538551    if (i>=(UInt_t)arr.GetSize())
    539552        return "";
    540553
    541     return InflateFileName(fNight, arr[i]>999999?fTelescope:0, fMonteCarlo?-arr[i]:arr[i], sub.GetSize()>0?sub[i]:0, type);
     554    // This is (so far) well defined for MAGIC data
     555    if (!fMonteCarlo)
     556        return InflateFileName(fNight, arr[i]>999999?fTelescope:0, arr[i], sub.GetSize()>0?sub[i]:0, type);
     557
     558    // Monte Carlos
     559    return InflateFileName(fNight, fTelescope, -arr[i], sub.GetSize()>0?sub[i]:0, type);
    542560}
    543561
Note: See TracChangeset for help on using the changeset viewer.