From 6f5de0a71aaede9f01fc6d3048fb60cc13a7c0c8 Mon Sep 17 00:00:00 2001 From: dsarrut Date: Tue, 30 Mar 2010 14:04:01 +0000 Subject: [PATCH] - merger for gate --- tests_dav/clitkMergeRootFiles.cxx | 38 +++++++++++++++++++++++++++++++ tests_dav/clitkMergeRootFiles.ggo | 12 ++++++++++ 2 files changed, 50 insertions(+) create mode 100644 tests_dav/clitkMergeRootFiles.cxx create mode 100644 tests_dav/clitkMergeRootFiles.ggo 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 + + -- 2.47.1