#include "merge/merge.C"
#include <cstdlib>
Go to the source code of this file.
| int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 16 of file merge.cpp.
{
bool dbg = false, fixup=true;
vector<string> input;
string output;
case 'N':
fixup = false;
break;
case 'D':
dbg = true;
break;
case 'O':
if (
i+1 < argc ) output =
argv[
i+1];
break;
case 'I':
if (
i+1 < argc ) input.push_back(
argv[
i+1]);
break;
default:
}
}
}
if ( input.empty() ) {
::printf("\nERROR: No input file(s) supplied\n\n");
}
else if ( output.empty() ) {
::printf("\nERROR: No output file supplied.\n\n");
}
gROOT->SetBatch(kTRUE);
for(
size_t i=0;
i<input.size();++
i) {
const string& in = input[
i];
bool do_fixup = fixup && ((
i+1)==input.size());
int result =
merge(output.c_str(),in.c_str(),do_fixup,dbg);
if ( result == MERGE_ERROR ) {
printf(
"\nERROR: File merge failed after %ld files.\n\n",
long(
i+1));
return 1;
}
}
return 0;
}
Definition at line 4 of file merge.cpp.
{
::printf("Gaudi merge facility for ROOT tree based files.\n"
" Usage: \n"
"gaudi_merge -o <output-file> -i <input-file 1> [ -i <input-file 2> ...]\n\n"
"input- and output files may specify any legal (ROOT) file name.\n"
" -output Specify output file name.\n"
" -input Specify input file name.\n"
" -debug Switch debug flag on.\n"
);
return 1;
}