#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 95 of file xAODFileReadTest.cxx.
102 ( ! strcmp(
argv[ 1 ],
"-h" ) ) ||
103 ( ! strcmp(
argv[ 1 ],
"--help" ) ) ) {
104 Info( APP_NAME,
"Usage: %s [options] <file1> [file2]...", APP_NAME );
105 Info( APP_NAME,
"Options:" );
106 Info( APP_NAME,
" -m <access mode>" );
107 Info( APP_NAME,
" 0: Branch access" );
108 Info( APP_NAME,
" 1: Class access (default)" );
109 Info( APP_NAME,
" 2: Athena access" );
116 for(
int i = 1;
i <
argc; ++
i ) {
117 if( ! strcmp(
argv[
i ],
"-m" ) ) {
118 if(
i + 1 >=
argc ) {
123 const long mode = ::strtol(
argv[
i + 1 ], 0, 10 );
139 std::unique_ptr< TFile >
ifile( TFile::Open(
fileName.c_str(),
"READ" ) );
140 if( ( !
ifile.get() ) ||
ifile->IsZombie() ) {
151 const Long64_t
entries =
event.getEntries();
157 XAOD_MESSAGE(
"Failed to load entry %i from file: %s" ),
167 Info( APP_NAME,
"===>>> Loaded entry %i / %i <<<===",
168 static_cast< int >(
entry ),
static_cast< int >(
entries ) );