Index: /trunk/FACT++/src/calcsource.cc
===================================================================
--- /trunk/FACT++/src/calcsource.cc	(revision 19111)
+++ /trunk/FACT++/src/calcsource.cc	(revision 19112)
@@ -30,4 +30,6 @@
         ("table.source",   var<string>("Source"),     "Name of the table where the sources are stored")
         ("table.position", var<string>("Position"),   "Name of the table where the calculated posiiton will be stored")
+        ("engine",         var<string>(""),           "Database engine to be used when a new table is created")
+        ("row-format",     var<string>(""),           "Defines the ROW_FORMAT keyword for table creation")
         ("ignore-errors",  po_switch(),               "Adds the IGNORE keyword to the INSERT query (turns errors into warnings, ignores rows with errors)")
         ("force",          po_switch(),               "Force processing even if there is no database connection")
@@ -160,4 +162,6 @@
     const string   tab_position = conf.Get<string>("table.position");
 
+    const string engine         = conf.Get<string>("engine");
+    const string row_format     = conf.Get<string>("row-format");
     const bool ignore_errors    = conf.Get<bool>("ignore-errors");
 
@@ -530,5 +534,5 @@
             cout << "Creating table `" << tab_position << "`" << endl;
 
-        const string query2 =
+        string query2 =
             "CREATE TABLE IF NOT EXISTS `"+tab_position+"`\n"
             "(\n"
@@ -539,7 +543,10 @@
             "   PRIMARY KEY (FileId, EvtNumber)\n"
             ")\n"
-            "DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci\n"
-            "ENGINE=MyISAM\n"
-            "COMMENT='created by "+conf.GetName()+"'\n";
+            "DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci\n";
+        if (!engine.empty())
+            query2 += "ENGINE="+engine+"\n";
+        if (!row_format.empty())
+            query2 += "ROW_FORMAT="+row_format+"\n";
+        query2 += "COMMENT='created by "+conf.GetName()+"'\n";
 
         try
@@ -1019,3 +1026,2 @@
 
 */
-
