ATLAS Offline Software
Loading...
Searching...
No Matches
EgEfficiencyCorr_mem_check.cxx File Reference
#include "AsgMessaging/AsgMessaging.h"
#include "AsgTools/StandaloneToolHandle.h"
#include "EgammaAnalysisInterfaces/IAsgElectronEfficiencyCorrectionTool.h"
#include <iostream>
#include <string>
#include <vector>
#include "CxxUtils/ubsan_suppress.h"
#include "TInterpreter.h"
Include dependency graph for EgEfficiencyCorr_mem_check.cxx:

Go to the source code of this file.

Functions

int main ()

Function Documentation

◆ main()

int main ( )

Definition at line 33 of file EgEfficiencyCorr_mem_check.cxx.

34{
35 std::cout << "EgEfficiencyCorr_mem_check" << std::endl;
36
37 // Suppress known ubsan warning we get from cling.
38 CxxUtils::ubsan_suppress([]() { TInterpreter::Instance(); });
39
40#ifdef XAOD_STANDALONE
42#endif
43
44 using namespace asg::msgUserCode;
46
47 try {
49 "AsgElectronEfficiencyCorrectionTool/ElectronEffCorrection");
50 ANA_CHECK(tool.setProperty("CorrelationModel", "FULL") &&
51 tool.setProperty("ForceDataType", 1) &&
52 tool.setProperty("IdKey", "Medium") && tool.retrieve());
53
55 eccTool.setTypeAndName(
56 "CP::ElectronChargeEfficiencyCorrectionTool/ElectronChargeCorrection");
58 eccTool.setProperty(
59 "CorrectionFileName",
60 "ElectronEfficiencyCorrection/2015_2016/rel20.7/Moriond_February2017_v1/"
61 "charge_misID/ChargeCorrectionSF.Medium_FixedCutTight.root") &&
62 eccTool.retrieve());
63 } catch (const std::exception& e) {
64 std::cerr << "exception: " << e.what() << "\n";
65 return 1;
66 }
67
68 return 0;
69}
#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
StatusCode setProperty(const std::string &name, T2 &&value)
StatusCode retrieve()
initialize the tool, will succeed if the tool was already initialized
void setTypeAndName(const std::string &typeAndName)
Tool for accessing xAOD files outside of Athena.
void ubsan_suppress(void(*func)())
Helper for suppressing ubsan warnings.