ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
Algorithms
SelectionHelpers
Root
SelectionAccessorExprOr.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
SelectionHelpers/SelectionAccessorExprOr.h
"
6
7
#include "
PATInterfaces/SystematicSet.h
"
8
9
namespace
CP
{
10
11
SelectionAccessorExprOr::SelectionAccessorExprOr
(
12
std::unique_ptr<ISelectionReadAccessor> left,
13
std::unique_ptr<ISelectionReadAccessor> right)
14
:
m_left
(
std
::move(left)),
m_right
(
std
::move(right)) {}
15
16
bool
SelectionAccessorExprOr::getBool
(
const
SG::AuxElement
& element,
17
const
CP::SystematicSet
*sys)
const
{
18
return
m_left
->getBool(element,sys) ||
m_right
->getBool(element,sys);
19
}
20
21
std::string
SelectionAccessorExprOr::label
()
const
{
22
return
"( "
+
m_left
->label() +
" || "
+
m_right
->label() +
" )"
;
23
}
24
25
CP::SystematicSet
SelectionAccessorExprOr ::
26
getInputAffecting (
const
ISystematicsSvc
& svc,
27
const
std::string& objectName)
const
28
{
29
CP::SystematicSet
result =
m_left
->getInputAffecting (svc, objectName);
30
result.insert (
m_right
->getInputAffecting (svc, objectName));
31
return
result;
32
}
33
34
StatusCode SelectionAccessorExprOr ::
35
fillSystematics (
const
ISystematicsSvc
& svc,
36
const
std::vector<CP::SystematicSet>& sysList,
37
ISysObjectHandleBase
& objectHandle)
38
{
39
using namespace
msgSelectionHelpers;
40
41
ANA_CHECK
(
m_left
->fillSystematics (svc, sysList, objectHandle));
42
ANA_CHECK
(
m_right
->fillSystematics (svc, sysList, objectHandle));
43
return
StatusCode::SUCCESS;
44
}
45
46
}
// namespace CP
47
ANA_CHECK
#define ANA_CHECK(EXP)
check whether the given expression was successful
Definition
Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:324
SelectionAccessorExprOr.h
SystematicSet.h
CP::ISysObjectHandleBase
a ISysHandleBase for a handle to a specific object/container
Definition
ISysHandleBase.h:58
CP::ISystematicsSvc
the interface for the central systematics service
Definition
ISystematicsSvc.h:26
CP::SelectionAccessorExprOr::label
virtual std::string label() const override
Definition
SelectionAccessorExprOr.cxx:21
CP::SelectionAccessorExprOr::getBool
virtual bool getBool(const SG::AuxElement &element, const CP::SystematicSet *sys) const override
Definition
SelectionAccessorExprOr.cxx:16
CP::SelectionAccessorExprOr::m_left
std::unique_ptr< ISelectionReadAccessor > m_left
Definition
SelectionAccessorExprOr.h:40
CP::SelectionAccessorExprOr::SelectionAccessorExprOr
SelectionAccessorExprOr(std::unique_ptr< ISelectionReadAccessor > left, std::unique_ptr< ISelectionReadAccessor > right)
Definition
SelectionAccessorExprOr.cxx:11
CP::SelectionAccessorExprOr::m_right
std::unique_ptr< ISelectionReadAccessor > m_right
Definition
SelectionAccessorExprOr.h:41
CP::SystematicSet
Class to wrap a set of SystematicVariations.
Definition
SystematicSet.h:31
CP
Select isolated Photons, Electrons and Muons.
Definition
Control/xAODRootAccess/xAODRootAccess/TEvent.h:27
SG::AuxElement
AuxElement(SG::AuxVectorData *container, size_t index)
Base class for elements of a container that can have aux data.
std
STL namespace.
Generated on
for ATLAS Offline Software by
1.17.0