From: dsarrut Date: Tue, 30 Mar 2010 14:04:01 +0000 (+0000) Subject: - merger for gate X-Git-Tag: v1.4.0~164^2~33 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=6f5de0a71aaede9f01fc6d3048fb60cc13a7c0c8;p=clitk.git - merger for gate --- diff --git a/tests_dav/clitkMergeRootFiles.cxx b/tests_dav/clitkMergeRootFiles.cxx new file mode 100644 index 0000000..b4b6721 --- /dev/null +++ b/tests_dav/clitkMergeRootFiles.cxx @@ -0,0 +1,38 @@ +/** + ================================================= + * @file clitkMergeRootFiles.cxx + * @author David Sarrut + * @date 01 Apr 2009 + * + * @brief + * + =================================================*/ + +#include "clitkMergeRootFiles_ggo.h" +#include "clitkCommon.h" +#include +#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; iAddFile(args_info.input_arg[i]); + merger->OutputFile(args_info.output_arg); + merger->Merge(); + + // this is the end my friend + return 0; +} +//----------------------------------------------------------------------------- diff --git a/tests_dav/clitkMergeRootFiles.ggo b/tests_dav/clitkMergeRootFiles.ggo new file mode 100644 index 0000000..4180c20 --- /dev/null +++ b/tests_dav/clitkMergeRootFiles.ggo @@ -0,0 +1,12 @@ +# -------------------------------------------- +# 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 + +