ATLAS Offline Software
Loading...
Searching...
No Matches
xAODRNChecker.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5// System include(s):
6#include <cstring>
7#include <memory>
8
9// ROOT include(s):
10// #include <TFile.h>
11#include "../Root/ROOTTypes.h"
12#include <TError.h>
13
16
17// Local include(s):
18#include "xAODRootAccess/Init.h"
22
23int main ATLAS_NOT_THREAD_SAFE ( int argc, char* argv[] ) {
24
26 using namespace asg::msgUserCode;
27
28 // The application's name:
29 const char* APP_NAME = argv[ 0 ];
30
31 // Check that the application will be able to run:
32 if( ( argc == 1 ) ||
33 ( ( argc == 2 ) && ( ::strcmp( argv[ 1 ], "-h" ) == 0 ) ) ) {
34 ::Info( APP_NAME, "Usage: %s <xAOD file1> [xAOD file2] ...", APP_NAME );
35 return 0;
36 }
37
38 // Initialise the application's environment:
40
41 // The object used in the checks:
43 checker.setStopOnError( kFALSE ); // Don't stop on errors, print them all
44
45 // Loop over the files:
46 for( int i = 1; i < argc; ++i ) {
47
48 // The file name:
49 const char* fname = argv[ i ];
50
51 // // Open the file:
52 ::Info( APP_NAME, "Opening file: %s", fname );
53
54 // Later on the code should find all the top level event trees in the
55 // input file. But for now let's just assume that only "CollectionTree" is
56 // in the file.
57
58 // Set up reading from the file:
60 ANA_CHECK( event.readFrom( fname ) );
61
62 // Run the sanity checks:
63 ANA_CHECK( checker.check( event ) );
64 }
65
66 // Return gracefully:
67 return 0;
68}
#define APP_NAME
macros for messaging and checking status codes
#define ANA_CHECK(EXP)
check whether the given expression was successful
#define ANA_CHECK_SET_TYPE(TYPE)
set the type for ANA_CHECK to report failures
int main(int, char **)
Main class for all the CppUnit test classes.
Define macros for attributes used to control the static checker.
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
Tool for accessing xAOD files outside of Athena, version RNTuple.
Definition REvent.h:28
Tool for running sanity checks on xAOD files.
StatusCode Init(const char *appname)
Function initialising ROOT/PyROOT for using the ATLAS EDM.
Definition Init.cxx:31