Ignore:
Timestamp:
07/31/02 14:54:30 (22 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/WuerzburgSoft/Thomas/mphys
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/WuerzburgSoft/Thomas/mphys/Changelog

    r1449 r1462  
    11                                                                  -*-*- END -*-*-
     2 2002/06/29: Thomas Bretz
     3
     4   * MCascade.[h,cc]:
     5     - replaces draw by fIsBatch, using gROOT->IsBatch in addition.
     6
     7   * MFit.h:
     8     - added default=0 to SetParameter for min and max
     9
     10
     11
    212 2002/06/29: Thomas Bretz
    313
  • 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();
  • trunk/WuerzburgSoft/Thomas/mphys/MCascade.h

    r1449 r1462  
    4646    TH1D fHist; //!
    4747
     48    Bool_t fIsBatch; //!
     49
    4850    Double_t GetEnergy();
    4951    TFile *OpenFile(TString fFilename);
  • trunk/WuerzburgSoft/Thomas/mphys/MFit.h

    r1449 r1462  
    8989
    9090    void Print(Option_t *opt="") const;
    91     void SetParameter(Int_t n, TString name, Double_t start, Double_t min, Double_t max);
     91    void SetParameter(Int_t n, TString name, Double_t start, Double_t min=0, Double_t max=0);
    9292
    9393    Double_t GetParameter(Int_t n) const;
Note: See TracChangeset for help on using the changeset viewer.