ATLAS Offline Software
Functions
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;
45  ANA_CHECK_SET_TYPE(int);
46 
48  "AsgElectronEfficiencyCorrectionTool/ElectronEffCorrection");
49  ANA_CHECK(tool.setProperty("CorrelationModel", "FULL") &&
50  tool.setProperty("ForceDataType", 1) &&
51  tool.setProperty("IdKey", "Medium") && tool.retrieve());
52 
54  eccTool.setTypeAndName(
55  "CP::ElectronChargeEfficiencyCorrectionTool/ElectronChargeCorrection");
56  ANA_CHECK(
57  eccTool.setProperty(
58  "CorrectionFileName",
59  "ElectronEfficiencyCorrection/2015_2016/rel20.7/Moriond_February2017_v1/"
60  "charge_misID/ChargeCorrectionSF.Medium_FixedCutTight.root") &&
61  eccTool.retrieve());
62 
63  return 0;
64 }
ANA_CHECK
#define ANA_CHECK(EXP)
check whether the given expression was successful
Definition: Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:324
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
asg::StandaloneToolHandle::setProperty
StatusCode setProperty(const std::string &name, T2 &&value)
Definition: StandaloneToolHandle.h:105
asg::StandaloneToolHandle
an "initializing" ToolHandle for stand-alone applications
Definition: StandaloneToolHandle.h:44
asg::StandaloneToolHandle::retrieve
StatusCode retrieve()
initialize the tool, will succeed if the tool was already initialized
Definition: StandaloneToolHandle.h:147
AtlCoolConsole.tool
tool
Definition: AtlCoolConsole.py:453
asg::StandaloneToolHandle::setTypeAndName
void setTypeAndName(const std::string &typeAndName)
Definition: StandaloneToolHandle.h:101
ANA_CHECK_SET_TYPE
#define ANA_CHECK_SET_TYPE(TYPE)
set the type for ANA_CHECK to report failures
Definition: Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:314
CxxUtils::ubsan_suppress
void ubsan_suppress(void(*func)())
Helper for suppressing ubsan warnings.
Definition: ubsan_suppress.cxx:69
xAOD::TEvent
Tool for accessing xAOD files outside of Athena.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:84