Index: /trunk/MagicSoft/Mars/macros/getRate.C
===================================================================
--- /trunk/MagicSoft/Mars/macros/getRate.C	(revision 902)
+++ /trunk/MagicSoft/Mars/macros/getRate.C	(revision 903)
@@ -18,6 +18,41 @@
     //    access them-
     //
+    //  - we need to create MHMcRate only. The other containers
+    //    are created automatically without loss - we don't have to
+    //    access them-
+    //  - MHMcRate must be created by us because we need the pointer
+    //    to it and if it would get created automatically it would also be
+    //    deleted automatically
+    //  - Actually, depending on using a single trigger option MonteCarlo
+    //    file or a multyple trigger option, a MHMcRate or an array of 
+    //    MHMcRate are needed.
     
     parlist.AddToList(&tasklist);
+
+    if (dim==0){
+      MHMcRate *rate = new MHMcRate();
+      parlist.AddToList(rate);
+    }
+    if (dim<0){
+      char *name = new char[8];
+      name="MHMcRate";
+      char *auxname = new char[8+7];
+      strcpy(auxname, name);
+      sprintf(auxname+8, ";%d", -dim);
+      MHMcRate *ratem = new MHMcRate(auxname);
+      parlist.AddToList(ratem);
+    }
+    else{ 
+      MHMcRate **ratep = new MHMcRate *[dim];
+      char *name = new char[8];
+      name="MHMcRate";
+      char *auxname = new char[8+7];
+      strcpy(auxname, name);
+      for(int i=0;i<dim;i++){
+	sprintf(auxname+8, ";%d", i+1);
+	ratep[i] = new MHMcRate(auxname);
+	parlist.AddToList(ratep[i]);
+      }
+    }
 
     //
@@ -31,5 +66,5 @@
     tasklist.AddToList(&reader);
 
-    Float_t BgR[10]={20907,352,0,0,0,0,0,0,0,0};
+    Float_t BgR[10]={660,4,0,0,0,0,0,0,0,0};
     cout<<dim<<endl;
 
