 |
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(
const 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 "
77 static constexpr
bool METADATA =
false;
82 static constexpr
bool SILENT =
false;
84 Error(
"TEventClass::loadInputObjects",
87 return StatusCode::FAILURE;
91 return StatusCode::SUCCESS;
102 ( ! strcmp(
argv[ 1 ],
"-h" ) ) ||
103 ( ! strcmp(
argv[ 1 ],
"--help" ) ) ) {
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" ),
168 static_cast< int >(
entry ),
static_cast< int >(
entries ) );
#define R_CHECK(EXP)
Helper macro.
TEvent(EAuxMode mode=kClassAccess)
Default constructor.
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)
const EventFormat * inputEventFormat() const
Get information about the input objects.
POOL::TEvent event(POOL::TEvent::kClassAccess)
::StatusCode StatusCode
StatusCode definition for legacy code.
TEventClass(xAOD::TEvent::EAuxMode mode)
Constructor.
const void * getInputObject(SG::sgkey_t key, const std::type_info &ti, bool silent) override
Function for retrieving an input object in a non-template way.
StatusCode loadInputObjects()
Function loading all interface objects of the event.
bool contains(const std::string &key)
Function checking if an object is available from the store.
EAuxMode
Auxiliary store "mode".
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.