#include "merge/merge.C"
#include "TError.h"
#include <cstdlib>
Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 24 of file merge.cpp.
25 bool dbg =
false, fixup=
true;
29 if ( *
argv[
i] ==
'-' ) {
38 if (
i+1 < argc ) output =
argv[
i+1];
42 if (
i+1 < argc ) input.push_back(
argv[
i+1]);
50 if ( input.empty() ) {
51 ::printf(
"\nERROR: No input file(s) supplied\n\n");
54 else if ( output.empty() ) {
55 ::printf(
"\nERROR: No output file supplied.\n\n");
58 gROOT->SetBatch(kTRUE);
59 s_err = SetErrorHandler(err_handler);
60 for(
size_t i=0;
i<input.size();++
i) {
61 const string& in = input[
i];
62 bool do_fixup = fixup && ((
i+1)==input.size());
65 int result = merge(output.c_str(),in.c_str(),do_fixup,dbg);
66 if ( result == MERGE_ERROR ) {
67 printf(
"\nERROR: File merge failed after %ld files.\n\n",
long(
i+1));
void usage(std::string argv0)
void toupper(std::string &s)