ATLAS Offline Software
ISelectionReadAccessor.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 
8 #ifndef SELECTION_HELPERS__I_SELECTION_READ_ACCESSOR_H
9 #define SELECTION_HELPERS__I_SELECTION_READ_ACCESSOR_H
10 
13 #include <memory>
14 
15 class StatusCode;
16 
17 namespace CP
18 {
19  class ISystematicsSvc;
20  class SystematicSet;
21 
22 
37 
39  {
40  // no slicing
42 
44  public:
45  virtual ~ISelectionReadAccessor () noexcept = default;
46 
48  public:
49  virtual SelectionType
50  getBits (const SG::AuxElement& element,
51  const CP::SystematicSet *sys = nullptr) const = 0;
52 
54  public:
55  virtual bool getBool (const SG::AuxElement& element,
56  const CP::SystematicSet *sys = nullptr) const = 0;
57 
59  public:
60  virtual std::string label () const = 0;
61 
63  public:
64  virtual bool isBool () const = 0;
65 
67  public:
68  virtual CP::SystematicSet
70  const std::string& objectName) const = 0;
71 
73  public:
74  virtual StatusCode
76  const std::vector<CP::SystematicSet>& sysList,
77  const std::string& objectName) = 0;
78  };
79 
80 
96  makeSelectionReadAccessor (const std::string& expr,
97  std::unique_ptr<ISelectionReadAccessor>& accessor,
98  bool defaultToChar = false);
99 
107  StatusCode
109  std::unique_ptr<ISelectionReadAccessor>& accessor,
110  bool defaultToChar = false);
111 }
112 
113 #endif
CP::ISelectionReadAccessor::operator=
ISelectionReadAccessor & operator=(const ISelectionReadAccessor &)=delete
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
CP::ISystematicsSvc
the interface for the central systematics service
Definition: ISystematicsSvc.h:25
CP::ISelectionReadAccessor::isBool
virtual bool isBool() const =0
whether this accessor returns a simple boolean
CP::SelectionType
uint32_t SelectionType
the type for selection decorations that are meant to hold a asg::AcceptData
Definition: SelectionHelpers.h:26
CP::SystematicSet
Class to wrap a set of SystematicVariations.
Definition: SystematicSet.h:31
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
CP
Select isolated Photons, Electrons and Muons.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:48
mapkey::sys
@ sys
Definition: TElectronEfficiencyCorrectionTool.cxx:42
CP::ISelectionReadAccessor::fillSystematics
virtual StatusCode fillSystematics(const ISystematicsSvc &svc, const std::vector< CP::SystematicSet > &sysList, const std::string &objectName)=0
fill the systematic variations
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
vector
Definition: MultiHisto.h:13
CP::ISelectionReadAccessor::~ISelectionReadAccessor
virtual ~ISelectionReadAccessor() noexcept=default
standard (virtual) destructor
Handler::svc
AthROOTErrorHandlerSvc * svc
Definition: AthROOTErrorHandlerSvc.cxx:10
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
CP::ISelectionReadAccessor::getBits
virtual SelectionType getBits(const SG::AuxElement &element, const CP::SystematicSet *sys=nullptr) const =0
get the selection decoration
CP::makeSelectionReadAccessor
StatusCode makeSelectionReadAccessor(const std::string &expr, std::unique_ptr< ISelectionReadAccessor > &accessor, bool defaultToChar)
make the ISelectionReadAccessor for the given name
Definition: ISelectionAccessor.cxx:54
CP::ISelectionReadAccessor::getBool
virtual bool getBool(const SG::AuxElement &element, const CP::SystematicSet *sys=nullptr) const =0
get the selection decoration
xAOD::JetAttributeAccessor::accessor
const AccessorWrapper< T > * accessor(xAOD::JetAttribute::AttributeID id)
Returns an attribute accessor corresponding to an AttributeID.
Definition: JetAccessorMap.h:26
CP::makeSelectionReadAccessorVar
StatusCode makeSelectionReadAccessorVar(const std::string &name, std::unique_ptr< ISelectionReadAccessor > &accessor, bool defaultToChar)
Produces a simple ISelectionReadAccessor accessing the given decoration.
Definition: ISelectionAccessor.cxx:139
CP::ISelectionReadAccessor
a specialized accessor to read a selection decoration from/to an xAOD object
Definition: ISelectionReadAccessor.h:39
CP::ISelectionReadAccessor::label
virtual std::string label() const =0
get the label of the accessor
python.CaloScaleNoiseConfig.default
default
Definition: CaloScaleNoiseConfig.py:79
CP::ISelectionReadAccessor::getInputAffecting
virtual CP::SystematicSet getInputAffecting(const ISystematicsSvc &svc, const std::string &objectName) const =0
get the systematics when reading from the decoration
AuxElement.h
Base class for elements of a container that can have aux data.
SelectionHelpers.h