Ignore:
Timestamp:
07/31/02 14:54:30 (22 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/WuerzburgSoft/Thomas/mphys/MCascade.cc

    r1449 r1462  
    292292        Esum += ProcessGammas(fListGammas, fListElectrons, weight);
    293293
    294         fListGammas.ForEach(MPhoton, Fill)(fHist, fDisplayIndex, weight);
     294        if (!fIsBatch)
     295            fListGammas.ForEach(MPhoton, Fill)(fHist, fDisplayIndex, weight);
    295296        fListGammas.Delete();
    296297
     
    355356void MCascade::Run(TString filename, Bool_t draw)
    356357{
     358    fIsBatch = gROOT->IsBatch() ? kFALSE : draw;
     359
    357360    cout << "R = " << fSrcR << "kpc" << endl;
    358361    cout << "Z = " << fSrcZ << endl;
     
    371374    TCanvas *c=NULL;
    372375
    373     if (draw)
     376    if (!fIsBatch)
    374377    {
    375378        fHist.SetMinimum(pow(fELo, fSpectralIndex+fDisplayIndex)/100);
     
    409412
    410413    TTimer timer("gSystem->ProcessEvents();", 333, kFALSE);
    411     if (draw)
     414    if (!fIsBatch)
    412415        timer.TurnOn();
    413416
     
    426429            Double_t E = GetEnergy();
    427430            Double_t weight = pow(E, fSpectralIndex);
    428             histsrc.Fill(E, pow(E, fDisplayIndex) * weight);
     431
     432            if (!fIsBatch)
     433                histsrc.Fill(E, pow(E, fDisplayIndex) * weight);
    429434
    430435            cout << "--> " << n << ". " << Form("%d: %3.1e", (int)(starttime+fRuntime-TStopwatch::GetRealTime()), E) << flush;
     
    432437            ProcessPrimaryGamma(E, weight);
    433438
    434             if (!draw)
     439            if (fIsBatch)
    435440                continue;
    436441
     
    458463    // ------------------------------
    459464
    460     if (draw)
     465    if (!fIsBatch)
    461466    {
    462467        c->Clear();
Note: See TracChangeset for help on using the changeset viewer.