|
ATLAS Offline Software
|
Go to the documentation of this file.
23 static const char*
const APP_NAME =
"xAODFileReadTest";
26 #define R_CHECK( EXP ) \
28 const auto result = EXP; \
29 if( ! result.isSuccess() ) { \
30 Error( APP_NAME, XAOD_MESSAGE( "Failed to execute: %s" ), #EXP ); \
46 return StatusCode::FAILURE;
49 for(
auto ef_itr : *
ef ) {
62 ::TClass*
cl = ::TClass::GetClass( efe.
className().c_str(), kTRUE,
65 if(
cl->InheritsFrom(
"SG::IConstAuxStore" ) ) {
69 const std::type_info* ti =
cl->GetTypeInfo();
71 ::Warning(
"TEventClass::loadInputObjects",
72 "Couldn't find std::type_info object for type %s "
82 Error(
"TEventClass::loadInputObjects",
85 return StatusCode::FAILURE;
89 return StatusCode::SUCCESS;
100 ( ! strcmp(
argv[ 1 ],
"-h" ) ) ||
101 ( ! strcmp(
argv[ 1 ],
"--help" ) ) ) {
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 ) );
#define R_CHECK(EXP)
Helper macro.
const void * getInputObject(SG::sgkey_t key, const std::type_info &ti, bool silent=false) override
Function for retrieving an input object in a non-template way.
int main(int argc, char *argv[])
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
@ kClassAccess
Access auxiliary data using the aux containers.
StatusCode readFrom(TFile *file)
POOL::TEvent event(POOL::TEvent::kClassAccess)
::StatusCode StatusCode
StatusCode definition for legacy code.
TEventClass(xAOD::TEvent::EAuxMode mode)
Constructor.
::Bool_t contains(const std::string &key)
Function checking if an object is available from the store.
StatusCode loadInputObjects()
Function loading all interface objects of the event.
TEvent(EAuxMode mode=kUndefinedAccess)
Default constructor.
EAuxMode
Auxiliary store "mode".
const EventFormat * inputEventFormat() const
Get information about the input objects.
Error
The different types of error that can be flagged in the L1TopoRDO.
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
Tool for accessing xAOD files outside of Athena.
StatusCode Init(const char *appname)
Function initialising ROOT/PyROOT for using the ATLAS EDM.