Changeset 1462 for trunk/WuerzburgSoft/Thomas/mphys/MCascade.cc
- Timestamp:
- 07/31/02 14:54:30 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WuerzburgSoft/Thomas/mphys/MCascade.cc
r1449 r1462 292 292 Esum += ProcessGammas(fListGammas, fListElectrons, weight); 293 293 294 fListGammas.ForEach(MPhoton, Fill)(fHist, fDisplayIndex, weight); 294 if (!fIsBatch) 295 fListGammas.ForEach(MPhoton, Fill)(fHist, fDisplayIndex, weight); 295 296 fListGammas.Delete(); 296 297 … … 355 356 void MCascade::Run(TString filename, Bool_t draw) 356 357 { 358 fIsBatch = gROOT->IsBatch() ? kFALSE : draw; 359 357 360 cout << "R = " << fSrcR << "kpc" << endl; 358 361 cout << "Z = " << fSrcZ << endl; … … 371 374 TCanvas *c=NULL; 372 375 373 if ( draw)376 if (!fIsBatch) 374 377 { 375 378 fHist.SetMinimum(pow(fELo, fSpectralIndex+fDisplayIndex)/100); … … 409 412 410 413 TTimer timer("gSystem->ProcessEvents();", 333, kFALSE); 411 if ( draw)414 if (!fIsBatch) 412 415 timer.TurnOn(); 413 416 … … 426 429 Double_t E = GetEnergy(); 427 430 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); 429 434 430 435 cout << "--> " << n << ". " << Form("%d: %3.1e", (int)(starttime+fRuntime-TStopwatch::GetRealTime()), E) << flush; … … 432 437 ProcessPrimaryGamma(E, weight); 433 438 434 if ( !draw)439 if (fIsBatch) 435 440 continue; 436 441 … … 458 463 // ------------------------------ 459 464 460 if ( draw)465 if (!fIsBatch) 461 466 { 462 467 c->Clear();
Note:
See TracChangeset
for help on using the changeset viewer.