#include <cstring>
#include <memory>
#include <vector>
#include <string>
#include <TFile.h>
#include <TError.h>
#include <TClass.h>
#include "xAODRootAccess/Init.h"
#include "xAODRootAccess/TEvent.h"
#include "xAODRootAccess/tools/Message.h"
Go to the source code of this file.
|
int | main (int argc, char *argv[]) |
|
◆ R_CHECK
Value: do { \
if( !
result.isSuccess() ) { \
Error( APP_NAME,
XAOD_MESSAGE(
"Failed to execute: %s" ), #EXP ); \
return 1; \
} \
} while( 0 )
Helper macro.
Definition at line 27 of file xAODFileReadTest.cxx.
◆ main()
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 93 of file xAODFileReadTest.cxx.
100 ( ! strcmp(
argv[ 1 ],
"-h" ) ) ||
101 ( ! strcmp(
argv[ 1 ],
"--help" ) ) ) {
102 Info( APP_NAME,
"Usage: %s [options] <file1> [file2]...", APP_NAME );
103 Info( APP_NAME,
"Options:" );
104 Info( APP_NAME,
" -m <access mode>" );
105 Info( APP_NAME,
" 0: Branch access" );
106 Info( APP_NAME,
" 1: Class access (default)" );
107 Info( APP_NAME,
" 2: Athena access" );
114 for(
int i = 1;
i <
argc; ++
i ) {
115 if( ! strcmp(
argv[
i ],
"-m" ) ) {
116 if(
i + 1 >=
argc ) {
121 const long mode = ::strtol(
argv[
i + 1 ], 0, 10 );
137 std::unique_ptr< TFile >
ifile( TFile::Open(
fileName.c_str(),
"READ" ) );
138 if( ( !
ifile.get() ) ||
ifile->IsZombie() ) {
149 const Long64_t
entries =
event.getEntries();
155 XAOD_MESSAGE(
"Failed to load entry %i from file: %s" ),
165 Info( APP_NAME,
"===>>> Loaded entry %i / %i <<<===",
166 static_cast< int >(
entry ),
static_cast< int >(
entries ) );