]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - macros/grun.C
L3 becomes HLT
[u/mrichter/AliRoot.git] / macros / grun.C
index eaedba820d606205da0c64a0681d83b8699bb066..b64d793264c33c03c40d385b432cca24c7d37b15 100644 (file)
@@ -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();
 }