Changeset 8746


Ignore:
Timestamp:
09/17/07 16:56:20 (17 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r8745 r8746  
    1818
    1919                                                 -*-*- END OF LINE -*-*-
     20
     21 2007/09/17 Thomas Bretz
     22
     23   * mbase/MEvtLoop.cc, mbase/MStatusDisplay.cc, mjobs/MJSpectrum.cc:
     24     - do not create an instance of TDatime if not necessary
     25
     26   * mbase/MStatusDisplay.cc, mfileio/MReadTree.cc:
     27     - improvements in inf debugging levels
     28
     29   * mhflux/MMcSpectrumWeight.cc:
     30     - removed a double brace in an output
     31     - more acurrately print the new formula/slope when set
     32
     33   * mjobs/MJSpectrum.cc:
     34     - improved output in case of an error
     35     - added text to describe the two example spectra
     36     - write MC dataset to output
     37
     38
    2039
    2140 2007/09/12 Markus Meyer
  • trunk/MagicSoft/Mars/mbase/MEvtLoop.cc

    r8744 r8746  
    575575Bool_t MEvtLoop::Eventloop(UInt_t maxcnt, Statistics_t printstat)
    576576{
    577     TDatime d;
    578     *fLog << inf << underline << "Eventloop: " << fName << " started at " << d.AsString() << endl;
     577    *fLog << inf << endl << underline << "Eventloop: " << fName << " started at " << TDatime().AsString() << endl;
    579578
    580579    Bool_t rc = PreProcess();
  • trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc

    r8709 r8746  
    472472
    473473    // Add date and time
    474     TDatime d;
    475     l = new TGLabel(f, d.AsString());
     474    l = new TGLabel(f, TDatime().AsString());
    476475    fList->Add(l);
    477476    f->AddFrame(l, lay);
     
    980979        gClient->ProcessEventsFor(fTab);
    981980
    982     *fLog << inf << "Adding Raw Tab '" << name << "' (" << f->GetWidth() << "x";
     981    *fLog << inf3 << "Adding Raw Tab '" << name << "' (" << f->GetWidth() << "x";
    983982    *fLog << f->GetHeight() << ")" << endl;
    984983
     
    10911090        gClient->ProcessEventsFor(fTab);
    10921091
    1093     *fLog << inf << "Adding Tab '" << name << "' (" << f->GetWidth() << "x";
     1092    *fLog << inf3 << "Adding Tab '" << name << "' (" << f->GetWidth() << "x";
    10941093    *fLog << f->GetHeight() << ", TCanvas=" << &c << ")" << endl;
    10951094
     
    25902589
    25912590        if (num<0)
    2592             *fLog << " - Updating header of PS file... " << flush;
     2591            *fLog << inf3 << " - Updating header of PS file... " << flush;
    25932592        UpdatePSHeader(name);
    25942593        if (num<0)
    2595             *fLog << inf << "done." << endl;
     2594            *fLog << inf3 << "done." << endl;
    25962595    }
    25972596
  • trunk/MagicSoft/Mars/mfileio/MReadTree.cc

    r8744 r8746  
    848848        fTree->SetBranchAddress(bname, pcont); // *CHANGED-fChain-to-fTree*
    849849
    850         *fLog << inf << "Master branch address '" << bname << "' ";
     850        *fLog << inf2 << "Master branch address '" << bname << "' ";
    851851        if ((TString)bname!=(TString)classname)
    852852            *fLog << "[" << classname << "] ";
     
    859859    }
    860860
    861     *fLog << inf << GetDescriptor() << " setup " << num << " master branches addresses." << endl;
     861    *fLog << inf2 << GetDescriptor() << " setup " << num << " master branches addresses." << endl;
    862862
    863863    //
  • trunk/MagicSoft/Mars/mhflux/MMcSpectrumWeight.cc

    r8720 r8746  
    364364        {
    365365            *fLog << err;
    366             *fLog << "ERROR - The maximum simulated Monte Carlo energy is not allowed to change (";
     366            *fLog << "ERROR - The maximum simulated Monte Carlo energy is not allowed to change ";
    367367            *fLog << "(" << fEnergyMax << " --> " << rh.GetEUppLim() << ")... abort." << endl;
    368368            return kFALSE;
     
    392392    fEnergyMax = rh.GetEUppLim();
    393393
    394     if (fNewSlope==-99)
    395     {
    396         *fLog << inf << "A new slope for the power law has not been defined... no weighting applied." << endl;
     394    if (fNewSlope==-99 && fFormula.IsNull())
     395    {
     396        *fLog << inf << "A new slope for the power law has not yet been defined... using " << fOldSlope << "." << endl;
    397397        fNewSlope = fOldSlope;
    398398    }
     
    400400    if (fFunc)
    401401        delete fFunc;
     402
     403    if (GetFormulaSpecOld()==GetFormulaSpecNew())
     404        *fLog << inf << "No spectral change requested..." << endl;
     405    else
     406    {
     407        *fLog << inf << "Weighting from slope " << fOldSlope << " to ";
     408        if (fFormula.IsNull())
     409            *fLog << "slope " << fNewSlope << "." << endl;
     410        else
     411            *fLog << GetFormulaSpecNewX() << endl;
     412    }
    402413
    403414    fFunc = new TF1("", GetFormulaWeightsX());
  • trunk/MagicSoft/Mars/mjobs/MJSpectrum.cc

    r8744 r8746  
    333333{
    334334    // Some debug output
     335    *fLog << all << endl;
    335336    fLog->Separator("Compiling original MC distribution");
    336337
     
    455456        if (!weight.Set(*head))
    456457        {
    457             *fLog << err << "ERROR - Initializing MMcSpectrumWeight failed." << endl;
     458            *fLog << err << "ERROR - Initializing MMcSpectrumWeight from " << fname << " failed." << endl;
    458459            return kFALSE;
    459460        }
     
    463464
    464465        // No we found everything... go on reading contents
    465         *fLog << inf << "Reading OriginalMC of " << fname << endl;
     466        *fLog << inf2 << "Reading OriginalMC of " << fname << endl;
    466467
    467468        // Fill histogram from tree
     
    948949    gPad->SetGridy();
    949950    TH1D *spec=(TH1D*)spectrum.DrawCopy();
    950     FitSpectrum(*spec);
     951    //FitSpectrum(*spec);
    951952
    952953    c1.cd(3);
     
    985986    spec = (TH1D*)spectrum.DrawCopy();
    986987
     988    TLatex tex;
     989
    987990    TF1 fc("Crab", "7.0e-6*(x/300)^(-2.31-0.26*log10(x/300))", 100, 6000);
    988991    fc.SetLineStyle(7);
     
    991994    fc.DrawCopy("same");
    992995
     996    tex.DrawText(90, fc.Eval(100), "Crab (\\Gamma=-2.31)");
     997
    993998    TF1 fa("PG1553", "1.8e-6*(x/200)^-4.21", 90, 600);
    994999    static_cast<const TAttLine&>(fc).Copy(fa);
    9951000    fa.DrawCopy("same");
     1001
     1002    tex.DrawText(90, fa.Eval(90), "PG1553 (\\Gamma=-4.21)");
    9961003
    9971004    // Display dN/dE*E^2 for conveinience
     
    13291336    *fLog << inf;
    13301337    fLog->Separator(GetDescriptor());
    1331     *fLog << "Compile Monte Carlo Sample (data set " << set.GetName() << ")" << endl;
     1338    *fLog << "Compile Monte Carlo sample (dataset " << set.GetName() << ")" << endl;
    13321339    *fLog << endl;
    13331340
     
    16961703    cont.Add(&area1);
    16971704    cont.Add(&hest);
     1705    cont.Add(&set);
    16981706
    16991707    if (fDisplay)
Note: See TracChangeset for help on using the changeset viewer.