X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;ds=sidebyside;f=macros%2Fgrun.C;h=b64d793264c33c03c40d385b432cca24c7d37b15;hb=b03591abb5137fef7e83b911f1fdd16441444755;hp=eaedba820d606205da0c64a0681d83b8699bb066;hpb=745a412a4b76add730de8f9d479b9a8deb3150be;p=u%2Fmrichter%2FAliRoot.git diff --git a/macros/grun.C b/macros/grun.C index eaedba820d6..b64d793264c 100644 --- a/macros/grun.C +++ b/macros/grun.C @@ -1,10 +1,18 @@ -Int_t ievent; void grun (Int_t nevent=1, const char *config="Config.C") { // // Simple macro to run aliroot in a batch mode // - ievent=nevent; gAlice->Init(config); - gAlice->Run(ievent); + TStopwatch timer; + timer.Start(); +// +// If nevent is negative it is assumed that in config the +// global variable eventsPerRun has been set. +// + if (nevent < 0) + nevent = eventsPerRun; + gAlice->Run(nevent); + timer.Stop(); + timer.Print(); }