--- /dev/null
+/**
+ =================================================
+ * @file clitkMergeRootFiles.cxx
+ * @author David Sarrut <david.sarrut@creatis.insa-lyon.fr>
+ * @date 01 Apr 2009
+ *
+ * @brief
+ *
+ =================================================*/
+
+#include "clitkMergeRootFiles_ggo.h"
+#include "clitkCommon.h"
+#include <string>
+#include "TROOT.h"
+#include "TFile.h"
+#include "TFileMerger.h"
+
+//-----------------------------------------------------------------------------
+int main(int argc, char * argv[]) {
+
+ // init command line
+ GGO(clitkMergeRootFiles, args_info);
+
+ // Check parameters
+ if (args_info.input_given < 2) {
+ FATAL("Error, please provide at least two inputs files");
+ }
+
+ // Merge
+ TFileMerger * merger = new TFileMerger;
+ for (uint i=0; i<args_info.input_given; i++) merger->AddFile(args_info.input_arg[i]);
+ merger->OutputFile(args_info.output_arg);
+ merger->Merge();
+
+ // this is the end my friend
+ return 0;
+}
+//-----------------------------------------------------------------------------
--- /dev/null
+# --------------------------------------------
+# file clitkMergeRootFiles.ggo
+package "clitkMergeRootFiles"
+version "1.0"
+purpose "Merge several ROOT files"
+# --------------------------------------------
+
+option "config" - "Config file" string no
+option "input" i "Input ROOT filenames" string multiple yes
+option "output" o "Output ROOT filename" string yes
+
+