#include <cstring>
#include <vector>
#include <cstdlib>
#include <TError.h>
#include "xAODRootAccess/tools/TFileMerger.h"
#include "xAODRootAccess/tools/Message.h"
#include "xAODRootAccess/Init.h"
Go to the source code of this file.
|
#define | R_CHECK(EXP) |
| Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration. More...
|
|
|
int | main (int argc, char *argv[]) |
|
◆ R_CHECK
Value: do { \
if( ! EXP.isSuccess() ) {
\
#EXP ); \
return 1; \
} \
} while( 0 )
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration.
Executable replacing "hadd" for merging xAOD files in standalone mode
This executable can be used outside of Athena to conveniently merge xAOD files into a single output file. It is mainly meant to be used for merging files on the grid, or on PROOF. But it can also be used for other simple merging operations.
- Author
- Attila Krasznahorkay Attil.nosp@m.a.Kr.nosp@m.aszna.nosp@m.hork.nosp@m.ay@ce.nosp@m.rn.c.nosp@m.h Helper macro to return proper error codes when failing
Definition at line 28 of file xAODMerge.cxx.
◆ main()
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 36 of file xAODMerge.cxx.
43 ( ! strcmp(
argv[ 1 ],
"-h" ) ) ||
44 ( ! strcmp(
argv[ 1 ],
"--help" ) ) ) {
46 ::Info(
APP_NAME,
"Usage: %s [options] outputFile inputFile1 "
51 ::Info(
APP_NAME,
" -s Use slow xAOD tree merging" );
52 ::Info(
APP_NAME,
" -b Use branch-access for slow and metadata "
54 ::Info(
APP_NAME,
" -v NUMBER Use a specific verbosity setting" );
55 ::Info(
APP_NAME,
" -m Metadata tool type to use during the merge" );
56 ::Info(
APP_NAME,
" -e NUMBER Number of events to merge in slow "
66 bool useSlowMerge =
false;
69 std::vector< const char* > inputNames;
71 std::vector< const char* > metaDataTools;
73 for(
int i = 1;
i <
argc; ++
i ) {
74 if( ! strcmp(
argv[
i ],
"-s" ) ) {
76 }
else if( ! strcmp(
argv[
i ],
"-b" ) ) {
78 }
else if( ! strcmp(
argv[
i ],
"-v" ) ) {
82 const long request = strtol(
argv[
i + 1 ], 0, 10 );
83 if( ( request < kMaxLong ) && ( request >= 0 ) ) {
84 verbosity =
static_cast< int >( request );
88 "after -v: %s",
argv[
i + 1 ] );
92 }
else if( ! strcmp(
argv[
i ],
"-m" ) ) {
96 metaDataTools.push_back(
argv[
i + 1 ] );
99 }
else if( ! strcmp(
argv[
i ],
"-e" ) ) {
100 if(
i + 1 >=
argc ) {
103 const long request = strtol(
argv[
i + 1 ], 0, 10 );
104 if( ( request < kMaxLong ) && ( request >= 0 ) ) {
105 entries =
static_cast< ::Long64_t
>( request );
109 "passed after -e: %s",
argv[
i + 1 ] );
117 inputNames.push_back(
argv[
i ] );
131 for(
auto name : inputNames ) {
134 for(
auto typeName : metaDataTools ) {