ATLAS Offline Software
Loading...
Searching...
No Matches
dump-cbk.cxx File Reference
Include dependency graph for dump-cbk.cxx:

Go to the source code of this file.

Functions

int main (int argc, char **argv)

Function Documentation

◆ main()

int main ( int argc,
char ** argv )

Definition at line 26 of file dump-cbk.cxx.

27{
28 // Make sure things know we are not in StatusCode land
29 using namespace CutFlow;
31
32 if (argc < 2) {
33 ANA_MSG_ERROR("Input file missing.");
34 return 1;
35 }
36 const char *inputFile = argv[1];
37
38 // Setup for reading -- if this fails, we have major problems
39#ifdef XAOD_STANDALONE
40 if ( ! xAOD::Init().isSuccess() ) {
41 throw std::runtime_error("Cannot initialise xAOD access !");
42 }
43 ANA_MSG_INFO("Using xAOD access");
44#else
45 IAppMgrUI *app = POOL::Init();
46 ANA_MSG_INFO("Using POOL access");
47#endif
48
50
51 ANA_MSG_INFO("Reading file:" << inputFile);
52
53 // Input chain
54 std::unique_ptr<TFile> file(TFile::Open(inputFile, "READ"));
55 ANA_CHECK(file.get());
56#ifdef XAOD_STANDALONE
58#else
60#endif
61 ANA_CHECK(event.readFrom(file.get()));
62
63 // Load metadata
64 event.getEntries();
65
66 // Retrieve the tool
67 asg::StandaloneToolHandle<asg::AsgMetadataTool> tool("BookkeeperDumperTool/BookkeeperDumperTool");
68 ANA_CHECK(tool.setProperty("StandaloneMode", true));
69 ANA_CHECK(tool.setProperty("AllVariations", true));
70 ANA_CHECK(tool.retrieve());
71
72 // Trigger finalization of all services and tools created by the Gaudi Application
73#ifndef XAOD_STANDALONE
74 app->finalize().ignore();
75#endif
76
77 return 0;
78}
#define ANA_MSG_INFO(xmsg)
Macro printing info messages.
#define ANA_MSG_ERROR(xmsg)
Macro printing error messages.
#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
an "initializing" ToolHandle for stand-alone applications
Tool for accessing xAOD files outside of Athena.
@ kClassAccess
Access auxiliary data using the aux containers.
static void enableDataSubmission(::Bool_t value)
Function for turning data submission on/off.
IAppMgrUI * Init(const char *options="POOLRootAccess/basic.opts")
Bootstraps (creates and configures) the Gaudi Application with the provided options file.
StatusCode Init(const char *appname)
Function initialising ROOT/PyROOT for using the ATLAS EDM.
Definition Init.cxx:31
TFile * file