Index: /trunk/FACT++/src/rootifysql.cc
===================================================================
--- /trunk/FACT++/src/rootifysql.cc	(revision 18496)
+++ /trunk/FACT++/src/rootifysql.cc	(revision 18497)
@@ -27,4 +27,5 @@
         ("tree,t",        var<string>("Result"),       "Name of the root tree")
         ("display,d",     po_switch(),                 "Displays contents on the screen (most usefull in combination with mysql statements as SHOW or EXPLAIN)")
+        ("no-out,n",      po_switch(),                 "Redirect the output file to /dev/null")
         ("delimiter",     var<string>(""),             "The delimiter used if contents are displayed with --display (default=\\t)")
         ("verbose,v",     var<uint16_t>(1),            "Verbosity (0: quiet, 1: default, 2: more, 3, ...)")
@@ -43,4 +44,7 @@
     cout <<
         "rootifysql - Converts the result of a mysql query into a root file\n"
+        "\n"
+        "For convenience, this documentation uses the extended version of the options, "
+        "refer to the output below to get the abbreviations.\n"
         "\n"
         "Writes the result of a mysql query into a root file. For each column, a branch is "
@@ -55,5 +59,5 @@
         "This can be useful to create an ascii file or to show results as 'SHOW DATABASES' "
         "or 'EXPLAIN table'. To redirect the contents into an ascii file, the option -v0 "
-        "is useful.\n"
+        "is useful. To suppredd writing to an output file --no-out can be used.\n"
         "\n"
         "The default is to read the query from a file called rootify.sql. Except if a different "
@@ -93,4 +97,5 @@
     const bool     update      = conf.Get<bool>("update");
     const bool     display     = conf.Get<bool>("display");
+    const bool     noout       = conf.Get<bool>("no-out");
     const uint16_t verbose     = conf.Get<uint16_t>("verbose");
     const uint16_t compression = conf.Get<uint16_t>("compression");
@@ -129,21 +134,24 @@
     // I am using root here instead of boost to be
     // consistent with the access pattern by TFile
-    TString path(out.c_str());
+    TString path(noout?"/dev/null":out.c_str());
     gSystem->ExpandPathName(path);
 
-    FileStat_t stat;
-    const Int_t  exist = !gSystem->GetPathInfo(path, stat);
-    const Bool_t write = !gSystem->AccessPathName(path,  kWritePermission) && R_ISREG(stat.fMode);
-
-    if ((update && !exist) || (update && exist && !write) || (force && exist && !write))
-    {
-        cerr << "File '" << path << "' is not writable." << endl;
-        return 3;
-    }
-
-    if (!update && !force && exist)
-    {
-        cerr << "File '" << path << "' already exists." << endl;
-        return 4;
+    if (!noout)
+    {
+        FileStat_t stat;
+        const Int_t  exist = !gSystem->GetPathInfo(path, stat);
+        const Bool_t write = !gSystem->AccessPathName(path,  kWritePermission) && R_ISREG(stat.fMode);
+
+        if ((update && !exist) || (update && exist && !write) || (force && exist && !write))
+        {
+            cerr << "File '" << path << "' is not writable." << endl;
+            return 3;
+        }
+
+        if (!update && !force && exist)
+        {
+            cerr << "File '" << path << "' already exists." << endl;
+            return 4;
+        }
     }
     // -------------------------------------------------------------------------
