root/root-spectrum-batch.patch
Mattias Ellert ec7f16e89c Update to 6.08.04
Fix broken TPad::WaitPrimitive (backport from git)
Rebuild for gcc 6.3
2017-01-15 08:35:38 +01:00

17 lines
637 B
Diff

diff --git a/tutorials/spectrum/peaks2.C b/tutorials/spectrum/peaks2.C
index 76cc5ab..f05d394 100644
--- a/tutorials/spectrum/peaks2.C
+++ b/tutorials/spectrum/peaks2.C
@@ -107,8 +107,10 @@ void findPeak2() {
s->Print();
printf("Gener=%d, Found=%d, Good=%d, Ghost=%d\n",npeaks,nfound,ngood,nghost);
- printf("\nDouble click in the bottom right corner of the pad to continue\n");
- c1->WaitPrimitive();
+ if (!gROOT->IsBatch()) {
+ printf("\nDouble click in the bottom right corner of the pad to continue\n");
+ c1->WaitPrimitive();
+ }
}
void peaks2(Int_t maxpeaks=50) {
s = new TSpectrum2(2*maxpeaks);