42 {
43
45 if (test == nullptr) {
46 cout << "Unable to load test" << endl;
47 return 1;
48 }
49
50
51 if (!
xAOD::Init(testName.c_str()).isSuccess()) {
52 return 1;
53 }
54
55
56 std::unique_ptr< TFile >
file( TFile::Open( gSystem->Getenv(
"ROOTCORE_TEST_FILE"),
"READ" ) );
57
58
59
61 if (!event) {
62 cout <<
"cannot read from file: " <<
file << endl;
63 return 1;
64 }
65
66 xAODConfigTool configTool("xAODConfigTool");
67 ToolHandle<TrigConf::ITrigConfigTool> configHandle(&configTool);
68 if (!configHandle->initialize().isSuccess()) return 1;
69
71 if (!trigDecTool.setProperty("ConfigTool",configHandle)) return 1;
72 if (!trigDecTool.setProperty("TrigDecisionKey","xTrigDecision")) return 1;
73 if (!trigDecTool.initialize()) return 1;
74
75 asg::SgEvent sgevent(
event.get());
76 test->setEventStore( &sgevent );
77
78
79 size_t nEntries =
event->getEntries();
81 event->getEntry(entry);
82
83 test->processEvent (trigDecTool);
84 }
85
86
87 return test->finalize();
88 }
static std::unique_ptr< Event > createAndReadFrom(TFile &file)
static method to create an Event object and readFrom a file, given by a TFile.
ITest * GetTrigAnalysisTest(const string &name)
StatusCode Init(const char *appname)
Function initialising ROOT/PyROOT for using the ATLAS EDM.