Changeset 6994


Ignore:
Timestamp:
05/04/05 16:53:10 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r6993 r6994  
    2121
    2222                                                 -*-*- END OF LINE -*-*-
     23
     24 2005/05/04 Thomas Bretz
     25
     26   * mfileio/MWriteRootFile.cc:
     27     - fixed a possible infinite loop when compiling the new
     28       file name as suggested by Abelardo
     29
     30   * mhflux/MHAlpha.cc:
     31     - search for fName+"Off" instead of ClassName()+"Off"
     32
     33   * mjobs/MJSpectrum.cc:
     34     - scale the displayed zd-plots by their maximum as the
     35       histograms are scaled before
     36
     37   * mjobs/MJStar.cc:
     38     - implemented writing of the muon parameters. This takes another
     39       5% of the time (in total 15-20% for muon analysis). It enlarges
     40       the file size by roughly 15% (a test file was enlarged from
     41       5.1M to 5.9M)
     42
     43   * mmuon/MMuonCalibPar.cc:
     44     - set default of ArcPhi to an invalid value = -1
     45
     46   * mreport/MReportDrive.cc:
     47     - fixed a typo in the comments
     48
     49
    2350
    2451 2005/05/03 Thomas Bretz
  • trunk/MagicSoft/Mars/mfileio/MWriteRootFile.cc

    r6858 r6994  
    856856        // Replace source by destination
    857857        const TRegexp regexp(src);
    858         while (1)
    859         {
    860             idx = regexp.Index(fname, &len);
     858
     859        Ssiz_t ichar = 0;
     860        while (1) // Replace all occurrences of src by dest
     861        {
     862            idx = regexp.Index(fname, &len, ichar);
    861863            if (idx<0)
    862864                break;
    863865
    864866            fname.Replace(idx, len, dest);
     867            ichar = idx + dest.Length();
     868
     869            // In next iteration, we start searching the string fname
     870            // right after the last character of the previous substitution
     871            // (indicated by ichar). This avoids infinite loops in the case
     872            // we want to replace, for instance, "_w" by "_Y_w". Without
     873            // the use of ichar, the second string would be replaced by
     874            // "_Y_Y_w", and this would never end...
    865875        }
    866876    }
  • trunk/MagicSoft/Mars/mhflux/MHAlpha.cc

    r6988 r6994  
    223223    fHTime.Reset();
    224224
    225     const TString off(Form("%sOff", ClassName()));
     225    const TString off(Form("%sOff", fName.Data()));
    226226    if (fName!=off && fOffData==NULL)
    227227    {
  • trunk/MagicSoft/Mars/mjobs/MJSpectrum.cc

    r6993 r6994  
    321321    if (theta)
    322322    {
    323         proj.Scale(theta->Integral()/proj.Integral());
     323        proj.Scale(theta->GetMaximum()/proj.GetMaximum());
    324324        theta->SetMaximum(1.05*TMath::Max(theta->GetMaximum(), proj.GetMaximum()));
    325325    }
  • trunk/MagicSoft/Mars/mjobs/MJStar.cc

    r6993 r6994  
    5454#include "MReadMarsFile.h"
    5555#include "MF.h"
     56#include "MFDataMember.h"
    5657#include "MFDeltaT.h"
    5758#include "MFSoftwareTrigger.h"
     
    286287    // ------------------ Setup write task ----------------
    287288
    288     MWriteRootFile write(2, Form("%s{s/_Y_/_I_}", fPathOut.Data()), fOverwrite?"RECREATE":"NEW");
     289    const TString rule(Form("%s{s/_Y_/_I_}", fPathOut.Data()));
     290    MWriteRootFile write( 2, rule, fOverwrite?"RECREATE":"NEW");
     291    MWriteRootFile writem(2, rule, fOverwrite?"RECREATE":"NEW");
    289292    // Data
    290293    write.AddContainer("MHillas",       "Events");
     
    305308
    306309    // Muon Setup
    307     write.AddContainer("BinningRadius",          "RunHeaders");
    308     write.AddContainer("BinningArcWidth",        "RunHeaders");
    309     write.AddContainer("BinningRingBroadening",  "RunHeaders");
    310     write.AddContainer("BinningSizeVsArcRadius", "RunHeaders");
    311     write.AddContainer("MMuonSetup",             "RunHeaders");
     310    write.AddContainer("BinningRadius",            "RunHeaders");
     311    write.AddContainer("BinningArcWidth",          "RunHeaders");
     312    write.AddContainer("BinningRingBroadening",    "RunHeaders");
     313    write.AddContainer("BinningSizeVsArcRadius",   "RunHeaders");
     314    write.AddContainer("MMuonSetup",               "RunHeaders");
    312315
    313316    if (ismc)
     
    333336        write.AddContainer("MEffectiveOnTime",     "EffectiveOnTime");
    334337        write.AddContainer("MTimeEffectiveOnTime", "EffectiveOnTime");
     338    }
     339
     340    // What to write in muon tree
     341    writem.AddContainer("MMuonSearchPar", "Muons");
     342    writem.AddContainer("MMuonCalibPar",  "Muons");
     343    writem.AddContainer("MHillas",        "Muons");
     344    writem.AddContainer("MHillasExt",     "Muons");
     345    writem.AddContainer("MHillasSrc",     "Muons");
     346    writem.AddContainer("MImagePar",      "Muons");
     347    writem.AddContainer("MNewImagePar",   "Muons");
     348    writem.AddContainer("MRawEvtHeader",  "Muons");
     349    writem.AddContainer("MPointingPos",   "Muons");
     350    if (ismc)
     351    {
     352        // Monte Carlo Data
     353        writem.AddContainer("MMcEvt",     "Muons");
     354        writem.AddContainer("MMcTrig",    "Muons");
    335355    }
    336356
     
    369389    MF fmuon3("(MMuonCalibPar.fArcPhi>175)  && (MMuonSearchPar.fDeviation<37)",
    370390              "MuonFinalCut");
     391    MFDataMember fmuon4("MMuonCalibPar.fArcPhi", '>', -0.5, "MuonWriteCut");
     392    writem.SetFilter(&fmuon4);
    371393
    372394    MMuonSearchParCalc muscalc;
     
    390412        tlist2.AddToList(&fmuon3);
    391413        tlist2.AddToList(&fillmpar);
     414        tlist2.AddToList(&fmuon4);
     415        tlist2.AddToList(&writem);
    392416    }
    393417    // ------------------------------------------------------------
  • trunk/MagicSoft/Mars/mmuon/MMuonCalibPar.cc

    r6979 r6994  
    6262{
    6363    fArcLength   = -1.;
    64     fArcPhi      =  0.;
     64    fArcPhi      = -1.;
    6565    fArcWidth    = -1.;
    6666    fChiArcPhi   = -1.;
  • trunk/MagicSoft/Mars/mreport/MReportDrive.cc

    r5118 r6994  
    4141// Double_t fDec;        // [deg] Declination
    4242// Double_t fHa;         // [h]   Hour angle
    43 //  Currently this descries the nominal source position
     43//  Currently this describes the nominal source position
    4444//
    4545// Double_t fNominalZd;  // [deg] Nominal zenith distance
Note: See TracChangeset for help on using the changeset viewer.