ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
xAODRootAccess
util
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
14
#include "
AsgMessaging/MessageCheck.h
"
15
#include "
CxxUtils/checker_macros.h
"
16
17
// Local include(s):
18
#include "
xAODRootAccess/Init.h
"
19
#include "
xAODRootAccess/REvent.h
"
20
#include "
xAODRootAccess/tools/RFileChecker.h
"
21
#include "
xAODRootAccess/tools/ReturnCheck.h
"
22
23
int
main
ATLAS_NOT_THREAD_SAFE
(
int
argc,
char
* argv[] ) {
24
25
ANA_CHECK_SET_TYPE
(
int
);
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:
39
ANA_CHECK
(
xAOD::Init
() );
40
41
// The object used in the checks:
42
xAOD::Experimental::RFileChecker
checker;
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
// Set up reading from the file:
55
xAOD::Experimental::REvent
event;
56
ANA_CHECK
( event.readFrom( fname ) );
57
58
// Run the sanity checks:
59
ANA_CHECK
( checker.check( event ) );
60
}
61
62
// Return gracefully:
63
return
0;
64
}
APP_NAME
#define APP_NAME
Definition
BoostedXbbTag.cxx:25
MessageCheck.h
macros for messaging and checking status codes
ANA_CHECK
#define ANA_CHECK(EXP)
check whether the given expression was successful
Definition
Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:324
ANA_CHECK_SET_TYPE
#define ANA_CHECK_SET_TYPE(TYPE)
set the type for ANA_CHECK to report failures
Definition
Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:314
main
int main(int, char **)
Main class for all the CppUnit test classes.
Definition
CppUnit_SGtestdriver.cxx:141
Init.h
REvent.h
RFileChecker.h
ROOTTypes.h
ReturnCheck.h
checker_macros.h
Define macros for attributes used to control the static checker.
ATLAS_NOT_THREAD_SAFE
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
Definition
checker_macros.h:212
xAOD::Experimental::REvent
Tool for accessing xAOD files outside of Athena, version RNTuple.
Definition
REvent.h:33
xAOD::Experimental::RFileChecker
Tool for running sanity checks on xAOD files.
Definition
RFileChecker.h:41
xAOD::Init
StatusCode Init(const char *appname)
Function initialising ROOT/PyROOT for using the ATLAS EDM.
Definition
Init.cxx:31
Generated on
for ATLAS Offline Software by
1.17.0